1.0.3 • Published 9 months ago
@open-xchange/vite-plugin-es-decorators v1.0.3
@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.