Skip to content

Commit dc55d71

Browse files
authored
Merge pull request #75 from hbcarlos/source-map
Ignore blockly source map warnings
2 parents 7b315d5 + 4def374 commit dc55d71

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
// @ts-check
22

33
module.exports = /** @type { import('webpack').Configuration } */ ({
4-
devtool: 'source-map'
4+
devtool: 'source-map',
5+
module: {
6+
rules: [
7+
// Load Blockly source maps.
8+
{
9+
test: /(blockly\/.*\.js)$/,
10+
use: [require.resolve('source-map-loader')],
11+
enforce: 'pre',
12+
}
13+
].filter(Boolean),
14+
},
15+
// https://github.com/google/blockly-samples/blob/9974e85becaa8ad17e35b588b95391c85865dafd/plugins/dev-scripts/config/webpack.config.js#L118-L120
16+
ignoreWarnings: [/Failed to parse source map/]
517
});

0 commit comments

Comments
 (0)