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: @vue/composition-api submodule resolution #517

Merged
merged 3 commits into from
Jul 21, 2021

Conversation

antfu
Copy link
Contributor

@antfu antfu commented Jul 18, 2021

workaround

close nuxt/nuxt#9567
close vueuse/vue-demi#76

@TonyPythoneer
Copy link

TonyPythoneer commented Jul 19, 2021

Hi, nuxt team

I am the issue reporter nuxt/nuxt#9567
I have tried @antfu 's solution, so it's worked. Please review it. thx


Is @danielroe the main owner for this lib?
Are you available to take a look? thx

@TonyPythoneer
Copy link

TonyPythoneer commented Jul 19, 2021

Before this PR gets merged, I have another workaround to this issue.
It's worked to me.

import { resolve } from 'path'
const vueCompositiobnAPIFullpath = resolve("./node_modules/@vue/composition-api/dist/vue-composition-api.esm.js");

config = {
  alias: {
    // keep default settings
    '~~': resolve(__dirname, './'),
    '@@': resolve(__dirname, './'),
    '~': resolve(__dirname, './'),
    '@': resolve(__dirname, './'),
    'assets': resolve(__dirname, './assets'), // (unless you have set a custom `dir.assets`)
    'static': resolve(__dirname, './static'), // (unless you have set a custom `dir.static`)
    // workaround
    '@vue/composition-api/dist/vue-composition-api.esm.js': vueCompositiobnAPIFullpath,
  },
}

Thanks to the @antfu 's answer, he inspires me to have this workaround.

src/module/index.ts Outdated Show resolved Hide resolved
@danielroe danielroe changed the title fix: @vue/composition-api submodule resolve fix: @vue/composition-api submodule resolution Jul 21, 2021
@danielroe danielroe merged commit bb76b53 into nuxt-community:main Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants