Module ID conflict on first dev server compilation
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What is the current behavior?
We upgraded all our webpack dependencies (core, dev server and loaders) to their latest versions and started to see modules conflicts on the first compilation using webpack-dev-server
:
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_desktop_common_img_vendor_logos_songkick_svg__ = __webpack_require__(/*! desktop/common/img/vendor-logos/songkick.svg */ 23);
// ... elsewhere
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_desktop_common_js_views_v3_components_core_buttons_Link__ = __webpack_require__(/*! desktop/common/js/views/v3/components/core/buttons/Link */ 23);
These 🔼 are from the same bundle file and they’re referencing the same module ID. The module source for 23 contains the SVG module source, leaving the Link
module not present at all in the bundle.
If we change a file and let webpack-dev-server
recompile to get the changes, then the bundle correctly contains both the SVG module and the Link
module.
This issue is not present when just building the assets with webpack
directly.
We tried to downgrade webpack-dev-server
back to 2.4.2
, but the issue is still presenting itself, so I opened the bug here, since it seems to be a core webpack
issue.
If the current behavior is a bug, please provide the steps to reproduce.
Unfortunately, any attempts on providing a smaller test case to reproduce this were not possible.
What is the expected behavior?
No module conflicts in the bundle output.
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System. Node v8.1.2 webpack 3.5.5 webpack-dev-server 2.7.1 Ubuntu 16.04
Upgraded from the following (which did not present this issue): webpack 2.3.2 webpack-dev-server 2.4.2
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Fixed in https://github.com/webpack/webpack/pull/5671
Thanks @sokra!
Still unable to understand the source of the problem as well, I’ve added my tiny test case on https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/612#issuecomment-329028865