Example of setting up a public webpack path at runtime

I'm struggling to find an example of how to set a common path to the output file of a webpack package.

The documentation says:

If you do not know publicPath at compile time, you can omit it and set it __webpack_public_path__at your entry point.

Same:

__webpack_public_path__ = myRuntimePublicPath

Someone would be kind enough to create a JSFiddle example, how can this be done?

+4
source share

Source: https://habr.com/ru/post/1656845/


All Articles