You may have to configure the source map for the different bootloaders separately.
For 'ng-annotate-loader' ( Docs )
use: [{ loader: 'ng-annotate-loader', options: { add: true, single_quotes: true , map: { inline: true, inFile: 'app.js', sourceRoot: __dirname + '/app' }} }]
For less you can use documentation like @ahmedelgabri
use: [{ loader: "style-loader" }, { loader: "css-loader", options: { sourceMap: true } }, { loader: "less-loader", options: { sourceMap: true } }]
Old post before changing gigub OP.
Another option is to add devtoolLineToLine: true to your output if you want to use devtool: 'source-map' . But devtoolLineToLine is deprecated, so consider changing devtool to something else. devtool: source map demo
output: isTest ? {} : { devtoolLineToLine: true, // <= this line sourceMapFilename: '[name].map', path: __dirname + '/dist', filename: '[name].bundle.js', publicPath: publicPath },
Alternatively you can use devtool: 'eval' or some version of eval like cheap-module-eval-source-map (similar behavior, but without file names) also works fine for me
source share