run elm debug mode stuff
This commit is contained in:
parent
3b48cf585d
commit
ca08860b2f
@ -10,6 +10,7 @@ const FaviconsWebpackPlugin = require('favicons-webpack-plugin')
|
||||
const { JSDOM } = require('jsdom')
|
||||
const tempy = require('tempy')
|
||||
const fs = require('fs')
|
||||
const webpack = require('webpack')
|
||||
|
||||
const magicFile = (text) => {
|
||||
const p = tempy.file()
|
||||
@ -110,6 +111,7 @@ const productionPlugins = [
|
||||
];
|
||||
|
||||
let plugins = (env, argv) => [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new CopyPlugin([{ from: 'data', to: 'data' }, { from: 'wand.js', to: 'wand.js' }]),
|
||||
new HtmlWebpackPlugin({
|
||||
hash: true,
|
||||
@ -145,11 +147,17 @@ module.exports = (env, argv) => ({
|
||||
test: /\.elm$/,
|
||||
exclude: [/elm-stuff/, /node_modules/],
|
||||
use: [
|
||||
{ loader: 'elm-hot-webpack-loader' },
|
||||
{
|
||||
loader: 'elm-hot-webpack-loader',
|
||||
options: {
|
||||
debug: argv.mode != 'production',
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'elm-webpack-loader',
|
||||
options: {
|
||||
optimize: argv.mode == 'production'
|
||||
optimize: argv.mode == 'production',
|
||||
debug: argv.mode != 'production',
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -168,6 +176,11 @@ module.exports = (env, argv) => ({
|
||||
},
|
||||
],
|
||||
},
|
||||
devServer: {
|
||||
inline: true,
|
||||
hot: true,
|
||||
stats: 'errors-only'
|
||||
},
|
||||
optimization: {
|
||||
minimize: argv.mode == 'production',
|
||||
minimizer: [
|
||||
|
Loading…
Reference in New Issue
Block a user