1.0.0 • Published 5 years ago

chunk-asset-webpack-plugin v1.0.0

Weekly downloads
29
License
MIT
Repository
github
Last release
5 years ago

chunk-asset-webpack-plugin Build Status npm version

NPM

useful plugin that change chunk files when webpack emit

Install

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

Usage

add plugin in your webpack.config.js

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

1.0.0

5 years ago

0.0.2

7 years ago

0.0.1

7 years ago