-
-
Notifications
You must be signed in to change notification settings - Fork 427
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 composition-api to features #759
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pi0 Should we add generate.interval
as default options here ?
@@ -105,6 +105,10 @@ | |||
// https://go.nuxtjs.dev/vuetify | |||
'@nuxtjs/vuetify', | |||
<%_ } _%> | |||
<%_ if (composition) { _%> | |||
// https://composition-api.nuxtjs.org/ | |||
'@nuxtjs/composition-api', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For testing in jest, let's add moduleNameMapper in jest config
moduleNameMapper: {
'@nuxtjs/composition-api': '@nuxtjs/composition-api/lib/entrypoint.js',
// alternatively, depending on your node version
// '@nuxtjs/composition-api': '@nuxtjs/composition-api/entrypoint',
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clarkdo Good point 👍
Chech this commit please.
Why? |
@pi0 Because I saw this from the doc https://composition-api.nuxtjs.org/getting-started/setup#quick-start |
/cc @danielroe |
<%_ if (composition) { _%> | ||
'@nuxtjs/composition-api': '@nuxtjs/composition-api/lib/entrypoint.js', | ||
// alternatively, depending on your node version | ||
// '@nuxtjs/composition-api': '@nuxtjs/composition-api/entrypoint', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend defaulting to this one as newer node versions will only recognise this format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the first should work as we have Not aware it's in nested dir "./": "./"
in exports
of @nuxtjs/composition-api ?lib
, what do you think adding lib
to exports as well ?
BTW, trailing "/" suffix for subpath will be removed in a future Node.js release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Yes, but the trailing /
is deprecated in favour of /*
. 👍 to adding lib
to exports in principle, though will need to check what happens with siroc
.
The interval issue is likely related to nuxt/nuxt#8620. I'll take it on as a priority as it's a pain on larger sites. |
I think generate is optional. it is not too late when user met interval issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entrypoint issue should be fixed in @nuxtjs/composition-api
(directed in discord)
Thanks @danielroe 😄 |
I added composition api to features.
It will be useful for Nuxt.js Composition API users.