https://github.com/hubcarl/webpack-manifest-resource-plugin
normalize js/css resource dependencies for webpack-manifest-plugin
https://github.com/hubcarl/webpack-manifest-resource-plugin
webpack webpack-manifest webpack-manifest-plugin webpack-resource-dependencies
Last synced: 3 months ago
JSON representation
normalize js/css resource dependencies for webpack-manifest-plugin
- Host: GitHub
- URL: https://github.com/hubcarl/webpack-manifest-resource-plugin
- Owner: hubcarl
- License: mit
- Created: 2017-11-17T06:46:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-23T12:01:02.000Z (almost 4 years ago)
- Last Synced: 2025-01-11T20:42:19.970Z (5 months ago)
- Topics: webpack, webpack-manifest, webpack-manifest-plugin, webpack-resource-dependencies
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
# webpack-manifest-resource-plugin
normalize js/css resource dependencies for [webpack-manifest-plugin](https://github.com/danethurber/webpack-manifest-plugin)
## Install
```bash
npm install --save-dev webpack-manifest-resource-plugin
```## Usage
var ManifestPlugin = require('webpack-manifest-resource-plugin');
```js
module.exports = {
// ...
plugins: [
new ManifestPlugin()
]
};
```This will generate a manifest.json file in your root output directory with a mapping of all source file names to their corresponding output file, for example:
```json
{
"mods/alpha.js": "mods/alpha.1234567890.js",
"mods/alpha.css": "mods/alpha.435336266.css",
"mods/omega.js": "mods/omega.0987654321.js",
"mods/omega.css": "mods/omega.323299900.css",
"vendor": "vendor.32465656.js"deps:{
"mods/alpha.js":{
js: ["vendor.32465656.js", "mods/alpha.1234567890.js"],
css: ["mods/alpha.435336266.css"]
},
"mods/omega.js":{
js: ["vendor.32465656.js", "mods/omega.0987654321.js"],
css: ["mods/omega.323299900.css"]
}
}
}
```## API
support [webpack-manifest-plugin](https://github.com/danethurber/webpack-manifest-plugin) all api, and add commonsChunk config:
### `options.commonsChunk`
Type: `Array`
Default: `[]`the `commonsChunk` is `webpack.optimize.CommonsChunkPlugin` name config.