Skip to content

Commit

Permalink
[ui-build] add strip-sourcemap-loader to remove 3rd party hardcoded m…
Browse files Browse the repository at this point in the history
…ap references
  • Loading branch information
bjornalm committed Jan 20, 2025
1 parent e67d150 commit 5c18a60
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"sass-loader": "11.1.1",
"snarkdown": "2.0.0",
"source-map-loader": "5.0.0",
"strip-sourcemap-loader": "0.0.1",
"style-loader": "2.0.0",
"styled-components": "6.0.8",
"stylelint": "16.7.0",
Expand Down
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ const config = {
enforce: 'pre',
use: ['source-map-loader']
},
// Remove hardcoded references to source map files in third party mjs-files
// since those files will be missing in our builds.
{
test: /\.mjs$/,
include: /node_modules/,
enforce: 'post',
loader: 'strip-sourcemap-loader'
},
{
test: /\.scss$/,
exclude: /node_modules/,
Expand Down

0 comments on commit 5c18a60

Please sign in to comment.