Skip to content

how to use it by import and webpack chain #652

@vaynevayne

Description

@vaynevayne
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
 webpackChain(chain, _webpack) {
chain.resolve.plugin('webpack-bundle-analyzer').use(BundleAnalyzerPlugin()) 
// TypeError: Class constructor BundleAnalyzerPlugin cannot be invoked without 'new'
}

What is the correct usage?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions