webpack-rename-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

webpack-rename-plugin

Webpack-rename-plugin is a plugin for webpack to rename the file which you want it diffrent from the output.filename.

Install

npm i -D webpack-rename-plugin

API


Notice: the origin property only work for the entry module.


// webpack.config.js

const WebpackRenamePlugin = require('webpack-rename-plugin')

module.exports={
    //...
    plugins:[
        new WebpackRenamePlugin({
            origin: /background/,  // regexp
            outputName: '[name].js'  //string
        })

        //or
        new WebpackRenamePlugin([
            {
                origin: /your\/path/,  // regexp
                outputName: '[name].js'  //string
            },
            {
                origin: /your\/other\/path/,  // regexp
                outputName: '[name].js'  //string
            },
        ])
    ]

}

Package Sidebar

Install

npm i webpack-rename-plugin

Weekly Downloads

2

Version

0.0.2

License

ISC

Unpacked Size

3.14 kB

Total Files

4

Last publish

Collaborators

  • gapkukb