2018-01-12 11:41:02 +00:00
|
|
|
const merge = require('webpack-merge')
|
2019-11-28 10:20:22 +00:00
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
2018-01-12 11:41:02 +00:00
|
|
|
|
|
|
|
const base = require('./webpack.config')
|
|
|
|
|
|
|
|
module.exports = merge(base, {
|
2019-08-06 12:20:02 +00:00
|
|
|
mode: 'development',
|
|
|
|
|
|
|
|
// Enable source maps for dev (fast compilation, slow runtime)
|
|
|
|
devtool: 'cheap-module-eval-source-map',
|
|
|
|
|
2019-11-28 10:20:22 +00:00
|
|
|
plugins: [
|
|
|
|
// Extract CSS to a separate file (rather than inlining to a <style> tag)
|
|
|
|
new MiniCssExtractPlugin({
|
|
|
|
// Output to public/stylesheets directory
|
|
|
|
filename: 'stylesheets/[name].css'
|
|
|
|
})
|
|
|
|
],
|
|
|
|
|
2019-08-06 12:20:02 +00:00
|
|
|
devServer: {
|
|
|
|
// Disable webpack dev server auto-reload
|
|
|
|
inline: false,
|
|
|
|
|
|
|
|
// Expose dev server as localhost with dev box
|
|
|
|
host: '0.0.0.0',
|
|
|
|
port: 3808,
|
|
|
|
|
|
|
|
// Customise output to the (node) console
|
|
|
|
stats: {
|
|
|
|
colors: true, // Enable some coloured highlighting
|
|
|
|
// Hide some overly verbose output
|
2019-10-16 10:10:54 +00:00
|
|
|
performance: false, // Disable as code is uncompressed in dev mode
|
2019-08-06 12:20:02 +00:00
|
|
|
hash: false,
|
|
|
|
version: false,
|
2019-10-16 10:10:54 +00:00
|
|
|
chunks: false,
|
|
|
|
modules: false,
|
2019-10-30 11:19:44 +00:00
|
|
|
// Hide copied assets from output
|
2019-11-28 10:20:22 +00:00
|
|
|
excludeAssets: [/^js\/ace/, /^js\/libs/, /^js\/cmaps/]
|
2019-08-06 12:20:02 +00:00
|
|
|
}
|
|
|
|
}
|
2018-01-12 11:41:02 +00:00
|
|
|
})
|