illright / unplugin-lezer

Universal plugin to import Lezer grammar files
https://www.npmjs.com/package/unplugin-lezer
MIT License
1 stars 1 forks source link
esbuild grammar lezer rollup unplugin vite webpack

unplugin-lezer

NPM version

Universal plugin to import Lezer grammar files.

Install

npm i unplugin-lezer
Vite
```ts // vite.config.ts import lezer from 'unplugin-lezer/vite' export default defineConfig({ plugins: [ lezer(), ], }) ``` Example: [`playground/`](./playground/)
Rollup
```ts // rollup.config.js import lezer from 'unplugin-lezer/rollup' export default { plugins: [ lezer(), ], } ```
Webpack
```ts // webpack.config.js module.exports = { /* ... */ plugins: [ require('unplugin-lezer/webpack')() ] } ```
Vue CLI
```ts // vue.config.js module.exports = { configureWebpack: { plugins: [ require('unplugin-lezer/webpack')(), ], }, } ```
esbuild
```ts // esbuild.config.js import { build } from 'esbuild' import lezer from 'unplugin-lezer/esbuild' build({ plugins: [lezer()], }) ```