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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ocavue
Copy link

@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
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.

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
4 participants