Skip to content

Commit

Permalink
Allow webpack to be aware of existing source-maps
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainMuller committed Sep 27, 2018
1 parent 96ac5d6 commit b743a13
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
47 changes: 47 additions & 0 deletions packages/jsii-runtime/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/jsii-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"jsii-build-tools": "^0.7.6",
"jsii-calc": "^0.7.6",
"nodeunit": "^0.11.3",
"source-map-loader": "^0.2.4",
"typescript": "^3.0.1",
"wasm-loader": "^1.3.0",
"webpack": "^4.12.0",
Expand Down
9 changes: 8 additions & 1 deletion packages/jsii-runtime/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
path: __dirname + '/webpack',
filename: 'jsii-runtime.js'
},
devtool: 'source-maps',
devtool: 'inline-source-map',
target: 'node',
node: {
console: false,
Expand All @@ -16,5 +16,12 @@ module.exports = {
__dirname: false,
Buffer: false,
setImmediate: false,
},
module: {
rules: [{
test: /\.js$/,
use: ['source-map-loader'],
enforce: 'pre'
}]
}
}

0 comments on commit b743a13

Please sign in to comment.