I have a collection of Vue.js components in a library, and I also have a Vue web application that imports these components. Both are using Webpack and are stored in separate repositories.
Prior to utilizing webpack, I was using browserify-hmr and could easily import the library into my web pack development environment using npm link. It essentially accomplished the same as
import '../../../library/index.js'
However, with Webpack, I encounter an error message like this:
ERROR Failed to compile with 1 error
1:16:18 PM
This dependency was not found:
* !!vue-style-loader!css-loader!../../../web-app/node_modules/vue-loader/lib/style-rewriter
?id=data-v-6afebbcb!sass-loader!../../../web-app/node_modules/vue-loader/lib/selector
?type=styles&index=0!./Component.vue in ../TheLibrary/src/Component.vue
To install it, you can run: npm install --save !!vue-style-loader!css-loader
!../../../web-app/node_modules/vue-loader/lib/style-rewriter?id=data-v-6afebbcb
!sass-loader!../../../web-app/node_modules/vue-loader/lib/selector?type=styles
&index=0!./Component.vue
I am attempting to locally make changes to the library and import it into my web app without the need to push the library changes and pull module updates from the web app. Is there a way to achieve this with Webpack?
It's worth mentioning that the webpack project was set up using the following template: https://github.com/vuejs-templates/webpack
Update
The reason for the error is due to a missing dependency, https://www.npmjs.com/package/susy, which is not installed on the web app. Once I add this dependency to the web app, the error disappears.
Any suggestions or solutions to address this issue?