-
Notifications
You must be signed in to change notification settings - Fork 47
/
client.js
36 lines (35 loc) · 1 KB
/
client.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const merge = require('webpack-merge');
const webpack = require('webpack');
const common = require('./common');
const join = require('path').join;
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
module.exports = merge(common, {
mode: 'development',
name: 'client',
target: 'web',
entry: [
'webpack-hot-middleware/client',
join(__dirname, '../src/client/index')
],
devtool: 'inline-source-map',
output: {
filename: 'app.client.js',
chunkFilename: '[name].chunk.js'
},
module: {
rules: [{
test: /\.styl$/,
use: [ExtractCssChunksPlugin.loader, {
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]--[hash:base64:5]'
}
}, 'stylus-loader']
}]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new ExtractCssChunksPlugin()
]
});