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

[plugin-legacy] The code generator has deoptimised the styling of ... #1828

Closed
2 of 3 tasks
DreierF opened this issue Jan 31, 2021 · 0 comments
Closed
2 of 3 tasks

[plugin-legacy] The code generator has deoptimised the styling of ... #1828

DreierF opened this issue Jan 31, 2021 · 0 comments

Comments

@DreierF
Copy link
Contributor

DreierF commented Jan 31, 2021

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

I'm getting a lot of logs in the production build when using @vitejs/plugin-legacy of the form:

[BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.

This originates from babel's generatorOpts.compact option that is set to 'auto' by default. As you probably always want a compact output in the production build I would suggest to set this to true regardless of the size of the code.

This is not really a big issue, but I also cannot manually override this setting or suppress the logs otherwise.

Reproduction

Just analyze a codebase with sufficiently large dependencies.

System Info

  • vite version: 2.0.0-beta60
  • Operating System: MacOS
  • Node version: 14.15
  • Package manager (npm/yarn/pnpm) and version: yarn
@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

1 participant