vuejs / vue-loader

📦 Webpack loader for Vue.js components
MIT License
4.99k stars 915 forks source link

fix: get unique module-id by the hash resourcePath #1996

Open yansenlei opened 2 years ago

yansenlei commented 2 years ago

Get unique module-id by the hash resourcePath, This makes it possible for multiple projects to run simultaneously on a single project.

e.g. A parent project has two sub-project, To prevent the module-id conflict.

Before:

ProjectA/src/view.vue => module-id: f82f3d04

ProjectB/src/view.vue => module-id: f82f3d04

After:

ProjectA/src/view.vue => module-id: 541fde99

ProjectB/src/view.vue => module-id: 35fda838