is there a way to replace webpack with something f...
# javascript
b
is there a way to replace webpack with something faster like esbuild? I'm not looking for a fully featured solution like Vite which has additional requirements like an index.html, I'm purely looking for a faster bundler
1
b
You can run esbuild manually on the generated JavaScript file. Or, if you want to run esbuild as part of your Gradle build, you can create a Gradle task that would run esbuild on the output of the Kotlin/JS compilation task.
b
right, looking at build/js it seems that the kotlin compile task writes it's output into that folder
I'm unsure however if esbuild works on that file structure
t
Vite is here!
b
thanks!
I suppose you absolutely need an index.html file
🚫 1
I've just got a main file, nothing that really needs HTML
nvm, there's a config option for an entrypoint https://vite.dev/guide/backend-integration.html
t
> I suppose you absolutely need an index.html file Default configuration entry point - JS file 😉
b
perfect
t
If you will need something more - you can copy and modify default KFC config
b
do you have an example config lying around?
or is it just: enable the plugin, place a vite.config.mjs and you're done?
t
It will work even without
vite.config.mjs
😉
b
what about tests?
works out of the box with kotlin test?
t
They work fine on Webpack + Karma 🧌
f
Love me some kfc
🙂 1