-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.client.config.js
52 lines (50 loc) · 1.06 KB
/
webpack.client.config.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpack = require('webpack');
module.exports = {
entry: {
index: './app/client.js'
},
output: {
path: './dist/client-bundle/',
filename: 'client.js',
sourceMapFilename: '[file].map'
},
node : {
__filename: true
},
devtool: 'source-map',
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['react', 'es2015', 'stage-2']
}
},
{
test: /(\.less$)|(\.css$)/,
loader: ExtractTextPlugin.extract('style', 'css!less')
},
{
test: /(\.png$)|(\.jpg$)/,
loader: 'file'
}
]
},
plugins: [
new ExtractTextPlugin('[name].css')
],
resolve: {
root: __dirname,
alias : {
COMPONENTS: 'app/client/UIcomponents',
STYLE: 'app/styles',
ENTITIES: 'app/client/UIcomponents/Entities',
REDUX: 'app/client/redux',
REQUEST: 'app/client/requests',
FAKE: 'app/fake-server'
}
}
}