@bem-react/webpack-exp-plugin

webpack plugin – replace imports for experiments

Usage no npm install needed!

<script type="module">
  import bemReactWebpackExpPlugin from 'https://cdn.skypack.dev/@bem-react/webpack-exp-plugin';
</script>

README

Webpack-exp-plugin

Example - all components:

const webpackExpPlugin = require('@bem-react/webpack-exp-plugin')

module.exports = {
  entry: './src/index.js',
  output: './dist',
  plugins: [new webpackExpPlugin('@yandex/ui', { '*': 'css-modules-exp' })],
}

Example - Button only:

const webpackExpPlugin = require('@bem-react/webpack-exp-plugin')

module.exports = {
  entry: './src/index.js',
  output: './dist',
  plugins: [new webpackExpPlugin('@yandex/ui', { Button: 'new-button-exp' })],
}

Example - Button and Select:

const webpackExpPlugin = require('@bem-react/webpack-exp-plugin')

module.exports = {
  entry: './src/index.js',
  output: './dist',
  plugins: [
    new webpackExpPlugin('@yandex/ui', { Button: 'new-button-exp', Select: 'better-select-exp' }),
  ],
}