0👍
I think the best way in your case is to move your common functionality to npm package and use it into dependencies of both webpack projects. This is the right way!
0👍
Finally found a solution to this. It’s all in webpack’s resolver. Things work in webpack v1, maybe because it has this line in the build/webpack.base.js
resolve: {
fallback: [path.join(__dirname, '../node_modules')],
...
But webpack v2 doesn’t seem to work the same way. My work workaround looks like this…
resolve: {
modules: [
path.join(__dirname, '../node_modules/TheLibrary'),
...
Now it looks inside the symbolically linked library for its dependencies.
Note: If TheLibrary also has a symbolically linked library, then under this workaround you need to include that as well under the root web app. Something like this…
resolve: {
modules: [
path.join(__dirname, '../node_modules/TheLibrary'),
path.join(__dirname, '../node_modules/TheLibrary/node_modules/Component'),
...
So still open to better solutions 🙂
- [Vuejs]-Creating a mind-map application in Nuxt.js
- [Vuejs]-V-for loop method to not directly cause rendering
Source:stackexchange.com