forked from legomushroom/port
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack-prod.config.js
31 lines (29 loc) · 963 Bytes
/
webpack-prod.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
var webpack = require('webpack');
module.exports = {
watch: true,
entry: [
__dirname + '/src/app.jsx'
],
module: {
loaders: [
{ test: /\.(jsx|es6)$/, exclude: /node_modules/, loaders: ['6to5-loader?optional=coreAliasing'] },
{ test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader?paths=node_modules/' }
],
noParse: [__dirname + '/node_modules/react/dist/react-with-addons.min.js']
},
output: {
path: __dirname + '/dist',
filename: 'app.prod.js'
},
resolve: {
extensions: ['', '.js', '.jsx', '.es6', '.styl'],
alias: {
'react$': __dirname + '/node_modules/react/dist/react-with-addons.min.js',
'react/addons$': __dirname + '/node_modules/react/dist/react-with-addons.min.js'
}
},
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin()
]
};