1.0.0 • Published 6 months ago

unplugin-lezer v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

unplugin-lezer

NPM version

Universal plugin to import Lezer grammar files.

Install

npm i unplugin-lezer
// vite.config.ts
import lezer from 'unplugin-lezer/vite'

export default defineConfig({
  plugins: [
    lezer(),
  ],
})

Example: playground/

// rollup.config.js
import lezer from 'unplugin-lezer/rollup'

export default {
  plugins: [
    lezer(),
  ],
}

// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-lezer/webpack')()
  ]
}

// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-lezer/webpack')(),
    ],
  },
}

// esbuild.config.js
import { build } from 'esbuild'
import lezer from 'unplugin-lezer/esbuild'

build({
  plugins: [lezer()],
})