Skip to content
Snippets Groups Projects
Unverified Commit d1099b56 authored by Johannes Baiter's avatar Johannes Baiter Committed by GitHub
Browse files

Merge pull request #1612 from ProjectMirador/1599-setup-sourcemaps-in-development

Sets up source maps in development for better debugging experience
parents 06d0516b 8ab2eb32
Branches
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 register or to comment