| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- const webpack = require('webpack');
- module.exports = {
- entry: [
- 'webpack-dev-server/client?http://localhost:8080',
- 'webpack/hot/only-dev-server',
- 'react-hot-loader/patch',
- 'babel-polyfill',
- './src/index.js'
- ],
- module: {
- loaders: [
- {
- test: /\.jsx?$/,
- exclude: /node_modules/,
- loaders: ['react-hot-loader/webpack', 'babel-loader']
- }
- ]
- },
- resolve: {
- extensions: ['*', '.js', '.jsx']
- },
- output: {
- path: __dirname + '/build',
- publicPath: '/',
- filename: 'bundle.js'
- },
- devServer: {
- contentBase: './public',
- hot: true
- },
- plugins: [
- new webpack.optimize.ModuleConcatenationPlugin(),
- new webpack.DefinePlugin({
- 'process.env': {
- NODE_ENV: JSON.stringify('production')
- }
- })
- ]
- };
|