diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-10-23 11:09:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 11:09:17 +0200 |
commit | 1953a872932a63792293b4aec087880265ba89f7 (patch) | |
tree | fd16599e737fcdaf193c933ef3ec4a4ee248b117 /app/config/webpack/dev.js | |
parent | d83d25dadec2c38460a32d96f5d2903426fec9d3 (diff) | |
parent | 702f2d67d60ca963492b90dad74cb5f8dcc84e51 (diff) | |
download | wallabag-1953a872932a63792293b4aec087880265ba89f7.tar.gz wallabag-1953a872932a63792293b4aec087880265ba89f7.tar.zst wallabag-1953a872932a63792293b4aec087880265ba89f7.zip |
Merge pull request #3011 from wallabag/2.3
wallabag 2.3.0
Diffstat (limited to 'app/config/webpack/dev.js')
-rw-r--r-- | app/config/webpack/dev.js | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/app/config/webpack/dev.js b/app/config/webpack/dev.js new file mode 100644 index 00000000..97abc5eb --- /dev/null +++ b/app/config/webpack/dev.js | |||
@@ -0,0 +1,61 @@ | |||
1 | const webpackMerge = require('webpack-merge'); | ||
2 | const webpack = require('webpack'); | ||
3 | const commonConfig = require('./common.js'); | ||
4 | |||
5 | module.exports = function () { | ||
6 | return webpackMerge(commonConfig(), { | ||
7 | devtool: 'eval-source-map', | ||
8 | output: { | ||
9 | filename: '[name].dev.js', | ||
10 | }, | ||
11 | |||
12 | devServer: { | ||
13 | hot: true, | ||
14 | // enable HMR on the server | ||
15 | |||
16 | contentBase: './web', | ||
17 | // match the output path | ||
18 | }, | ||
19 | plugins: [ | ||
20 | new webpack.HotModuleReplacementPlugin(), | ||
21 | ], | ||
22 | module: { | ||
23 | rules: [ | ||
24 | { | ||
25 | enforce: 'pre', | ||
26 | test: /\.js$/, | ||
27 | loader: 'eslint-loader', | ||
28 | exclude: /node_modules/, | ||
29 | }, | ||
30 | { | ||
31 | test: /\.js$/, | ||
32 | exclude: /(node_modules)/, | ||
33 | use: { | ||
34 | loader: 'babel-loader', | ||
35 | options: { | ||
36 | presets: ['env'], | ||
37 | }, | ||
38 | }, | ||
39 | }, | ||
40 | { | ||
41 | test: /\.(s)?css$/, | ||
42 | use: [ | ||
43 | 'style-loader', | ||
44 | { | ||
45 | loader: 'css-loader', | ||
46 | options: { | ||
47 | importLoaders: 1, | ||
48 | }, | ||
49 | }, | ||
50 | 'postcss-loader', | ||
51 | 'sass-loader', | ||
52 | ], | ||
53 | }, | ||
54 | { | ||
55 | test: /\.(jpg|png|gif|svg|ico|eot|ttf|woff|woff2)$/, | ||
56 | use: 'url-loader', | ||
57 | }, | ||
58 | ], | ||
59 | }, | ||
60 | }); | ||
61 | }; | ||