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

chore(deps): vite v6.0.0-alpha.10 #64

Merged
merged 7 commits into from
May 2, 2024
Merged

chore(deps): vite v6.0.0-alpha.10 #64

merged 7 commits into from
May 2, 2024

Conversation

hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented May 2, 2024

Integrating BoundedPluginConstructor from vitejs/vite#16471 (comment)

"Hide whitespace" view recommended https://github.com/hi-ogawa/vite-environment-examples/pull/64/files?w=1

@hi-ogawa hi-ogawa marked this pull request as ready for review May 2, 2024 04:56
Comment on lines 32 to 37
const environmentPlugin: BoundedPluginConstructor = (environment) => {
const apiPlugin = environment.config.plugins.find(
(plugin) => plugin.name === "unocss:api",
);
tinyassert(apiPlugin);
const ctx = (apiPlugin.api as UnocssVitePluginAPI).getContext();
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per-environment plugin callback doesn't share the same scope, so we need to grab unocss instance via shared plugin api.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In alpha.10, sharedDuringBuild can be assigned to BoundedPluginConstructor as well 94cb16d

@hi-ogawa hi-ogawa changed the title chore(deps): vite v6.0.0-alpha.9 chore(deps): vite v6.0.0-alpha.10 May 2, 2024
@hi-ogawa hi-ogawa merged commit 659f452 into main May 2, 2024
1 check passed
@hi-ogawa hi-ogawa deleted the chore-vite-alpha9 branch May 2, 2024 09:16
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.

None yet

1 participant