Skip to content

wongnai/define-after-bundle-webpack-plugin

Repository files navigation

Define After Bundle Webpack Plugin

semantic-release JavaScript Style Guide ts code style: prettier License: MIT

Webpack Plugin with the same concept as DefinePlugin, but apply after bundle.

Installation

yarn add --dev define-after-bundle-webpack-plugin

Usage

In your webpack config

const { DefineAfterBundleWebpackPlugin } = require('define-after-bundle-webpack-plugin')

module.exports = {
    ...
    plugins: [
        ...,
        new DefineAfterBundleWebpackPlugin({
            '<Value to be replaced>': '<Value to replace>',
        })
    ]
}