Skip to content

Commit

Permalink
🔧(frontend) ignore @formatjs/fast-memoize source map
Browse files Browse the repository at this point in the history
Since the latest version of @formatjs, a warning during webpack
build is displayed. Actually, on source map generation, there is an
issue with the latest version of the package `@formatjs/fast-memoize`
So as a workaround, we tweak our webpack config to ignore this package
on source map generation.

formatjs/formatjs#4725
  • Loading branch information
jbpenrath committed Dec 3, 2024
1 parent 170267c commit 9cac139
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,16 @@ module.exports = (env) => {
},
},
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader' },
{
enforce: 'pre',
test: /\.js$/,
loader: 'source-map-loader',
options: {
filterSourceMappingUrl: (url, resourcePath) => {
return !/@formatjs\/fast-memoize/i.test(resourcePath);
},
},
},
],
},

Expand Down

0 comments on commit 9cac139

Please sign in to comment.