p5.js-web-editor/webpack.config.dev.js

42 lines
892 B
JavaScript
Raw Normal View History

2016-05-03 06:09:16 +02:00
var webpack = require('webpack');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: ['webpack-hot-middleware/client',
'./client/index.js',
],
output: {
path: __dirname + '/dist/',
filename: 'bundle.js',
publicPath: '/dist/'
},
resolve: {
extensions: ['', '.js', '.jsx'],
},
plugins: [
2016-06-23 00:36:04 +02:00
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env': {
CLIENT: JSON.stringify(true),
'NODE_ENV': JSON.stringify('development'),
}
})
2016-05-03 06:09:16 +02:00
],
module: {
loaders: [
{
2016-06-27 23:40:16 +02:00
test: /\.jsx?$/,
2016-05-03 06:09:16 +02:00
exclude: [/node_modules/, /.+\.config.js/],
2016-06-27 23:40:16 +02:00
loaders: ['babel?presets[]=react-hmre', 'eslint-loader']
2016-05-03 06:09:16 +02:00
},
2016-05-03 22:13:04 +02:00
{
2016-05-10 20:18:36 +02:00
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
2016-05-11 19:19:37 +02:00
},
{
test: /\.svg$/,
loader: 'file'
2016-05-03 22:13:04 +02:00
}
2016-05-03 06:09:16 +02:00
],
},
};