webpack-runtime-public-path-plugin
A plugin that lets you override the Webpack modules public path in webpage runtime.
Configuration
const RuntimePublicPathPlugin = require("webpack-runtime-public-path-plugin")
plugins:
Result
/******/ // __webpack_public_path__/******/ __webpack_require__p = "/dist/"; /******/ // Dynamic assets path override (runtime-public-path-webpack-plugin)/******/ __webpack_require__p = '/foo/bar/' || __webpack_require__p;