fallback-webpack-plugin

Plugin that simplifies module replacement with a fallback.

Usage no npm install needed!

<script type="module">
  import fallbackWebpackPlugin from 'https://cdn.skypack.dev/fallback-webpack-plugin';
</script>

README

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