-
-
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
feat(build): add an option to use SystemJS #588
Conversation
@yyx990803 fixed. |
Interesting! This would probably require additional work, but do you think you would in the future allow the bare import specifier resolution to be handled by SystemJS' import-map support instead of by Vite? |
@yyx990803 Is there something else I can do to help this PR merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase to master while you're at it 👍
@aleclarson Rebased. Could you check it again? |
@yyx990803 You can test yourself with this: https://github.com/aleclarson/repro/tree/vite-588 But I've tested myself, and it's all working ;) |
@frehner Import maps are working as expected 👍 You just need to define Open to contributions that parse the PS: You'll want to put your |
UMD bundle interopSome packages (like React) don't have a SystemJS bundle, but they often have a UMD bundle. The minimal loader (which is embedded in your useSystemJs: 'https://unpkg.com/systemjs@6.7.1/dist/system.min.js', |
May I know is there anything block this PR getting merged? |
Just waiting on @yyx990803 to approve it. ⏳ |
Hi @yyx990803 and @aleclarson, I just notice v2.0.0-beta.1 has released. I havn't look at the v2 deeply yet, I just wonder if supporting Systemjs in still on the plan of Vite. If it is, I can change my PR to base on v2. |
For v2 we will likely provide an official plugin ( It's discussed a bit in the docs here: https://vitejs.dev/guide/build.html#browser-compatibility References: |
@yyx990803 SystemJS could be used not only because old browsers don't support dynamic imports, but also because importing hashed chunks is not optimal for long term caching (which could be solved by using import maps, but it's currently supported natively only in chromium-based browsers). See #6773, sveltejs/kit#4482, rollup/rollup#3407, rollup/rollup#4709 |
fix #554