New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@infomaximum/json-modify-webpack-plugin

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@infomaximum/json-modify-webpack-plugin

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

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
18
-14.29%
Maintainers
3
Weekly downloads
 
Created
Source

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;
                },
                },
            ],
        }),
    ];
}

Keywords

webpack

FAQs

Package last updated on 17 Sep 2024

Related posts