Skip to content

Commit e53ec6c

Browse files
committed
fix: fix comments
1 parent 814bf39 commit e53ec6c

File tree

3 files changed

+4242
-7
lines changed

3 files changed

+4242
-7
lines changed

src/BundleAnalyzerPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class BundleAnalyzerPlugin {
3131
}
3232

3333
apply(compiler) {
34-
const isFromWebpackDevServer = process.env.WEBPACK_SERVE === 'true';
34+
const isWebpack5 = !!(compiler.webpack);
3535

3636
this.compiler = compiler;
3737

3838
this.logger = require('webpack/lib/logging/runtime')?.getLogger(PLUGIN_NAME)
3939
|| new Logger(this.opts.logLevel);
4040

4141
const done = (stats, callback) => {
42-
this.fs = isFromWebpackDevServer ? compiler.outputFileSystem : require('fs');
42+
this.fs = isWebpack5 ? compiler.outputFileSystem : require('fs');
4343
callback = callback || (() => {});
4444

4545
const actions = [];

0 commit comments

Comments
 (0)