0.0.19 • Published 7 years ago

chunk-transform-webpack-plugin v0.0.19

Weekly downloads
244
License
MIT
Repository
github
Last release
7 years ago

chunk-transform-webpack-plugin Build Status npm version

NPM

useful webpack plugin that transform chunk on fly,change existed chunk's files or create new chunk that contain specified chunk's files

Install

npm install chunk-transform-webpack-plugin --save--dev

Usage

add plugin in your webpack.config.js

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

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

8 years ago

0.0.15

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago