/
webpack.config.js
46 lines (43 loc) · 998 Bytes
/
webpack.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
var Path=require('path');
var OpenBrowserPlugin=require('open-browser-webpack-plugin');
var node_modules=Path.resolve(__dirname, 'node_modules');
var config={
entry: {
main:[
'webpack/hot/dev-server',
'webpack-dev-server/client?http://localhost:8888',
Path.resolve(__dirname,'./js/app.js')
],
other: Path.resolve(__dirname,'./js/other.js')
},
resolve: {
extentions: ['','.js','.jsx']
},
output: {
path: Path.resolve(__dirname,'./'),
filename: '[name].js'
},
module: {
loaders: [{
test: /\.jsx?$/,
loader: 'babel',
exculde: /node_modules/,
query: {
presets: ['react','es2015']
}
},{
test: /\.css$/,
loader: 'style!css'
},{
test: /\.scss$/,
loader: 'style!css!sass'
},{
test: /\.(png|jpg|gif|eot|svg|ttf|woff)\??.*$/,
loader: 'url?limit=25000&name=[path][name].[ext]'
},]
},
plugins: [
new OpenBrowserPlugin({url: 'http://localhost:8888'})
]
};
module.exports=config;