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

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

Closed
7 tasks done
ikangjie opened this issue Apr 26, 2022 · 1 comment · Fixed by #14425
Closed
7 tasks done

Comments

@ikangjie
Copy link

Describe the bug

I configured build.chunkSizeWarningLimit = 5000 in vite.config.js to eliminate the warning that the package size exceeds 500kb, but it still reports an error when packaging, why is this?

vite version:2.9.5

Reproduction

empty

System Info

System:
    OS: macOS
  Binaries:
    Node: 16.14.2 - ~/Library/pnpm/node
    npm: 8.5.0 - ~/Library/pnpm/npm
  Browsers:
    Brave Browser: 100.1.37.114
    Chrome: 100.0.4896.127
    Safari: 15.3

Used Package Manager

pnpm

Logs

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

Validations

@bluwy
Copy link
Member

bluwy commented Apr 26, 2022

The warning comes from babel and @vitejs/plugin-legacy and can be safely ignored. If you want to improve performance (as noted in the warning), manually set the modernPolyfills config so that babel doesn't have to scan itself.

If you'd like to find what babel scan by default, start your build like DEBUG="vite:legacy" npm run build and it would log the modernPolyfills found.

@bluwy bluwy closed this as completed Apr 26, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants