Releases: preactjs/preset-vite
Releases · preactjs/preset-vite
2.1.7
Create safer ending check by not excluding git substring #38 thanks @JoviDeCroock
2.1.6
- Add include/exclude options #28 thanks @ElMassimo
- Use
.js
extension when importing utils #30 thanks @dhaig - Do a single pass for hook-names and JSX #29 thanks @ElMassimo
- Pass include/exclude to Prefresh #32 thanks @NotWoods
- Support Vite 2.7.0 #36 thanks @JoviDeCroock
2.1.5
Bug Fixes
- Fix import specifiers with query parameters not being processed correctly. This avoids processing virtual modules in Vue single-file components (thanks @ElMassimo, #26)
2.1.4
Bug Fixes
- Switch from
jsxInject
to automatic jsx-runtime transform (thanks @JoviDeCroock, #25)
Full Changelog: v2.1.3...v2.1.4
2.1.3
2.1.2
- Add both CommonJS and ES Module entry points to support all environments.
2.1.1
- Fix compatibility with vite
>=2.5
2.1.0
Features
- Add readable hook names in dev mode (#10, thanks @marvinhagemeister)
Bug Fixes
- Do not return code from transform when not transforming (#9, thanks @piotr-cz)
- Switch to vite's built-in normalizePath (#8, thanks @marvinhagemeister)
2.0.1
Bug Fixes
- Fix "incorrect sourcemap" error (#9, thanks @piotr-cz)
- Switch to vite's built-in normalizePath (#8, thanks @marvinhagemeister)
2.0.0
Releasing this preset to the public sparked a discussion on how presets should be done in vite in general. It turns out that plugins can be an array of plugins and that this is the intended approach moving forward. Since this project is very new it was deemed better to do this breaking change now, rather than later when the userbase will be significantly larger.
To update change your vite configuration from wrapping your config:
import withPreact from "@preact/preset-vite";
export default withPreact({
// Your vite config
});
..to moving it to the plugin array:
import { defineConfig } from "vite";
import preact from "@preact/preset-vite";
export default defineConfig({
plugins: [preact()]
});
Breaking
- Switch from config factory function to array of plugins (#5, thanks @marvinhagemeister)
Bug Fixes
- Fix
preact/debug
not being injected on windows (#7, thanks @marvinhagemeister)