Closed rickstaa closed 2 years ago
I just found the right syntax:
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
export default merge(common, {
mode: "production",
devtool: "source-map",
plugins: [new BundleAnalyzerPlugin()],
});
@rickstaa So it doesn't support type? (I cannot do auto/tab-completion in my IDE.)
@nyngwang I am not really sure. I vaguely remember it working in vscode. Maybe you can open a new issue to alert the developers?
Issue description
Sorry in advance for posting this as an issue but this repository does not seem to have a discussions tab. I'm trying to add this plugin to a Webpack project that bundles a ESM module. Since this plugin is still a commonjs plugin I tried the following syntax:
This however gives me the following error when trying to run webpack:
My question, therefore, is whether the
webpack-bundle-analyser
plugin supports this use-case?How to reproduce
Clone this example repository.
Install the node dependencies.
Run the
npm build
command.Technical info
Debug info
How do you use this module? As CLI utility or as plugin?: As a plugin.
If plugin, what options were provided? (e.g.
new BundleAnalyzerPlugin({ analyzerMode: 'disabled', generateStatsFile: true })
): No options.What other Webpack plugins were used?: None
Webpack stats file: Could not be generated.