aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/config/webpack/dev.js
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-03-31 20:21:41 +0200
committerThomas Citharel <tcit@tcit.fr>2017-05-04 14:49:44 +0200
commit64f81bc31699ed239e4becec1cfa7ebc0bef2b5a (patch)
tree6363a596055683587d11aaffcf30608a682988aa /app/config/webpack/dev.js
parent3b4502e0e663866e7bac00164fd935fdc92309d6 (diff)
downloadwallabag-64f81bc31699ed239e4becec1cfa7ebc0bef2b5a.tar.gz
wallabag-64f81bc31699ed239e4becec1cfa7ebc0bef2b5a.tar.zst
wallabag-64f81bc31699ed239e4becec1cfa7ebc0bef2b5a.zip
Adds Webpack support and removes the use for Grunt
Signed-off-by: Thomas Citharel <tcit@tcit.fr> use scss Signed-off-by: Thomas Citharel <tcit@tcit.fr> fix build, add babel, fix annotations fixes (and improvements !) for baggy add live reload & environments & eslint & theme fixes
Diffstat (limited to 'app/config/webpack/dev.js')
-rw-r--r--app/config/webpack/dev.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/app/config/webpack/dev.js b/app/config/webpack/dev.js
new file mode 100644
index 00000000..771df65b
--- /dev/null
+++ b/app/config/webpack/dev.js
@@ -0,0 +1,62 @@
1const webpackMerge = require('webpack-merge');
2const webpack = require('webpack');
3const path = require('path');
4const commonConfig = require('./common.js');
5
6module.exports = function () {
7 return webpackMerge(commonConfig(), {
8 devtool: 'eval-source-map',
9 output: {
10 filename: '[name].dev.js'
11 },
12
13 devServer: {
14 hot: true,
15 // enable HMR on the server
16
17 contentBase: './web',
18 // match the output path
19 },
20 plugins: [
21 new webpack.HotModuleReplacementPlugin(),
22 ],
23 module: {
24 rules: [
25 {
26 enforce: 'pre',
27 test: /\.js$/,
28 loader: 'eslint-loader',
29 exclude: /node_modules/,
30 },
31 {
32 test: /\.js$/,
33 exclude: /(node_modules)/,
34 use: {
35 loader: 'babel-loader',
36 options: {
37 presets: ['env']
38 }
39 }
40 },
41 {
42 test: /\.(s)?css$/,
43 use: [
44 'style-loader',
45 {
46 loader: 'css-loader',
47 options: {
48 importLoaders: 1,
49 }
50 },
51 'postcss-loader',
52 'sass-loader'
53 ]
54 },
55 {
56 test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/,
57 use: 'url-loader'
58 },
59 ]
60 },
61 })
62};