Webpack DLL - Include All Vendors

Viewed 55

Is there a way by which I can include all my node_modules in webpack dll.

module.exports = {
    mode: 'development',
    entry: {
        vendor: ['react', 'react-router', 'antd']
    },
    output: {
        filename: 'vendor.bundle.js',
        path: path.join(__dirname, 'build'),
        library: 'vendor_lib'
    },
    plugins: [
        new webpack.DllPlugin({
            name: 'vendor_lib',
            path: path.join(__dirname, 'build', 'vendor-manifest.json')
        })
    ]
}


I have so many node_modules and would like to include them all here. Thanks

0 Answers
Related