-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Remix Vite Top-level await is not available in the configured target environment #3646
Comments
Added for documentation purposes only, not an active issue. |
What would be the solution for the case of Astro? (as opposed to NextJS) |
I actually have not used Astro so I am not familiar, also this fix was for Remix (not NextJS) so I am not familiar with that framework either. But the general concept is that you should set the server bundle to ESNext. If you set the browser bundle, you may limit the site to be compatible to folks with only the latest browsers. Since you control the server however, you may support the latest standard. |
Thank you @SpencerDuball , I still didn't manage to do that, but it's a good point. Knowing that there must be some way to configure the server bundling on its own is a helpful indication. |
After upgrading to Remix with Vite I was getting this error:
There are a few answers out there that suggest updating the TSConfig target to "ESNext" but this probably will affect the output client bundle and cause issues for people with older browsers. Instead I found this solution:
Got this solution from: mozilla/pdf.js#17245
The text was updated successfully, but these errors were encountered: