Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: apply transform hooks in optimize #2511

Closed
xiaoxiangmoe opened this issue Mar 15, 2021 · 1 comment
Closed

Feature Request: apply transform hooks in optimize #2511

xiaoxiangmoe opened this issue Mar 15, 2021 · 1 comment

Comments

@xiaoxiangmoe
Copy link
Contributor

xiaoxiangmoe commented Mar 15, 2021

In vite optimize the transform hook will not be called.

So the commonjs file will not be transformed.

Can vite apply transform hooks in optimize ?

@nihalgonsalves
Copy link
Member

You can specify your own esbuild plugins with #2991, released in v2.3.0.

These plugins are not applied during build (only dep scan and optimisation), so you will have to create both an esbuild & Vite/rollup entry if you need certain behaviour in both cases.

We can continue the discussion about pre-dep-optimization Vite hooks in #3124.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants