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

Nuxt 2 having issues with the lib_install function #155

Open
dcress opened this issue Apr 26, 2022 · 1 comment
Open

Nuxt 2 having issues with the lib_install function #155

dcress opened this issue Apr 26, 2022 · 1 comment

Comments

@dcress
Copy link

dcress commented Apr 26, 2022

First off

Thanks for all the amazing work! Super excited to be using Vue Demi. 🚀


The Problem:

This is likely a user error, but I'm not able to find any examples of consuming a vue-demi plugin in a Nuxt 2 application to help point me in the right direction.

Here's what I have for my package.json in my vue-demi plugin:

  "peerDependencies": {
    "@vue/composition-api": "^1.4.5",
    "vue": "^2.0.0 || >=3.0.0"
  },
  "peerDependenciesMeta": {
    "@vue/composition-api": {
      "optional": true
    }
  },
  "dependencies": {
    "vue-demi": "^0.12.5",
  },
module.exports = {
  chainWebpack: (config) => {
    config.externals(['@vue/composition-api', 'vue']);
  },
};

And in my consuming application:

"dependencies": {
  "my-vue-demi-plugin": "1.0.0",
  "nuxt": "^2.15.2",
}

I'm getting the following error:
Screen Shot 2022-04-25 at 7 18 40 PM


Upon further inspection, I see that there's a default nested inside of external vue reference, which it seems that the install function isn't expecting.

Screen Shot 2022-04-25 at 7 11 52 PM

Screen Shot 2022-04-25 at 7 20 01 PM

What am I missing here? 🤷 🤔

@dcress
Copy link
Author

dcress commented Apr 27, 2022

@antfu This seems possibly related to this: #130

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

No branches or pull requests

1 participant