Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ali322/chunk-transform-webpack-plugin
transform webpack chunk or create new chunk by files
https://github.com/ali322/chunk-transform-webpack-plugin
webpack webpack-plugin
Last synced: 10 days ago
JSON representation
transform webpack chunk or create new chunk by files
- Host: GitHub
- URL: https://github.com/ali322/chunk-transform-webpack-plugin
- Owner: ali322
- Created: 2017-01-08T15:04:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-21T04:32:58.000Z (over 6 years ago)
- Last Synced: 2024-10-12T09:14:46.821Z (about 1 month ago)
- Topics: webpack, webpack-plugin
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
chunk-transform-webpack-plugin [![Build Status](https://travis-ci.org/ali322/chunk-transform-webpack-plugin.svg?branch=master)](https://travis-ci.org/ali322/chunk-transform-webpack-plugin) [![npm version](https://badge.fury.io/js/chunk-transform-webpack-plugin.svg)](https://badge.fury.io/js/chunk-transform-webpack-plugin)
===
[![NPM](https://nodei.co/npm/chunk-transform-webpack-plugin.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/chunk-transform-webpack-plugin/)useful webpack plugin that transform chunk on fly,change existed chunk's files or create new chunk that contain specified chunk's files
Install
===```javascript
npm install chunk-transform-webpack-plugin --save--dev
```Usage
===add plugin in your webpack.config.js
```javascript
var ChunkTransformPlugin = require('chunk-transform-webpack-plugin')
var ExtractTextPlugin = require('extract-text-webpack-plugin')module.exports = {
entry:{
index:"./index.js",
vendor:"./vendor.css"
},
module:{
loaders:[
...
]
},
output:{
path:'./dist',
filename:'[name].min.js'
},
plugins:[
new ExtractTextPlugin('[name]-[hash].css'),
new ChunkTransformPlugin({
filename:'./vendor.css',
chunks:['vendor'],
test:/\.css/
})
]
}
```Plugin Options
===- **filename**: dist chunk files template,accept string or function that take original filename as argument
- **chunks**: array of chunks changed
- **chunkName**: new chunk name that contain specified chunk's files
- **test**: predicator of chunk's files,accept regxp expression or function that take original filename as argument or string that exactly match file## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License)