text: const path = require('path');
  
  module.exports = {
    mode: 'production',
    entry: './src/index.js',
    output: {
      path: path.resolve('lib'),
      filename: 'index.js',
      libraryTarget: 'commonjs2'
    },
    module: {
      rules: [
        {
          test: /\.js?$/,
          exclude: /(node_modules)/,
          use: 'babel-loader'
        }
      ]
    },
    resolve: {
      extensions: ['.js'],
      alias: { react: require.resolve("react") }
    },
    externals: {
      react: {
        root: 'react',
        commonjs2: 'react',
        commonjs: 'react',
        amd: 'react'
      }
    }
  };