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

feat: add defaultUnocssConfig to webpack plugin and unocss vscode extension #1056

Closed
wants to merge 1 commit into from

Conversation

TrickyPi
Copy link
Contributor

@TrickyPi TrickyPi commented Jun 3, 2022

close #1032

also make webpack plugin use @unocss/preset-uno as default preset.

@TrickyPi TrickyPi requested a review from antfu as a code owner June 3, 2022 08:14
@netlify
Copy link

netlify bot commented Jun 3, 2022

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8e0e0cc
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/6299c43cfde27700081fd505
😎 Deploy Preview https://deploy-preview-1056--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

Well, it's intentional to have @unocss/vite and @unocss/webpack preset irrelevant so higher integrations that provide their own presets could reuse them if they want. I am ok to have the default theme on the extension but not the webpack plugin. Thanks

@TrickyPi
Copy link
Contributor Author

TrickyPi commented Jun 3, 2022

The default presets will be overridden by custom configuration, like this describition https://github.com/unocss/unocss/blob/main/README.md?plain=1#L166, so i think there will be no issues about integration(maybe i'm wrong).
perhaps we can export a function like UnocssVitePlugin for webpack user,

@antfu
Copy link
Member

antfu commented Jun 3, 2022

I don't want to force download the presets for those who don't need them. Maybe we could have unocss/webpack which binds the default preset and ask @unocss/webpack as peerDeps

@TrickyPi
Copy link
Contributor Author

TrickyPi commented Jun 3, 2022

if we ask @unocss/webpack as peerDeps, maybe we need list this info in instruction. Could we add instruction about how to use unocss on webpack to README.md?

@antfu
Copy link
Member

antfu commented Jun 3, 2022

Sure, I would handle the docs part

@antfu antfu closed this in 0803628 Jun 4, 2022
@TrickyPi
Copy link
Contributor Author

TrickyPi commented Jun 4, 2022

Thanks for your commits.

@TrickyPi TrickyPi deleted the feat/add-default-preset branch June 4, 2022 13:23
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.

[Vscode extension] the preset config is prerequisite
2 participants