我试图执行一个基本的Kotlin JS项目,但收到警告。请帮助解决这些警告。
Compiled with problems:X
WARNING
asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
WordCountWeb4.js (254 KiB)
WARNING
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (254 KiB)
WordCountWeb4.js
WARNING
webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
发布于 2022-07-27 06:21:12
这是webpack的极限。您可以使用KotlinWebpackConfig.Mode.DEVELOPMENT忽略此问题。
kotlin {
js(IR) {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport.enabled = true
mode = org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig.Mode.DEVELOPMENT
}
}
}
}https://stackoverflow.com/questions/73095308
复制相似问题