@preact/preset-vite
2.10.6 · 18 Jul 2026MIT1.4M / weekRepositoryHomepagenpmAtom feed
35 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 2.x · latest line
2.10.6
18 Jul 2026Prevent the CJS build from rewriting the hook names helper import to
require()
2.10.5
20 Mar 2026The
thisofconfig()isundefinedin vite 5Use
import()for zimmerframe in order to support CJS Vite configs.
2.10.4
15 Mar 2026Avoid babel in dev by using magic string for hook names injection
Add support for vite 8
Add support for oxc
2.10.3
27 Jan 2026Add jsx-runtime to aliases
Add support for mts/cts
Upgrade @rollup/pluginutils
What's Changed
Add jsx-runtime to aliases
Add support for mts/cts
Upgrade @rollup/pluginutils
2.10.2
27 Jun 2025Replaces kolorist with picocolors
Support vite v7
What's Changed
Replaces kolorist with picocolors
Support vite v7
2.10.1
2 Feb 2025Do not set jsxImportSource when using babel
2.10.0
19 Jan 2025Switch to
vite-prerender-pluginFix missing dependency error in Deno
2.9.1
13 Sep 2024Prerender data API
Ensure
preactis optimized by ViteSupport empty string returns in prerenderer
Features
Prerender data API
Bug Fixes
Ensure
preactis optimized by ViteSupport empty string returns in prerenderer
Unable to find TS types under ESM
Provide original, unpatched fetch impl on globalThis
2.9.0
11 Jul 2024Add preview middleware, fixing routing of prerendered HTML files
Support
.cjs&.mjsextensionslocation.toStringin prerender
Features
Add preview middleware, fixing routing of prerendered HTML files
Fixes
Support
.cjs&.mjsextensionslocation.toStringin prerender
2.8.3
23 Jun 2024Reading the note…
2.8.2
15 Mar 2024Reading the note…
2.8.1
2 Jan 2024Reading the note…
2.8.0
2 Jan 2024Prerender plugin
What's Changed
Prerender plugin
2.7.0
17 Nov 2023Silence Rollup's module-level directives warning #88 Thanks @rschristian
2.6.0
14 Oct 20232.5.0
14 Dec 2022Update peerDependencies to support Vite 4
Add some simple tests and GH workflow
Upgrade TypeScript target to ES2019
Update peerDependencies to support Vite 4
Add some simple tests and GH workflow
Upgrade TypeScript target to ES2019
Provide options to disable devtools and prefresh
Mention automatic aliasing as feature in ReadMe
2.4.0
7 Sep 2022Update prefresh to support signals
2.3.1
4 Sep 2022Reading the note…
2.3.0
27 Jun 2022Add support for vite 3 #50 thanks @sapphi-red
2.2.0
29 Mar 2022Add support for custom babel configuration
Use
jsx-dev-runtimefor development
2.1.7
28 Dec 2021Reading the note…
2.1.6
23 Dec 2021Reading the note…
2.1.5
18 Oct 2021Reading the note…
2.1.4
13 Oct 2021Reading the note…
2.1.3
4 Oct 2021Reading the note…
2.1.2
27 Sep 2021Reading the note…
2.1.1
27 Sep 2021Reading the note…
2.1.0
18 Apr 2021Add readable hook names in dev mode (#10, thanks @marvinhagemeister)
Switch to vite's built-in normalizePath (#8, thanks @marvinhagemeister)
2.0.1
24 Mar 2021Reading the note…
2.0.0
15 Mar 2021- Breaking
Switch from config factory function to array of plugins (#5, thanks @marvinhagemeister)
Fix
preact/debugnot being injected on windows (#7, thanks @marvinhagemeister)
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
- Breaking
Switch from config factory function to array of plugins (#5, thanks @marvinhagemeister)
Bug Fixes
Fix
preact/debugnot being injected on windows (#7, thanks @marvinhagemeister)
- 1.x
1.0.1
13 Mar 2021Reading the note…
1.0.0
12 Mar 2021Reading the note…
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.