🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@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
Maintainers
3
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

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts