-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
@vitejs/plugin-legacy: __vite_legacy_guard error with systemjs and single-spa #12017
Comments
The main non-legacy (or modern) chunk shouldn't be a systemjs file by default unless you change that? If so, it wouldn't work as plugin-legacy expects the modern chunk to be ESM. If not, a repro would help dissect the issue. |
Hello @adrianorob90. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
hi @bluwy I added a link to the repo to reproduce the error :) |
Hi @patak-dev I need the systemjs version to load the project in the single-spa root project. Alternatively how can I do it? |
You need to use plugin-legacy if you need systemjs. If you need that format only, you can follow #10139 so it's configurable to ship systemjs only. |
Describe the bug
I made a single-spa-application with Vite and Svelte. The bundle in Systemjs format contains an error due to the presence of the __vite_legacy_guard export, without it everything works correctly. An option to disable __vite_legacy_guard would be useful.
Reproduction
https://github.com/adrianorob90/svelte-skeleton-vite
Steps to reproduce
After open the file
dist/20/svelte-skeleton/js/svelte-skeleton-main.0.1.0.js
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: