Skip to content

Commit

Permalink
Build system: fix source maps (#11293)
Browse files Browse the repository at this point in the history
* Build system: fix source maps

* Update webpack.conf.js

* turn off webpack optimization for unit tests
  • Loading branch information
dgirardi authored Apr 4, 2024
1 parent af21c55 commit e405ca9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions karma.conf.maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ function newWebpackConfig(codeCoverage, disableFeatures) {
mode: 'development',
devtool: 'inline-source-map',
});

delete webpackConfig.entry;
['entry', 'optimization'].forEach(prop => delete webpackConfig[prop]);

webpackConfig.module.rules
.flatMap((r) => r.use)
Expand Down
8 changes: 7 additions & 1 deletion webpack.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,16 @@ module.exports = {
const nodeModules = path.resolve('./node_modules');

return Object.assign(libraries, {
common_deps: {
name: 'common_deps',
test(module) {
return module.resource?.startsWith(nodeModules);
}
},
core: {
name: 'chunk-core',
test: (module) => {
return module.resource?.startsWith(core) || module.resource?.startsWith(nodeModules);
return module.resource?.startsWith(core);
}
},
paapi: {
Expand Down

0 comments on commit e405ca9

Please sign in to comment.