I'm trying to write a library using webpack. I'm using code splitting with require.ensure in my main file. Problem is that it will try to resolve all chunks from base url. Is it possible to make it relative to entry-point?
For example, I add my entry-point as
<script src="node_modules/mylib/index.js">
When this file does require.ensure('./dep.js') it will try to load /dep.js instead of node_modules/mylib/dep.js.
I've made a workaround by manipulating <base> tag, but it's really an ugly hack. I feel like there should be a more "webpacky" solution.
__webpack_public_path__