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

Webpack2: file reference in importing module is not updated #4158

Closed
aFarkas opened this issue Feb 1, 2017 · 0 comments
Closed

Webpack2: file reference in importing module is not updated #4158

aFarkas opened this issue Feb 1, 2017 · 0 comments

Comments

@aFarkas
Copy link

aFarkas commented Feb 1, 2017

Do you want to request a feature or report a bug?
A bug report.

What is the current behavior?
If a module (i.e: "entry-package.js") is importing another module via code splitting (i.e. import('module-b')) and webpack is watching for file changes and module-b is changed, webpack generates a new chunk with a new filename, but this new filename is not updated in the importing module.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Setup webpack with watch: true
  2. create a module with the following content:
//module-b.js
export default 'foo';
  1. create an entry package with the following content:
//entry-package.js
import('./module-b').then(function(module){
   console.log(module);
});
  1. run webpack
  2. Change module-b

What is the expected behavior?
First it should output 'foo' after the change it should output the changed value. This happens because entry-package.js is not updated with the new chunk name.

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

@aFarkas aFarkas closed this as completed Feb 1, 2017
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

1 participant