-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
32 lines (32 loc) · 936 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
var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var webpack = require('webpack');
module.exports = {
plugins: [
new ExtractTextPlugin("[name].css"),
new webpack.optimize.UglifyJsPlugin(),
new webpack.ProvidePlugin({
$: 'jquery',
}),
],
entry: {
"main" : './src/entry.js',
"other" : './src/other.js'
},
output:{
path : path.join(__dirname,'out'),
publicPath: './out/',
filename: '[name].bundle.js'
},
externals:{
'react' : 'React'
},
module:{
loaders: [
{ test: /\.js$/, loader: "jsx!babel", include: /src/},
{ test: /\.css$/, loader: "style!css"},
{ test: /\.scss$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader")},
{ test: /\.(jpg|png|svg)$/, loader: "url?limit=8192"}
]
}
};