-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix: remove async imports #24865
fix: remove async imports #24865
Conversation
Changed Packages
|
Is this a duplicate of #24863? |
I'm not sure we want to do this yet. Would mean that we would have to ship the It could be the actual fix for this error message might be something like this: remix-run/remix#6562 |
Thanks for the contribution! |
No, this is a conditional import, not an unconditional import like at the top level of a file.
The problem is that
I would be surprised. Vite was working before for us, we upgraded to the new backend system, and it stopped working for us. |
backstage#24864 Signed-off-by: Marc Palm <17670840+marcpalm@users.noreply.github.com> Signed-off-by: Marc Palm <info@marcpalm.com>
Signed-off-by: Marc Palm <info@marcpalm.com>
I added a description how to test, but the error is not reproducible here, only in https://github.com/backstage/demo. Can somebody please trigger a prerelease, then I can test this with the demo-site? I have only tested this with modifying the dist folder in the node_modules yet ;-) |
Backing up a bit here, I guess I wanna work out why this doesn't work in the demo site when you add the
I put together a fix for the demo site without using EDIT: I've just had a thought looking at the stack trace that it's loading the |
My guess is also only vague at the moment: the By directly using |
This does work. Just results in a warning (also for my patch by the way) - ╭─... ~/repos/backstage/demo ‹blam/test-vite-fix●›
╰─$ EXPERIMENTAL_VITE=true yarn workspace app start
Loaded config from app-config.yaml
WARN files in the public directory are served at the root path. 13:16:10
Instead of /public/index.html, use /index.html.
WARN 1:16:10 PM [vite] Failed to load source map for /@fs/Users/palm/repos/backstage/demo/node_modules/graphiql/graphiql.css. |
Uffizzi Cluster |
Edit: Both patches - yours and mine - seem to work, the above warning can be ignored. |
OK, I think that this probably makes sense. I think that we're going to have to change this though for the release of Vite 5+ as they're deprecating their let's go with this for now, I realised that my concerns of this throwing errors shouldn't be a thing as it's conditionally called. 🤞 |
Signed-off-by: blam <ben@blam.sh>
Thank you for contributing to Backstage! The changes in this pull request will be part of the |
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Thanks for merging. Your comment applies to code run inside the vite-server only, right? We are configuring and starting it here. |
Ah okay, educated myself. You are right. It is deprecated in v4 and will removed in v5. |
Hey, I just made a Pull Request!
Proposed solution for #24864
How to test:
packages/app/package.json
in devDependenciesyarn
from the rootEXPERIMENTAL_VITE=true yarn workspace example-app start
The error is only reproducible in https://github.com/backstage/demo
✔️ Checklist
Signed-off-by
line in the message. (more info)