preset-vite

Preset for using Preact with the vite bundler

MIT License

Downloads
281.2K
Stars
242
Committers
19

Bot releases are hidden (Show)

preset-vite - 2.8.2 Latest Release

Published by rschristian 7 months ago

What's Changed

Full Changelog: https://github.com/preactjs/preset-vite/compare/2.8.1...2.8.2

preset-vite - 2.8.1

Published by rschristian 10 months ago

What's Changed

Full Changelog: https://github.com/preactjs/preset-vite/compare/2.8.0...2.8.1

preset-vite - 2.8.0

Published by rschristian 10 months ago

What's Changed

Full Changelog: https://github.com/preactjs/preset-vite/compare/2.7.0...2.8.0

preset-vite - 2.7.0

Published by JoviDeCroock 11 months ago

Features

  • Bump peer-depencies to support Vite 5.0.0 and onwards #90 Thanks @JoviDeCroock

Fixes

  • Silence Rollup's module-level directives warning #88 Thanks @rschristian
preset-vite - 2.6.0

Published by JoviDeCroock about 1 year ago

Features

  • Allow JSX Import Source to be overwritten #47
  • Allow users to opt out of compat aliases #79

Fixes

  • Move types export condition first #81
  • upgrade dependencies and add new stage 3 explicitResourceManagement #82
preset-vite - 2.5.0

Published by JoviDeCroock almost 2 years ago

  • Update peerDependencies to support Vite 4 by @Marco-Prontera in #69
  • Add some simple tests and GH workflow by @andrewiggins in #66
  • Upgrade TypeScript target to ES2019 by @andrewiggins in #67
  • Provide options to disable devtools and prefresh by @liamdon in #65
  • Mention automatic aliasing as feature in ReadMe by @rschristian in #63
preset-vite - 2.4.0

Published by marvinhagemeister about 2 years ago

What's Changed

preset-vite - 2.3.1

Published by marvinhagemeister about 2 years ago

Bug Fixes

preset-vite - 2.3.0

Published by JoviDeCroock over 2 years ago

Features

Add support for vite 3 https://github.com/preactjs/preset-vite/pull/50 thanks @sapphi-red

preset-vite - 2.2.0

Published by marvinhagemeister over 2 years ago

Features

Bug Fixes

preset-vite - 2.1.7

Published by JoviDeCroock almost 3 years ago

Create safer ending check by not excluding git substring #38 thanks @JoviDeCroock

preset-vite - 2.1.6

Published by JoviDeCroock almost 3 years ago

  • 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
preset-vite - 2.1.5

Published by marvinhagemeister almost 3 years ago

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)
preset-vite - 2.1.4

Published by marvinhagemeister about 3 years ago

Bug Fixes

  • Switch from jsxInject to automatic jsx-runtime transform (thanks @JoviDeCroock, #25)

Full Changelog: https://github.com/preactjs/preset-vite/compare/v2.1.3...v2.1.4

preset-vite - 2.1.3

Published by marvinhagemeister about 3 years ago

  • Fix ES-Module entry point using wrong extension in import source #23
preset-vite - 2.1.2

Published by marvinhagemeister about 3 years ago

  • Add both CommonJS and ES Module entry points to support all environments.
preset-vite - 2.1.1

Published by marvinhagemeister about 3 years ago

  • Fix compatibility with vite >=2.5
preset-vite - 2.1.0

Published by marvinhagemeister over 3 years ago

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)
preset-vite - 2.0.1

Published by marvinhagemeister over 3 years ago

Bug Fixes

  • Fix "incorrect sourcemap" error (#9, thanks @piotr-cz)
  • Switch to vite's built-in normalizePath (#8, thanks @marvinhagemeister)
preset-vite - 2.0.0

Published by marvinhagemeister over 3 years ago

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)