Skip to content

Commit 2bcf474

Browse files
kedarvvalscion
andauthored
check this.compiler.outputFileSystem.constructor is not undefined (#447)
* check this.compiler.outputFileSystem.constructor is not undefined * Fix trailing spaces lint * Update changelog with bug fix Co-authored-by: Vesa Laakso <[email protected]>
1 parent 9029c9b commit 2bcf474

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ _Note: Gaps between patch versions are faulty, broken or test releases._
1212

1313
## UNRELEASED
1414

15+
* **Bug Fix**
16+
* Fix failure with `compiler.outputFileSystem.constructor` being `undefined` ([#447](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/447) by [@kedarv](https://github.com/kedarv) and [@alexander-akait](https://github.com/alexander-akait))
17+
* **NOTE:** This fix doesn't have added test coverage so the fix might break in future versions unless test coverage is added later.
18+
1519
## 4.4.1
1620

1721
* **Bug Fix**

src/BundleAnalyzerPlugin.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ class BundleAnalyzerPlugin {
134134
}
135135

136136
getBundleDirFromCompiler() {
137+
if (typeof this.compiler.outputFileSystem.constructor === 'undefined') {
138+
return this.compiler.outputPath;
139+
}
137140
switch (this.compiler.outputFileSystem.constructor.name) {
138141
case 'MemoryFileSystem':
139142
return null;

0 commit comments

Comments
 (0)