@open-xchange/vite-plugin-es-decorators
v0.0.1
Published
Vite plugin that adds support for native ES decorators in JS source files
Downloads
780
Maintainers
Keywords
Readme
@open-xchange/vite-plugin-es-decorators
A Vite plugin that adds support for native ES decorators in JS source files.
Usage
Add the plugin to your Vite configuration:
// vite.config.ts
import { defineConfig } from "vite" // or "vitest/config"
import decoratorsPlugin from "@open-xchange/vite-plugin-es-decorators"
export default defineConfig(() => {
// ...
plugins: [
// ...
decoratorsPlugin(),
],
})
Vite will now send all JS source files to the Babel parser which will transpile ES decorators using the plugin @babel/plugin-proposal-decorators.