@infomaximum/json-modify-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Installation

yarn add @infomaximum/json-modify-webpack-plugin

Usage

const { JsonModifyWebpackPlugin } = require("./plugin");
const PackageJSON = require("./package.json");

const webpackConfig = {
    entry: [
        "./src/index.js",
        "./manifest.json"
    ],
    output: {
        path: path.resolve("build"),
        filename: packageFilename,
        clean: true,
    },
    plugins: [
        new JsonModifyWebpackPlugin({
            matchers: [
                {
                matcher: /^manifest.json$/,
                action: (currentJsonContent) => {
                    currentJsonContent.version = PackageJSON.version;

                    return currentJsonContent;
                },
                },
            ],
        }),
    ];
}

Package Sidebar

Install

npm i @infomaximum/json-modify-webpack-plugin

Weekly Downloads

3

Version

1.0.2

License

Apache-2.0

Unpacked Size

27.6 kB

Total Files

6

Last publish

Collaborators

  • pimenovv95
  • saneksa20
  • infomaximum-dev