Skip to content
Snippets Groups Projects
Commit 8ab2eb32 authored by Jack Reed's avatar Jack Reed
Browse files

Sets up source maps in development for better debugging experience

parent 836d5c2f
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ const babelLoaderConfig = {
},
};
module.exports = [
const baseConfig = [
{
entry: './src/store.js',
output: {
......@@ -92,3 +92,11 @@ module.exports = [
},
},
];
module.exports = (env, options) => {
const isProduction = options.mode === 'production';
return baseConfig.map((config) => {
config.devtool = !isProduction ? 'eval-source-map' : false; // eslint-disable-line no-param-reassign
return config;
});
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment