Remove duplicated source-map-loader configuring and cleanup kotlin webpack config writer

(cherry picked from commit 681eeaedfb359e85cf98e0e9a7239a0364a5d41c)
This commit is contained in:
ilgonmic
2019-07-13 15:13:21 +03:00
committed by Sergey Rostov
parent 3b78ef9cb2
commit deb6b7105a
@@ -186,7 +186,6 @@ data class KotlinWebpackConfigWriter(
use: ["source-map-loader"],
enforce: "pre"
});
config.module.rules.push({test: /\.js${'$'}/, use: ['source-map-loader'], enforce: 'pre'});
config.devtool = 'eval-source-map';
""".trimIndent()
@@ -223,7 +222,7 @@ data class KotlinWebpackConfigWriter(
const p = percentage*100;
let msg = Math.trunc(p/100) + Math.trunc(p%100) + '% ' + message + ' ' + args.join(' ');
${if (progressReporterPathFilter == null) "" else """
msg = msg.replace(new RegExp(${jsQuotedString(progressReporterPathFilter ?: "")}, 'g'), '');
msg = msg.replace(new RegExp(${jsQuotedString(progressReporterPathFilter)}, 'g'), '');
""".trimIndent()}
console.log(msg);
};