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