Created
November 25, 2017 05:27
-
-
Save petermoresi/a62659ff0bfc52e69a7ac075a480d3a6 to your computer and use it in GitHub Desktop.
This file contains 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 path = require('path'); | |
var webpack = require('webpack'); | |
var hotMiddlewareScript = 'webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=true'; | |
module.exports = { | |
devtool: 'source-map', | |
entry: { | |
app: ['webpack-hot-middleware/client', './client/App'] | |
}, | |
output: { | |
path: path.join(__dirname, 'public', 'js'), | |
filename: 'app.js', | |
publicPath: '/js/' | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoEmitOnErrorsPlugin(), | |
new webpack.NamedModulesPlugin(), | |
new webpack.DefinePlugin({ | |
'process.env': { | |
'NODE_ENV': JSON.stringify('development') | |
} | |
}) | |
], | |
module: { | |
loaders: [{ | |
test: /\.js$/, | |
loaders: ['babel-loader'], | |
include: path.join(__dirname, 'client') | |
}, { | |
test: /\.(css|scss|sass)$/, | |
loaders: ['style-loader', 'css-loader', 'sass-loader'] | |
}] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment