Tags: CLOVIS-AI/Vite-Kotlin
Tags
Vite 8 beta support, experimental WasmJS support, bug fixes ### Important - Kotlin users: you may need to upgrade your Node version. See the 'Kotlin' section below. - Kotlin users: the production output directory has changed from `build/vite/dist` to `build/vite/js/dist`. ### Base - Upgraded to Vite 8.0.0-beta.2 (#69, !141) - Added the [`config.autoRewriteIndex`](https://vite-kotlin.opensavvy.dev/api/-vite%20for%20-gradle/opensavvy.gradle.vite.base.config/-vite-config/auto-rewrite-index.html) option to more easily support mixed Webpack/Vite projects (#66, !124) ### Kotlin This release updates the Vite version, and new Vite versions require a newer NodeJS version than the one shipped by default by the Kotlin Gradle Plugin. For the build to work, you may need to upgrade the NodeJS version you're using as well. To do so, open the root `build.gradle.kts` file and add: ```kotlin project.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsPlugin> { project.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec>().version = "24.12.0" } ``` This information has also been added to the [Troubleshooting section of the getting started guide](https://vite-kotlin.opensavvy.dev/guides/index.html#troubleshooting). - Added experimental WasmJS support (#46, #127, #137) - Added the `:vitePreview` task to serve the production output locally (66ba462) - Fixed the default target which was incorrect, replaced it with `"es2015"` (9c047b0) - Fixed external plugins (`config.plugin()`) which were not correctly applied (#65, !139) - Removed the default plugins `@rollup/plugin-commonjs` and `vite-plugin-top-level-await`, as they are not needed with Vite 8. If you want to continue using Vite 7, you may need to explicitly add them to your build (!141) ### Documentation - Moved the Troubleshooting section from the main page to the [Getting started guide](https://vite-kotlin.opensavvy.dev/guides/index.html#troubleshooting). ### Dependencies - Gradle 9.2.0 - Kotlin 2.2.21 ### Internal changes In this release, we have improved our automated test suites, which should make bugs rarer. ### Special thanks Thanks to Robert Jaros, the author of the KotlinJS frameworks [Kilua](https://kilua.dev/) and [KVision](https://kvision.io/), who contributed most of the improvements in this release. Since Kilua 0.0.27, you can also find our Vite plugin in the [Kilua project creation wizard in IntelliJ](https://plugins.jetbrains.com/plugin/27530-kilua-project-wizard)!
ES6 plugins support, stability and performance improvements ### Base - By default, the Vite configuration file is now called `vite.config.mjs` instead of `vite.config.js`, to allow usage of ES6 plugins (!120) - Do not reload the app when Kotlin files change, wait until the generated JS files change (!121) ### Kotlin - Fixed the exec tasks did not correctly inherit the configuration of the write tasks (01d20ed) - Fixed the source maps were not configured correctly, they now work for the current module (!122) - The Vite working directory is now generated from the compiler output and resources directly, without an intermediary copy (!123)
Documentation and configuration improvements ### Base - Better code highlighting when declaring plugins (!119) ### Kotlin - The execution tasks (`viteRun` and `viteBuild`) now inherit from the writing tasks (!119) - Test ESM support (!119) - Test ES2015 support (!119) ### Documentation - Added a [Getting started guide](https://vite-kotlin.opensavvy.dev/guides/) (!119) - Added [an article on ESM and its benefits](https://vite-kotlin.opensavvy.dev/guides/esm.html) (!119) - Added [an article on ES2015 and its benefits](https://vite-kotlin.opensavvy.dev/guides/es2015.html) (!119)
Development-mode performance and bug fixes ### Vite for Kotlin - Fixed "Maximum call stack exceeded" on large projects (#57, !113) - Vite now only reloads changed files in development mode, instead of always reloading all files (#63, !116) ### Dependencies - Replaced `@originjs/vite-plugin-commonjs` with `vite-plugin-commonjs` 0.10.4 (2924ee5, #57, !113) - `@rollup/plugin-commonjs` 28.0.6 (!113)
Server options and the new documentation website ### Base - Added `server.host` (#59, !108) - Added `server.port` (#59, !108) - Added `server.strictPort` (#59, !108) - Added `server.proxy` (#59, !108) ### Kotlin ### Documentation - Moved the documentation website to [https://vite-kotlin.opensavvy.dev/](https://vite-kotlin.opensavvy.dev/)
New documentation website ### Vite for Gradle - Added the option `publicDir` (!106) ### Vite for Kotlin - The browser can now see the Kotlin source files. This is a first step towards fully-functioning source maps (d70b631, !106) ### Documentation - Added a new landing page at https://vite-kotlin.opensavvy.dev/docs/ (#54, !105) ### Dependencies - Gradle 8.14.3 support
PreviousNext