-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.client.config.js
More file actions
45 lines (44 loc) · 987 Bytes
/
webpack.client.config.js
File metadata and controls
45 lines (44 loc) · 987 Bytes
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
37
38
39
40
41
42
43
44
45
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: {
index: [
'babel-polyfill',
'./src/index.js'
]
},
output: {
path: path.join(__dirname, 'build'),
filename: '[name].js'
},
target: 'web',
module: {
loaders: [{
loader: 'babel-loader',
test: /\.js$/,
include: [path.resolve(__dirname, 'src')],
exclude: /node_modules/,
query: {
presets: ['react', 'es2015', 'stage-0']
}
}, {
loader: 'json-loader',
test: /\.json$/,
exclude: /node_modules/
}, {
loader: ExtractTextPlugin.extract('style', 'css?modules&localIdentName=[local]__[hash:base64:5]!sass?sourceMap'),
test: /\.scss$/,
exclude: /node_modules/
}]
},
resolve: {
modulesDirectories: [
'./node_modules',
'./src'
]
},
plugins: [
new ExtractTextPlugin('styles.css')
]
};