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 composition-api to features #759

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ChangJoo-Park
Copy link
Contributor

@ChangJoo-Park ChangJoo-Park commented Mar 23, 2021

I added composition api to features.

It will be useful for Nuxt.js Composition API users.

Copy link
Member

@clarkdo clarkdo left a 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',
Copy link
Member

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',
},

Copy link
Contributor Author

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.

@pi0
Copy link
Member

pi0 commented Mar 25, 2021

@pi0 Should we add generate.interval as default options here ?

Why?

@clarkdo
Copy link
Member

clarkdo commented Mar 25, 2021

@pi0 Because I saw this from the doc https://composition-api.nuxtjs.org/getting-started/setup#quick-start

image

@pi0
Copy link
Member

pi0 commented Mar 25, 2021

/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',
Copy link
Member

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

Copy link
Member

@clarkdo clarkdo Mar 25, 2021

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 "./": "./" in exports of @nuxtjs/composition-api ? Not aware it's in nested dir 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.

Copy link
Member

@danielroe danielroe Mar 25, 2021

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.

@danielroe
Copy link
Member

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.

@ChangJoo-Park
Copy link
Contributor Author

The interval issue is likely related to nuxt/nuxt.js#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.

Copy link
Member

@pi0 pi0 left a 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)

@danielroe danielroe requested a review from pi0 May 31, 2021 11:07
@ChangJoo-Park
Copy link
Contributor Author

ChangJoo-Park commented Jun 1, 2021

Thanks @danielroe 😄

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

4 participants