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(nuxt2): support nuxt2 #1833

Merged
merged 3 commits into from Nov 2, 2022
Merged

fix(nuxt2): support nuxt2 #1833

merged 3 commits into from Nov 2, 2022

Conversation

poyoho
Copy link
Contributor

@poyoho poyoho commented Nov 2, 2022

fix: #1832

autoimport unocss will generate the code

import 'uno.css'
export default defineNuxtPlugin(() => {})

but defineNuxtPlugin is not autoimport in pure nuxt2

@poyoho poyoho requested a review from antfu as a code owner November 2, 2022 08:18
@netlify
Copy link

netlify bot commented Nov 2, 2022

Deploy Preview for unocss canceled.

Name Link
🔨 Latest commit 7b9b9ec
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/63623cabc8aeb50009ea6041

@antfu antfu changed the title fix: nuxt2 load test: add nuxt2-webpack example Nov 2, 2022
@antfu antfu changed the title test: add nuxt2-webpack example fix(nuxt2): support nuxt2 Nov 2, 2022
@antfu antfu merged commit 4b0dcb4 into unocss:main Nov 2, 2022
@poyoho poyoho deleted the fix/nuxt-load branch November 2, 2022 10:09
@zyyv
Copy link
Member

zyyv commented Nov 17, 2022

I test this example, but it doesn't work properly. So did this commit really solve the problem?

@poyoho
Copy link
Contributor Author

poyoho commented Nov 17, 2022

@zyyv what the error do you meet?

@zyyv
Copy link
Member

zyyv commented Nov 17, 2022

@zyyv what the error do you meet?

image

@zyyv
Copy link
Member

zyyv commented Nov 17, 2022

Can you try to run it?

@poyoho
Copy link
Contributor Author

poyoho commented Nov 17, 2022

I can run it. Can you provide the mini repo thanks 😀

@zyyv
Copy link
Member

zyyv commented Nov 17, 2022

I'm just run https://github.com/unocss/unocss/tree/main/examples/nuxt2-webpack.
let me check it carefully again.

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.

defineNuxtPlugin is not defined in nuxt2
3 participants