Import Vue JS component from outside project dir

Viewed 602

I (want to) have a project structure like this:

project
    app1
        package.json
        src/SomeComponent1  
    app2
        package.json
        src/SomeComponent2
    common-components
        SharedComponent

What I wish is to easily be able to import SharedComponent into SomeComponent1 or SomeComponent2. This is not possible (many errors are raised while doing so.)

I know there are more elegant ways to do this but I don't wish to introduce all the infrastructure and extra maintenance work around deploying 'common' to artifactory and having extra jenkins pipeline, etc...

Editing Webpack through vue.config.js would be best if it is possible.

0 Answers
Related