Created
May 14, 2015 21:00
-
-
Save eyy/7aa1b1bbfb6e4cb6e4f4 to your computer and use it in GitHub Desktop.
webpack react hi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"dev": "webpack-dev-server --inline --hot" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack') | |
module.exports = { | |
entry: './app/index', | |
output: { | |
path: __dirname + '/public', | |
filename: 'bundle.js' | |
}, | |
plugins: [ | |
new webpack.IgnorePlugin(/^\.\/locale$/, /mo,ment$/), | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoErrorsPlugin() | |
], | |
module: { | |
loaders: [ | |
{ test: /\.js$/, exclude: /node_modules/, loaders: ['react-hot', 'babel-loader'] }, | |
{ test: /\.jsx$/, loaders: ['react-hot', 'babel-loader'] } | |
] | |
}, | |
//externals: { | |
// 'react': 'React' | |
//}, | |
devServer: { | |
contentBase: './public' | |
}, | |
devtool: 'source-map' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment