-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
38 lines (36 loc) · 979 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
var path = require('path');
var StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
module.exports = {
entry: {
server: './assets/js/server.js',
client: './assets/js/client.jsx'
},
output: {
filename: '[name]-[chunkhash].js',
publicPath: 'http://localhost:8090/static',
path: 'tornado_react_demo/static/js',
libraryTarget: 'this'
},
module: {
loaders: [
{
test: /\.jsx$/,
loader: 'jsx-loader?harmony'
}
]
},
externals: {
//don't bundle the 'react' npm package with our bundle.js
//but get it from a global 'React' variable
//'react': 'React'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
plugins: [
new StatsWriterPlugin({
path: path.join(__dirname, 'tornado_react_demo', 'data'),
filename: 'manifest.json'
})
]
};