-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
40 lines (39 loc) · 984 Bytes
/
webpack.config.js
File metadata and controls
40 lines (39 loc) · 984 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
var path = require('path');
var webpack = require('webpack');
var Dashboard = require('webpack-dashboard');
var DashboardPlugin = require('webpack-dashboard/plugin');
var dashboard = new Dashboard();
module.exports = {
entry: path.resolve(__dirname, './app/index.js'),
output: {
path: path.resolve(__dirname, './build/src'),
filename: 'bundle.js',
publicPath:'src/'
},
externals: {
"react": 'React',
"react-dom":'ReactDOM'
},
/*plugins: [ new webpack.optimize.CommonsChunkPlugin("init.js") ],*/
plugins: [
new DashboardPlugin(dashboard.setData)
],
module: {
loaders: [{
test: /\.(js|jsx)$/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
}
}, {
test: /\.css$/,
loader: 'style-loader!css-loader'
}, {
test: /\.less$/,
loader: 'style-loader!css-loader!less-loader'
},{
test: /\.(png|jpg)$/,
loader: 'url-loader?limit=25000'
}]
}
};