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

BetterVite support #4971

Open
AmitMY opened this issue Dec 11, 2024 · 2 comments
Open

BetterVite support #4971

AmitMY opened this issue Dec 11, 2024 · 2 comments

Comments

@AmitMY
Copy link

AmitMY commented Dec 11, 2024

I have recently moved from Webpack to Vite (angular 18 was default webpack, now angular 19 is vite).

You might want to add vite-ignore next to your webpack ignore, or allow for static analysis otherwise:

3:10:35 PM [vite] warning: 
/Users/amitmoryossef/dev/sign/translate/.angular/cache/19.0.2/sign-translate/vite/deps/@google_model-viewer_lib_model-viewer.js
14309|          } = yield import(
14310|            /* webpackIgnore: true */
14311|            this.lottieLoaderUrl
   |            ^^^^^^^^^^^^^^^^^^^^
14312|          );
14313|          this._lottieLoader = new LottieLoader();
The above dynamic import cannot be analyzed by Vite.
See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.

  Plugin: vite:import-analysis
  File: /Users/amitmoryossef/dev/sign/translate/.angular/cache/19.0.2/sign-translate/vite/deps/@google_model-viewer_lib_model-viewer.js?v=de5cd189
@elalish
Copy link
Contributor

elalish commented Dec 11, 2024

Good call - would you mind sending a PR? Since you're using Vite, you'll be able to test the fix better.

@anders8
Copy link

anders8 commented Jan 20, 2025

I tested adding /* @vite-ignore */ next to /* webpackIgnore */ on line 57364 of model-viewer.js in /dist, which is in the getLottieLoader(withCredentials) function. It does correctly suppress the warning. I know it's /dist and all, but...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants