Ilya Goncharov [JB]
06/29/2019, 9:11 AMcompileKotlinJs {
kotlinOptions {
sourceMapEmbedSources = "always"
}
}
But I think, it should be more elegantDico
06/29/2019, 1:25 PMIlya Goncharov [JB]
06/29/2019, 1:59 PMDico
06/29/2019, 2:15 PMRoman Artemev [JB]
06/29/2019, 7:26 PMIlya Goncharov [JB]
06/29/2019, 8:37 PMlouiscad
06/29/2019, 11:41 PMIlya Goncharov [JB]
06/30/2019, 7:33 AMsnrostov
06/30/2019, 4:38 PMsource-map-loader
webpack plugin should load source maps from corresponding .js.map
files, so sourceMapEmbedSources = "always"
is not required. source-map-loader
should be configured by default. Please show your webpack.config.js
in build/js/packages/<compilation name>
folder.
This code should do this job:
// source maps
config.module.rules.push({
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre"
});
config.module.rules.push({test: /\.js$/, use: ['source-map-loader'], enforce: 'pre'});
config.devtool = 'eval-source-map';
// source maps runtime
if (!config.entry) config.entry = [];
config.entry.push('source-map-support/browser-source-map-support.js');
Ilya Goncharov [JB]
07/01/2019, 6:49 AM// source maps
config.module.rules.push({
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre"
});
config.module.rules.push({test: /\.js$/, use: ['source-map-loader'], enforce: 'pre'});
config.devtool = 'eval-source-map';
// source maps runtime
if (!config.entry) config.entry = [];
config.entry.push('source-map-support/browser-source-map-support.js');
But when I run application, I can find my source files, but it has empty content
I guess, it is due to output source maps
It has empty "names" field, and mapping doen't work
If I use sourceMapEmbedSources, it fills "sourcesContent" field
If it matters, it is reproduced on windowssnrostov
07/01/2019, 7:01 AMsource-map-loader
webpack plugin should load source contents from source files by relative urls from source maps, but fails to do it for some reason. Will fix, thanks for report.snrostov
07/01/2019, 7:35 AMsource-map-loader
webpack plugin. It loads source contents only when sourcesContent is empty or sourcesContent.length < sources.length. But in your case we have non empty sourcesContent with some nulls. source-map-loader doesn’t support this case.snrostov
07/01/2019, 7:36 AMsource-map-loader
.snrostov
07/01/2019, 9:06 AMsource-map-loader/index.js
with this file