Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR doesn't work for npm linked modules #228

Open
ramivalta opened this issue Feb 2, 2016 · 3 comments
Open

HMR doesn't work for npm linked modules #228

ramivalta opened this issue Feb 2, 2016 · 3 comments

Comments

@ramivalta
Copy link

Hot module replacement doesn't seem to be working when using npm link. Webpack correctly notices there are changed files and rebuilds the bundle, and browser console shows what files have changed and seemingly updates the correct modules, but the browser doesn't get the updated code until the app is restarted (with rs).

Example:

> ls -l node_modules/linked-module
lrwxr-xr-x  1 rtv  staff  55 Feb  2 12:29 node_modules/linked-module -> /usr/local/lib/node_modules/linked-module

Edits file called WantContainer.js in linked-module

webpack: bundle is now INVALID.
webpack building...
  dev `webpack-stats.json` updated +8m
webpack built e76a69b94a58a2dca12a in 3512ms
chunk    {0} app-e76a69b94a58a2dca12a.js, 0.8b55b2e8e63fe3633838.hot-update.js, app-e76a69b94a58a2dca12a.js.map, 0.8b55b2e8e63fe3633838.hot-update.js.map (app) 16.9 MB [rendered]
chunk    {1} 1-e76a69b94a58a2dca12a.js, 1-59aeefde317b1b1f99d7.js, 1-59aeefde317b1b1f99d7.js.map 187 kB {0}
chunk    {2} 2-e76a69b94a58a2dca12a.js, 2-59aeefde317b1b1f99d7.js, 2-59aeefde317b1b1f99d7.js.map 62 kB {0}

process-update.js:27 [HMR] Checking for updates on the server...
2016-02-02 13:44:26.967 index.js:81 [React Transform HMR] Patching Root
2016-02-02 13:44:26.970 index.js:81 [React Transform HMR] Patching RootContainerComponent
2016-02-02 13:44:26.971 process-update.js:80 [HMR] Updated modules:
2016-02-02 13:44:26.972 process-update.js:82 [HMR]  - ../serviceBrowser/lib/product/WantContainer.js
2016-02-02 13:44:26.972 process-update.js:82 [HMR]  - ../serviceBrowser/lib/index.js
2016-02-02 13:44:26.972 process-update.js:82 [HMR]  - ../serviceBrowser/lib/index.js
2016-02-02 13:44:26.973 process-update.js:82 [HMR]  - ./src/Routes.jsx
2016-02-02 13:44:26.973 process-update.js:82 [HMR]  - ./src/universal-render.jsx
2016-02-02 13:44:26.973 process-update.js:82 [HMR]  - ../serviceBrowser/lib/product/LikeContainer.js
2016-02-02 13:44:26.973 process-update.js:82 [HMR]  - ../serviceBrowser/lib/product/NeedContainer.js
2016-02-02 13:44:26.974 process-update.js:82 [HMR]  - ../serviceBrowser/lib/product/PlanGrid.js
2016-02-02 13:44:26.974 process-update.js:82 [HMR]  - ../serviceBrowser/lib/product/ProductContainer.js
2016-02-02 13:44:26.974 process-update.js:82 [HMR]  - ../serviceBrowser/lib/product/ProductWrapper.js
2016-02-02 13:44:26.974 process-update.js:82 [HMR]  - ../serviceBrowser/lib/product/SummaryContainer.js
2016-02-02 13:44:26.974 process-update.js:82 [HMR]  - ../serviceBrowser/lib/wizard/WizardContainer.js
2016-02-02 13:44:26.975 process-update.js:82 [HMR]  - ../serviceBrowser/lib/ServiceContainer.js
2016-02-02 13:44:26.975 process-update.js:87 [HMR] App is up to date.



Yet the browser doesn't get the updated code.

@iam4x
Copy link
Owner

iam4x commented Feb 2, 2016

Hello @TiiL this is a known webpack issue with symlinked directories, it will be fixed in version 2 👍

@ramivalta
Copy link
Author

Thanks @iam4x, time to upgrade I guess.

@Relequestual
Copy link

@iam4x Version 2 of webpack? Any details on what this fix is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants