1.0.12 • Published 8 months ago

chrome-extension-manifest-webpack-plugin v1.0.12

Weekly downloads
3
License
MIT
Repository
github
Last release
8 months ago

chrome-extension-manifest-webpack-plugin

Webpack plugin which allows you to modify your extension manifest

Usage:

const ChromeExtensionManifest = require('chrome-extension-manifest-webpack-plugin');
new ChromeExtensionManifest({
        inputFile: '../path/to/manifest.json',
        outputFile: '../path/to/manifest.json',
        replace: [{
           pattern: /__FOO__/g,
           value: args.foo
        }],
        hash: {
          pattern: /\[hash\]/g,
        },
        props: {
            version: getVersion(args.version)     
        }
})

Options:

  • inputFile: Existing manifest file.

  • outputFile: Newly created manifest file

  • hash: An object containing the pattern to search for the hash value.

  • This is useful when you want to replace the hash value in the manifest file with the actual hash value generated by webpack.
  • for example, index.bundle.hash.js -> index.bundle.123456.js
  • The pattern should be a regular expression, default: /[hash]/g

  • replace: Array of objects with the follwing keys:\ pattern: pattern to search for\ value: value to be replaced with

  • options: An object containing optional flags
    • allowEmpty: Allow defining an empty replacement value, default: false.
  • props: add new or overwrite manifest entries
1.0.9

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.12

8 months ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago