From 5820b7ff9aad557f283dade9f0c7bbd32a047c72 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 16 Jul 2019 23:33:02 +0200 Subject: [PATCH] use webpack.sourcemapdevtoolplugin for reliable sourcemaps --- terminus-community-color-schemes/webpack.config.js | 5 ++++- terminus-core/webpack.config.js | 5 ++++- terminus-plugin-manager/webpack.config.js | 5 ++++- terminus-settings/webpack.config.js | 5 ++++- terminus-ssh/webpack.config.js | 11 +++++++++-- terminus-terminal/webpack.config.js | 5 ++++- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/terminus-community-color-schemes/webpack.config.js b/terminus-community-color-schemes/webpack.config.js index a6d25e51..4539a246 100644 --- a/terminus-community-color-schemes/webpack.config.js +++ b/terminus-community-color-schemes/webpack.config.js @@ -4,7 +4,6 @@ const webpack = require('webpack') module.exports = { target: 'node', entry: 'src/index.ts', - devtool: 'source-map', context: __dirname, output: { path: path.resolve(__dirname, 'dist'), @@ -51,5 +50,9 @@ module.exports = { ], plugins: [ new webpack.optimize.ModuleConcatenationPlugin(), + new webpack.SourceMapDevToolPlugin({ + exclude: [/node_modules/, /vendor/], + filename: '[file].map', + }), ], } diff --git a/terminus-core/webpack.config.js b/terminus-core/webpack.config.js index 9d74f668..bb256113 100644 --- a/terminus-core/webpack.config.js +++ b/terminus-core/webpack.config.js @@ -4,7 +4,6 @@ const webpack = require('webpack') module.exports = { target: 'node', entry: 'src/index.ts', - devtool: 'source-map', context: __dirname, mode: 'development', output: { @@ -61,5 +60,9 @@ module.exports = { ], plugins: [ new webpack.optimize.ModuleConcatenationPlugin(), + new webpack.SourceMapDevToolPlugin({ + exclude: [/node_modules/, /vendor/], + filename: '[file].map', + }), ], } diff --git a/terminus-plugin-manager/webpack.config.js b/terminus-plugin-manager/webpack.config.js index 3f9ac3fb..faa7a140 100644 --- a/terminus-plugin-manager/webpack.config.js +++ b/terminus-plugin-manager/webpack.config.js @@ -4,7 +4,6 @@ const webpack = require('webpack') module.exports = { target: 'node', entry: 'src/index.ts', - devtool: 'source-map', context: __dirname, output: { path: path.resolve(__dirname, 'dist'), @@ -56,5 +55,9 @@ module.exports = { ], plugins: [ new webpack.optimize.ModuleConcatenationPlugin(), + new webpack.SourceMapDevToolPlugin({ + exclude: [/node_modules/, /vendor/], + filename: '[file].map', + }), ], } diff --git a/terminus-settings/webpack.config.js b/terminus-settings/webpack.config.js index 6a0a0f9f..d613b8fb 100644 --- a/terminus-settings/webpack.config.js +++ b/terminus-settings/webpack.config.js @@ -4,7 +4,6 @@ const webpack = require('webpack') module.exports = { target: 'node', entry: 'src/index.ts', - devtool: 'source-map', context: __dirname, mode: 'development', output: { @@ -58,5 +57,9 @@ module.exports = { ], plugins: [ new webpack.optimize.ModuleConcatenationPlugin(), + new webpack.SourceMapDevToolPlugin({ + exclude: [/node_modules/, /vendor/], + filename: '[file].map', + }), ], } diff --git a/terminus-ssh/webpack.config.js b/terminus-ssh/webpack.config.js index 5baa8c87..9279e401 100644 --- a/terminus-ssh/webpack.config.js +++ b/terminus-ssh/webpack.config.js @@ -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', + }), + ], } diff --git a/terminus-terminal/webpack.config.js b/terminus-terminal/webpack.config.js index b5d81e98..285cce15 100644 --- a/terminus-terminal/webpack.config.js +++ b/terminus-terminal/webpack.config.js @@ -4,7 +4,6 @@ const webpack = require('webpack') module.exports = { target: 'node', entry: 'src/index.ts', - devtool: 'source-map', context: __dirname, output: { path: path.resolve(__dirname, 'dist'), @@ -77,5 +76,9 @@ module.exports = { ], plugins: [ new webpack.optimize.ModuleConcatenationPlugin(), + new webpack.SourceMapDevToolPlugin({ + exclude: [/node_modules/, /vendor/], + filename: '[file].map', + }), ], }