Slashgear / fallback-webpack-plugin

Simplifies replacement module plugin with fallback feature.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fallback webpack plugin

Plugin that simplifies module replacement with a fallback.

Install

npm i --save-dev fallback-webpack-plugin
yarn add --dev fallback-webpack-plugin

Usage

const FallbackWebpackPlugin = require("fallback-webpack-plugin");

module.exports = {
  entry: "index.js",
  output: {
    path: __dirname + "/dist",
    filename: "index.bundle.js",
  },
  plugins: [
    new FallbackWebpackPlugin(
      "branchDirectory",
      "currentVariant",
      "fallbackDir"
    ),
  ],
};

About

Simplifies replacement module plugin with fallback feature.


Languages

Language:JavaScript 56.3%Language:TypeScript 43.7%