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

build error #1686

Closed
2 of 3 tasks
anncwb opened this issue Jan 24, 2021 · 1 comment
Closed
2 of 3 tasks

build error #1686

anncwb opened this issue Jan 24, 2021 · 1 comment

Comments

@anncwb
Copy link
Contributor

anncwb commented Jan 24, 2021

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • 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

  • After upgrading to beta.45, it does not work properly after packaging
  • This problem cannot be reproduced in a condensed example. So I can only provide examples of complex projects. Please excuse me.
  • This problem occurs when build:{minify:false} is set to non-false

I located locally that the problem was caused by this submission d4909b9

Reproduction

image

System Info

  • vite version: beta.46
  • Operating System: mac
  • Node version:14
  • Package manager (npm/yarn/pnpm) and version:yarn

Logs (Optional if provided reproduction)

  1. Run vite or vite build with the --debug flag.
  2. Provide the error log here.
@amaury-tobias
Copy link

i have the same problem, in my case its caused by chartist-js.
into the Dependency Pre-Bundling result in /node_modules/.vite/.../chartist.js i modified the functions for example

(function(globalRoot, Chartist2) {...
 })(this || global, Chartist);

turn into

(function(globalRoot, Chartist2) {...
 })(globalThis, Chartist);

and works perfect, this library uses document/window globals, maybe this causes your problem.
(Sorry my bad english)

@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

2 participants