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

Vite warning when loading ESM with loadRemote from @module-federation/enhanced/runtime #3250

Closed
5 tasks done
sk-pub opened this issue Nov 18, 2024 · 1 comment
Closed
5 tasks done

Comments

@sk-pub
Copy link
Contributor

sk-pub commented Nov 18, 2024

Describe the bug

Steps to reproduce:

  1. Generate a new Angular 18 app with ng new
  2. Use loadRemote from @module-federation/enhanced/runtime
  3. Start dev server and open localhost:4200
  4. Observe the following message in terminal:
[vite] warning: 
.../.angular/cache/18.2.12/angular-module-federation-esm-warning/vite/deps/@module-federation_enhanced_runtime.js
2134|                import(
2135|                  /* webpackIgnore: true */
2136|                  entry
   |                  ^^^^^
2137|                ).then(resolve).catch(reject);
2138|              } else {
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: .../.angular/cache/18.2.12/angular-module-federation-esm-warning/vite/deps/@module-federation_enhanced_runtime.js?v=c3d1dba7

Reproduction

I'll create a PR with a fix.

Reproduction

https://github.com/sk-pub/angular-module-federation-esm-warning

Used Package Manager

npm

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 AMD Ryzen 9 7900X 12-Core Processor
    Memory: 13.57 GB / 31.15 GB
  Binaries:
    Node: 18.20.5 - ~\AppData\Local\Volta\tools\image\node\18.20.5\node.EXE
    npm: 10.8.2 - ~\AppData\Local\Volta\tools\image\node\18.20.5\npm.CMD
    pnpm: 8.11.0 - C:\Program Files\Volta\pnpm.EXE
    bun: 1.1.34 - ~\AppData\Local\Volta\bin\bun.EXE
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Validations

@sk-pub
Copy link
Contributor Author

sk-pub commented Nov 27, 2024

Checked with @module-federation/enhanced 0.7.7. The warning is gone.

@sk-pub sk-pub closed this as completed Nov 27, 2024
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

1 participant