google / google/model-viewer

BetterVite support

Open
#4,971 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.2k
Forks
947
PR merge metrics
No merged PRs in 30d

Description

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:

```ts
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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.