fix(build): ignore chardet missing sourcemaps (#4760)

pull/4969/head
Chaim Lev-Ari 2021-04-06 00:12:51 +03:00 committed by GitHub
parent 20cbeb698d
commit c04bbb5775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -22,7 +22,17 @@ module.exports = {
{
test: /\.js$/,
enforce: 'pre',
use: ['source-map-loader'],
use: [
{
loader: 'source-map-loader',
options: {
filterSourceMappingUrl: (_, resourcePath) => {
// ignores `chardet` missing sourcemaps
return !/node_modules\/chardet/i.test(resourcePath);
},
},
},
],
},
{
test: /\.js$/,