Jilles van Gurp
03/27/2023, 11:41 AM16 actionable tasks: 5 executed, 11 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jsBrowserProductionWebpack'.
> Module parse failed: Unterminated regular expression (144:33)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See <https://webpack.js.org/concepts#loaders>
| Companion_getInstance_3();
| var tmp1_div = 1000000.0;
> tmp$ret$0 = tmp0_div.if() / tmp1_div;
| tmp$ret$1 = new Pair(Unit_getInstance(), tmp$ret$0);
| tmp$ret$2 = tmp$ret$1.m4_1;
Module parse failed: Unterminated regular expression (341:33)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See <https://webpack.js.org/concepts#loaders>
| // Inline function 'kotlin.Long.div' call
| var tmp0_div = roundToLong(latitude * 1000000);
> tmp$ret$0 = tmp0_div.if() / 1000000.0;
| roundedLat = tmp$ret$0;
| var tmp$ret$1;
Pierre
03/30/2023, 7:46 AMjs(IR) {
useCommonJs()
browser {
webpackTask {
if (Configuration.shouldBeProductionVersion) {
mode = KotlinWebpackConfig.Mode.PRODUCTION
sourceMaps = false
}
}
commonWebpackConfig {
if (Configuration.shouldBeProductionVersion) {
mode = KotlinWebpackConfig.Mode.PRODUCTION
sourceMaps = false
}
}
}
}
The Configuration.shouldBeProductionVersion
flag is something that you would have to adapt to your build. In ours, it is set in a buildSrc kotlin file based on environmzent variables defined by our CI/CD pipeline.webpackTask
and commonWebpackConfig
blocks are required but it can't hurt.Jilles van Gurp
03/30/2023, 8:21 AM