import chunks when url is not root

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
There is an issue when loading chunks with import in the case where the current url is not a root url:
i.e http://localhost:8080/admin/users
In that case, the chunk being loaded is for instance from the url http://localhost:8080/admin/2.js which doesn’t exist.
See #5587 for the original PR.

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

What is the expected behavior?
The chunk should be loaded from the correct url
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.

webpack 3.5.5

Author: Fantashit

1 thought on “import chunks when url is not root

Comments are closed.