autodll-webpack-plugin icon indicating copy to clipboard operation
autodll-webpack-plugin copied to clipboard

how to use this plugin with create-react-app & craco ?

Open littlee opened this issue 4 years ago • 1 comments

create-react-app and craco are popular tools when developing react app, an integrate example with those tools would be nice.

I've tried the config below, but it doesn't works

// craco.config.js
const AutoDllPlugin = require('autodll-webpack-plugin');
const path = require('path');
module.exports = {
  webpack: {
    plugins: [
      new AutoDllPlugin({
        inject: true,
        filename: '[name]_[hash].js',
        context: path.join(__dirname, '..'),
        path: './dll',
        entry: {
          vendor: ['react', 'react-dom']
        }
      })
    ]
  }
};

littlee avatar Jan 22 '21 11:01 littlee

  • 1

blockmood avatar Apr 18 '23 03:04 blockmood