Here's some tricks to use with webpack.
Customize require.ensure load path
By default, require.ensure load script based on the page's path. To change this
path, set it with this:
__webpack_public_path__ = 'static/js/'
external require with __non_webpack_require__
requirejs