fix parse5 sourcemap warnings

This commit is contained in:
David Reed 2022-11-26 15:08:57 -05:00
parent e891c6a831
commit a9c94002ae
No known key found for this signature in database
GPG key ID: 2211691D8A1EE72F

View file

@ -28,13 +28,21 @@ const config = {
module: {
rules: [
{
test: /\.js$/,
test: /\.(js|mjs)$/,
enforce: 'pre',
use: ['source-map-loader'],
use: [
{
loader: 'source-map-loader',
options: {
filterSourceMappingUrl: (url, resourcePath) =>
// parse5 references sourcemaps but doesn't publish them
!resourcePath.includes('parse5'),
},
},
],
},
],
},
ignoreWarnings: [/Failed to parse source map/],
optimization: {
minimize: !isDevelopment,
minimizer: [