Skip to content

Nuxt 2 having issues with the lib_install function  #155

Open
@dcress

Description

@dcress

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? 🤷 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions