https://github.com/unchai/webpack-manifest-replace-plugin
Webpack plugin to replace assets path using manifest context.
https://github.com/unchai/webpack-manifest-replace-plugin
manifest replace webpack webpack-plugin
Last synced: 6 days ago
JSON representation
Webpack plugin to replace assets path using manifest context.
- Host: GitHub
- URL: https://github.com/unchai/webpack-manifest-replace-plugin
- Owner: unchai
- License: mit
- Created: 2017-05-29T09:52:03.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-09-01T07:08:13.000Z (over 3 years ago)
- Last Synced: 2025-10-09T14:26:55.977Z (4 months ago)
- Topics: manifest, replace, webpack, webpack-plugin
- Language: JavaScript
- Homepage:
- Size: 182 KB
- Stars: 6
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webpack-manifest-replace-plugin
[](https://www.npmjs.com/package/webpack-manifest-replace-plugin)
[](https://npmcharts.com/compare/webpack-manifest-replace-plugin?minimal=true)
[](https://travis-ci.org/unchai/webpack-manifest-replace-plugin)
Webpack plugin to replace assets path using manifest context.
### Install
```shell
# for webpack 5
npm install --save-dev webpack-manifest-replace-plugin
# for webpack 4
npm install --save-dev webpack-manifest-replace-plugin@1.0.0
# for webpack 3
npm install --save-dev webpack-manifest-replace-plugin@0.0.4
```
### Usage
> :warning: `webpack-manifest-replace-plugin >= 1.0.0` is no longer required `manifest.json` file.
```javascript
const ManifestReplacePlugin = require('webpack-manifest-replace-plugin');
module.exports = {
...
plugins: [
new ManifestReplacePlugin({
include: path.resolve(__dirname, 'src'),
test: /\.(jsp|php|htm|html)$/,
})
]
...
};
```
## Options
|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|**`include`**|`{String}`|`undefined `| Files to include. |
|**`test`**|`{Pattern}`|`/\.(htm\|html)$/`| Test to match files against. |
|**`outputDir`**|`{String}`|`Webpack output.path`| Output directory for replaced files. |
## License
MIT © 2017 [unchai](https://github.com/unchai)