webpack-entry-hash-plugin

0.0.5 • Public • Published

webpack-entry-hash-plugin

Modify the target file that references the webpack entry

Usage

module.exports = {
    entry: ['./index.js', './index.html'],
    /*
    entry: {
        index: ['./index.js', './index.html']
    }
    */
    ...
    plugins: {
        new EntryPlugins({
            file: './index.html',
            // or template
            toReplace: 'main.js',
            // optional   toReplace: 'main.js?[name]=index',
            publicPath: 'xxxx.com'
            // optional   template example: {%$data.url%}
        })
    }
    ...
}
 

options

  • file: the exported destination file
  • toReplace: replacement text
    • ?[name] = key : webpack replace [name]
  • publicPath: prefix,instead of the output.publicPath

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-entry-hash-plugin

Weekly Downloads

1

Version

0.0.5

License

MIT

Last publish

Collaborators

  • smilingxinyi