Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ali322/chunk-asset-webpack-plugin
useful webpack plugin that change chunk files on fly
https://github.com/ali322/chunk-asset-webpack-plugin
webpack webpack4 webpack5
Last synced: 17 days ago
JSON representation
useful webpack plugin that change chunk files on fly
- Host: GitHub
- URL: https://github.com/ali322/chunk-asset-webpack-plugin
- Owner: ali322
- Created: 2018-03-22T07:37:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T05:33:33.000Z (almost 3 years ago)
- Last Synced: 2024-10-11T09:14:41.667Z (about 1 month ago)
- Topics: webpack, webpack4, webpack5
- Language: JavaScript
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
chunk-asset-webpack-plugin [![Build Status](https://travis-ci.org/ali322/chunk-asset-webpack-plugin.svg?branch=master)](https://travis-ci.org/ali322/chunk-asset-webpack-plugin) [![npm version](https://badge.fury.io/js/chunk-asset-webpack-plugin.svg)](https://badge.fury.io/js/chunk-asset-webpack-plugin)
===
[![NPM](https://nodei.co/npm/chunk-asset-webpack-plugin.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/chunk-asset-webpack-plugin/)useful plugin that change chunk files when webpack emit
Install
===```javascript
npm install chunk-asset-webpack-plugin --save--dev
```Usage
===add plugin in your webpack.config.js
```javascript
var ChunkAssetPlugin = require('chunk-asset-webpack-plugin')module.exports = {
entry:{
index:"./index.js",
},
module:{
loaders:[
...
]
},
output:{
path:'./dist',
filename:'[name].js'
},
plugins:[
new ChunkAssetPlugin({
chunks: {
index: files => files.map(file => 'foo/bar/' + file)
}
})
]
}
```Plugin Options
===- **chunks**: chunk files mapper, accept array or function take chunk files as first argument
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License)