Skip to content
Snippets Groups Projects
Commit bbd109e1 authored by Chris Beer's avatar Chris Beer
Browse files

Try something to appease the build..

parent 6c8b94d5
Branches
Tags
No related merge requests found
...@@ -85,8 +85,8 @@ module.exports = function (api) { ...@@ -85,8 +85,8 @@ module.exports = function (api) {
], ],
}, },
], ],
'react-hot-loader/babel', isDevelopmentEnv && 'react-hot-loader/babel',
]; ].filter(Boolean);
return { return {
plugins, plugins,
......
...@@ -3,7 +3,8 @@ const webpack = require('webpack'); ...@@ -3,7 +3,8 @@ const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin');
const paths = require('./config/paths'); const paths = require('./config/paths');
const baseConfig = { /** */
const baseConfig = mode => ({
entry: ['react-hot-loader/patch', './src/polyfills.js', './src/index.js'], entry: ['react-hot-loader/patch', './src/polyfills.js', './src/index.js'],
module: { module: {
rules: [ rules: [
...@@ -15,6 +16,7 @@ const baseConfig = { ...@@ -15,6 +16,7 @@ const baseConfig = {
cacheCompression: true, cacheCompression: true,
cacheDirectory: true, cacheDirectory: true,
compact: true, compact: true,
envName: mode,
}, },
test: /\.(js|mjs|jsx)$/, test: /\.(js|mjs|jsx)$/,
}, },
...@@ -45,14 +47,14 @@ const baseConfig = { ...@@ -45,14 +47,14 @@ const baseConfig = {
}), }),
], ],
resolve: { extensions: ['.js'] }, resolve: { extensions: ['.js'] },
}; });
module.exports = (env, options) => { module.exports = (env, options) => {
const isProduction = options.mode === 'production'; const isProduction = options.mode === 'production';
if (isProduction) { if (isProduction) {
return { return {
...baseConfig, ...baseConfig(options.mode),
devtool: 'source-map', devtool: 'source-map',
mode: 'production', mode: 'production',
plugins: [ plugins: [
...@@ -65,7 +67,7 @@ module.exports = (env, options) => { ...@@ -65,7 +67,7 @@ module.exports = (env, options) => {
} }
return { return {
...baseConfig, ...baseConfig(options.mode),
devServer: { devServer: {
contentBase: './__tests__/integration/mirador', contentBase: './__tests__/integration/mirador',
hot: true, hot: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment