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

fix: ensure compatibility with vite v6.0.7 #63

Merged
merged 4 commits into from
Feb 14, 2025

Conversation

ocavue
Copy link
Contributor

@ocavue ocavue commented Jan 10, 2025

After updating vite from v6.0.6 to v6.0.7, vite-plugin-top-level-await doesn't work anymore. This is because vite-plugin-top-level-await mutates config in the configResolved() hook. This mutation should be done in the config() hook. See the explanation here for more details.

Closes #61

@ocavue ocavue marked this pull request as ready for review January 10, 2025 02:21
@bayasdev
Copy link

+1

@Menci
Copy link
Owner

Menci commented Jan 15, 2025

Is the target option available (if the user didn't set it explicitly) in the config() hook? I previously used the configResolved() hook to ensure the target option is available.

@ocavue
Copy link
Contributor Author

ocavue commented Jan 16, 2025

@Menci Thanks for pointing out. If user doesn't set if explicitly, target is undefined. I set it as the default Vite target in this case.

Specy added a commit to Specy/rooc that referenced this pull request Jan 23, 2025
@DominicGBauer
Copy link

@Menci please can you look at this when you have a chance 🙏 , it's breaking builds for some of our clients.

@antonybudianto
Copy link

antonybudianto commented Feb 14, 2025

Hi @ocavue , I forked your branch and publish the temporary npm package here: [email protected], so far it works well on my app (Vite 6.1.0), hopefully it can get merged soon 👍🏻

@Menci Menci merged commit 8216a43 into Menci:main Feb 14, 2025
@Menci
Copy link
Owner

Menci commented Feb 14, 2025

Sorry for so late! I just forgot this PR and just realized it when checking my email today...

@Menci
Copy link
Owner

Menci commented Feb 14, 2025

Released in v1.5.0

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

Successfully merging this pull request may close these issues.

not compatible with with vite 6.x.x
5 participants