/webpack-component-override-plugin

override an already exist component without changes on main component

Primary LanguageJavaScriptMIT LicenseMIT

Installation

# npm
npm install --save-dev webpack-component-override-plugin
# yarn
yarn add -D webpack-component-override-plugin

Config

// webpack.config.js
const ComponentOverridePlugin = require('webpack-component-override-plugin')
module.exports = {
  ...
  resolve: {
    plugins: [
      new ComponentOverridePlugin([
            {
              prefix: 'resources\\\\js\\\\components',
              directories: [
                path.resolve('resources/override/components'),
                path.resolve('resources/js/components')
              ]
            }
          ]
      )
    ]
  },
};