2015-12-28 23:34:32 +00:00
|
|
|
var path = require('path');
|
|
|
|
var webpack = require('webpack');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
devtool: 'eval',
|
|
|
|
entry: [
|
|
|
|
'webpack-hot-middleware/client',
|
|
|
|
'./src/js/index'
|
|
|
|
],
|
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, 'dist'),
|
|
|
|
filename: 'bundle.js',
|
|
|
|
publicPath: '/'
|
|
|
|
},
|
|
|
|
module: {
|
2017-02-16 02:55:50 +00:00
|
|
|
rules: [
|
|
|
|
{ test: /\.js$/, loader: 'eslint-loader', exclude: /node_modules/, enforce: 'pre' },
|
|
|
|
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
|
|
|
|
{ test: /\.css$/, loader: 'style-loader!css-loader' },
|
|
|
|
{ test: /node_modules/, loader: 'ify-loader' }
|
2015-12-28 23:34:32 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin({
|
2017-02-16 02:55:50 +00:00
|
|
|
DEV: true,
|
2015-12-28 23:34:32 +00:00
|
|
|
}),
|
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
|
|
new webpack.NoErrorsPlugin()
|
|
|
|
]
|
|
|
|
};
|