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

@unocss/cli warn about duplication of preset #1689

Closed
avxit opened this issue Oct 6, 2022 · 6 comments · Fixed by #1714
Closed

@unocss/cli warn about duplication of preset #1689

avxit opened this issue Oct 6, 2022 · 6 comments · Fixed by #1714
Labels
cli invalid This doesn't seem right

Comments

@avxit
Copy link
Contributor

avxit commented Oct 6, 2022

image

To reproduce, install @unocss/cli, create uno.config.js and add any preset then run the CLI. Warning message is always appeared in screen.

After some digging, I think loader.load() doesn't work correctly. It's duplicate entries of presets array instead of "merge" or something and that cause the problem.

const result = await loader.load()

@sudongyuer sudongyuer added the cli label Oct 8, 2022
@sudongyuer
Copy link
Member

Can you provide a mimimum reproduction ?

@avxit
Copy link
Contributor Author

avxit commented Oct 8, 2022

Can you provide a mimimum reproduction ?

Here it is: https://github.com/avxit/unocss-cli-bug

@sudongyuer
Copy link
Member

Can you provide a mimimum reproduction ?

Here it is: https://github.com/avxit/unocss-cli-bug

Hi~,the presetUno() is a default built-in preset of unocss/cli .

@avxit
Copy link
Contributor Author

avxit commented Oct 8, 2022

Hi~,the presetUno() is a default built-in preset of unocss/cli .

Don't know what do you mean about this, but you can substitute @unocss/preset-uno or combine with any other preset, and warning message is still there.

image

@unocss/preset-web-font

image

@unocss/preset-uno and @unocss/preset-web-font

I am also updated the minimum reproduction with @unocss/preset-web-font.

@sudongyuer
Copy link
Member

Hi~,the presetUno() is a default built-in preset of unocss/cli .

Don't know what do you mean about this, but you can substitute @unocss/preset-uno or combine with any other preset, and warning message is still there.

image

@unocss/preset-web-font

image

@unocss/preset-uno and @unocss/preset-web-font

I am also updated the minimum reproduction with @unocss/preset-web-font.

Oh~,i see , there might to be some bugs
image

@sudongyuer sudongyuer added the invalid This doesn't seem right label Oct 8, 2022
@sudongyuer
Copy link
Member

sudongyuer commented Oct 9, 2022

At packages/cli/src/index.ts

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants