- but mostly from http://jslog.com/2014/10/02/react-with-webpack-part-1
24 lines
562 B
JavaScript
24 lines
562 B
JavaScript
module.exports = {
|
|
entry: './main.js',
|
|
output: {
|
|
filename: 'bundle.js', // default, skippable
|
|
publicPath: 'http://localhost/assets'
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
// Tell webpack to use jsx-loader for all *.js/*.jsx files
|
|
test: /\.jsx?$/,
|
|
loader: 'jsx-loader?insertPragma=React.DOM&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']
|
|
}
|
|
};
|