Skip to content

Commit 45b9ede

Browse files
committed
add webpack config
1 parent 49bd89b commit 45b9ede

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
},
8989
"jupyterlab": {
9090
"extension": true,
91-
"outputDir": "jupyterlab_lego_boost/labextension"
91+
"outputDir": "jupyterlab_lego_boost/labextension",
92+
"webpackConfig": "./webpack.config.js"
9293
}
9394
}

webpack.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// @ts-check
2+
3+
module.exports = /** @type { import('webpack').Configuration } */ ({
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/]
17+
});

0 commit comments

Comments
 (0)