webpack-runtime-public-path-plugin

A plugin that lets you override the Webpack modules public path in webpage runtime.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
webpack-runtime-public-path-plugin
1.1.24 years ago6 years agoMinified + gzip package size for webpack-runtime-public-path-plugin in KB

Readme

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") ``` ```json
plugins: [
...
new RuntimePublicPathPlugin({
runtimePublicPath: "'/foo/bar/'"
})
...
]
```
Result
```js // // webpackpublicpath // webpackrequire.p = "/dist/"; // // Dynamic assets path override (runtime-public-path-webpack-plugin) // webpackrequire.p = ('/foo/bar/') || webpackrequire.p; ```