lezer-parser / lezer

Dev utils and issues for the Lezer core packages
33 stars 1 forks source link

Extend bundler support to Webpack and Vite using Unplugin #48

Closed illright closed 4 months ago

illright commented 9 months ago

There's a project called Unplugin which acts as an adapter of a Rollup-like plugin API and creates plugins that are supported by most bundlers. Looking at the source code of the Rollup plugin for the generator, it seems like it should be a drop-in replacement, though I haven't tried it, and we'd get support for Webpack, Vite, and even esbuild (though not in watch mode, it seems). Is this something you would be open to?

I'm considering giving it a shot, would like to hear your take on it first.

marijnh commented 9 months ago

This sounds useful. The entry point would have to be a specific new file, I guess? I'd be interested in a PR.

marijnh commented 4 months ago

https://github.com/lezer-parser/yaml/issues/1

fasiha commented 3 months ago

@marijnh thanks for fixing this! Do we have to update our version of lezer to pick up this and the fix to https://github.com/lezer-parser/yaml/issues/1? (I asked there also, sorry for double-ping!)