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: experimental vite support #387

Merged
merged 21 commits into from
Mar 5, 2021
Merged

feat: experimental vite support #387

merged 21 commits into from
Mar 5, 2021

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Mar 1, 2021

You can try this PR by installing @nuxtjs/composition-api@vite and following the steps below.

To use @nuxtjs/composition-api with nuxt-vite you must:

  • Install @vue/composition-api as a top level devDependency of your project rather than relying on the version provided by @nuxtjs/composition-api.

will close nuxt/vite#17

* move remaining bastions to `upath`
* use `options.alias` rather than extending webpack build
@vercel
Copy link

vercel bot commented Mar 1, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nuxt-community/composition-api/72grcPvrdmjMhRnYjmigCQQnWfoJ
✅ Preview: https://composition-api-git-esm-support-nuxt-community.vercel.app

src/entrypoint.ts Outdated Show resolved Hide resolved
siroc.config.js Outdated Show resolved Hide resolved
src/module.ts Outdated Show resolved Hide resolved
src/module.ts Outdated
})

// Fake alias to prevent shadowing actual node_module
const aliases = ['@nuxtjs/composition-api', '@nuxtjs/vite-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.

I think in case of using a sub-path this should not happen (we use nuxt3/build for example and is working fine)

src/module.ts Outdated Show resolved Hide resolved
src/module.ts Outdated Show resolved Hide resolved
src/static.ts Outdated Show resolved Hide resolved
src/module.ts Outdated Show resolved Hide resolved
@danielroe
Copy link
Member Author

Note: the final issue with Vue.use(CompositionApi) is also true with @vue/composition-api and manually registering within plugin.

src/index.ts Outdated Show resolved Hide resolved
@danielroe danielroe changed the title feat: vite support feat: experimental vite support Mar 3, 2021
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.

Nice work on vite plugin 👍

src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/vite.ts Show resolved Hide resolved
src/vite.ts Show resolved Hide resolved
pi0
pi0 previously approved these changes Mar 5, 2021
src/vite.ts Outdated Show resolved Hide resolved
@danielroe danielroe merged commit e47805d into main Mar 5, 2021
@danielroe danielroe deleted the esm-support branch March 5, 2021 12:05
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.

Nuxt CompositionAPI Support
3 participants