owlsdepartment / vite-plugin-babel

Runs babel during dev serve in Vite
MIT License
53 stars 14 forks source link

feat: allow filter to have JavaScript specific regex features in development #23

Closed blikblum closed 11 months ago

blikblum commented 11 months ago

Same as #17 but with proper indentation

Fix https://github.com/owlsdepartment/vite-plugin-babel/issues/12

This PR makes filter in development (esbuild) behaves the same when building (rollup)

It tests the JavaScript filter directly instead of passing to esbuild.

Esbuild uses Go Regex which is pretty limited compared to JS engine: https://github.com/evanw/esbuild/issues/1634#issuecomment-927204088

F0rsaken commented 11 months ago

I can affect performance in minor way, as I guess Go regex's are more efficient, but having flexibility of a better RegEx language is worth it I think! ^^

Thx for the PR!