Skip to content

Vue is loaded twice when I use lerna (npm link) #9267

@wizardnet972

Description

@wizardnet972

Version

2.5.21

Reproduction link

https://github.com/wizardnet972/vue-lerna.git

Steps to reproduce

clone the repo: https://github.com/wizardnet972/vue-lerna.git

$ install lerna: npm i lerna -g (I think it not necessarily)
$ cd vue-lerna\apps\vue-app-ui
$ npm run serve -- --mode development

What is expected?

You will get this message at console twice:

You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html

What is actually happening?

vue is loading twice or more per the usage of the packages..

package1 -> vue in it
package2. -> vue in it
packageN ...

image

I think what happends is, webpack try to resolve vue from the package1, from local node_module folder so webpack add vue package to package bundle.
see the sources.

** The packages is connected using npm link by lerna. **

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