diff --git a/config/webpack.common.config.js b/config/webpack.common.config.js index 62c3aa348..871e2b937 100644 --- a/config/webpack.common.config.js +++ b/config/webpack.common.config.js @@ -19,4 +19,22 @@ module.exports = { }, extensions: ['.js', '.jsx'], }, + ignoreWarnings: [ + // Ignore warnings raised by source-map-loader. + // some third party packages may ship miss-configured sourcemaps, that interrupts the build + // See: https://github.com/facebook/create-react-app/discussions/11278#discussioncomment-1780169 + /** + * + * @param {import('webpack').WebpackError} warning + * @returns {boolean} + */ + function ignoreSourcemapsloaderWarnings(warning) { + return ( + warning.module + && warning.module.resource.includes('node_modules') + && warning.details + && warning.details.includes('source-map-loader') + ); + }, + ], };