dispatch/client/webpack.config.dev.js

59 lines
1.4 KiB
JavaScript
Raw Normal View History

var path = require('path');
2015-12-28 23:34:32 +00:00
var webpack = require('webpack');
2018-05-25 01:27:53 +00:00
var autoprefixer = require('autoprefixer');
2015-12-28 23:34:32 +00:00
module.exports = {
2018-03-25 00:34:41 +00:00
mode: 'development',
2018-04-05 23:46:22 +00:00
entry: ['webpack-hot-middleware/client', './src/js/index'],
2015-12-28 23:34:32 +00:00
output: {
filename: 'bundle.js',
publicPath: '/'
},
resolve: {
alias: {
components: path.resolve(__dirname, 'src/js/components'),
containers: path.resolve(__dirname, 'src/js/containers'),
state: path.resolve(__dirname, 'src/js/state'),
utils: path.resolve(__dirname, 'src/js/utils')
}
},
2015-12-28 23:34:32 +00:00
module: {
2017-02-16 02:55:50 +00:00
rules: [
2018-04-05 23:46:22 +00:00
{
test: /\.js$/,
loader: 'eslint-loader',
exclude: /node_modules/,
enforce: 'pre',
options: {
fix: true
}
},
2017-02-16 02:55:50 +00:00
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
2018-05-25 01:27:53 +00:00
{
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: false
}
},
{
loader: 'postcss-loader',
options: {
plugins: [
require('postcss-flexbugs-fixes'),
autoprefixer({
flexbox: 'no-2009'
})
]
}
}
]
}
2015-12-28 23:34:32 +00:00
]
},
2018-04-05 23:46:22 +00:00
plugins: [new webpack.HotModuleReplacementPlugin()]
2015-12-28 23:34:32 +00:00
};