Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

feat: add composition-api to features #759

Open
wants to merge 5 commits into
base: main
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

@ChangJoo-Park ChangJoo-Park Mar 25, 2021

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 😄

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants