We have slightly different public path urls per environment, which come from a module on the server side. in looking at the config docs, you have a suggested method of doing this, but after trying several combinations, I ended up setting
__webpack_require__.p
and not
__webpack_public_path__
Is this correct?
In your entry point:
http://webpack.github.io/docs/configuration.html#output-publicpath
@sokra I think I’ve worked out what might be going on here.
In
lib/APIPlugin
when replacements are done the replacement will only work for exactly the following assignment:__webpack_public_path__ = '/my/path'
, but will fail if it is a declarationvar __webpack_public_path__ = '/my/path'
.That’s working as expected.
__webpack_public_path__
must be a free var.@univerio You can explicitly reference the global scope:
__webpack_public_path__
is not working whenruntime
chunk is separated(optimizations).publicPath
is set from the build time rather than run time. Is anyone having this issue?