refactor: webpack configuration (#398)

* refactor: webpack configuration

* feat: webpack hot reloading

Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
This commit is contained in:
Johnny A
2020-05-07 12:11:44 -04:00
committed by GitHub
parent 78e4ae0a16
commit e61cb53c75
5 changed files with 40 additions and 17 deletions

17
webpack.dev.js Normal file
View File

@@ -0,0 +1,17 @@
const merge = require('webpack-merge');
const config = require('./webpack.config.js');
module.exports = merge(config, {
mode: 'development',
devtool: 'source-map',
devServer: {
publicPath: '/dist/',
proxy: {
'/extensions': {
target: 'http://localhost:3001',
pathRewrite: { '^/extensions': '/public/extensions' }
}
},
port: 3001
}
});