use webpack.sourcemapdevtoolplugin for reliable sourcemaps

This commit is contained in:
Eugene Pankov
2019-07-16 23:33:02 +02:00
parent ce49dd9dae
commit 5820b7ff9a
6 changed files with 29 additions and 7 deletions

View File

@@ -1,9 +1,9 @@
const path = require('path')
const webpack = require('webpack')
module.exports = {
target: 'node',
entry: 'src/index.ts',
devtool: 'source-map',
context: __dirname,
output: {
path: path.resolve(__dirname, 'dist'),
@@ -54,5 +54,12 @@ module.exports = {
/^@angular/,
/^@ng-bootstrap/,
/^terminus-/,
]
],
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.SourceMapDevToolPlugin({
exclude: [/node_modules/, /vendor/],
filename: '[file].map',
}),
],
}