unplugin-lezer
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()],
})
```