Skip to content

Commit

Permalink
check this.compiler.outputFileSystem.constructor is not undefined (#447)
Browse files Browse the repository at this point in the history
* check this.compiler.outputFileSystem.constructor is not undefined

* Fix trailing spaces lint

* Update changelog with bug fix

Co-authored-by: Vesa Laakso <482561+valscion@users.noreply.github.com>
  • Loading branch information
kedarv and valscion committed May 17, 2021
1 parent 9029c9b commit 2bcf474
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@ _Note: Gaps between patch versions are faulty, broken or test releases._

## UNRELEASED

* **Bug Fix**
* 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))
* **NOTE:** This fix doesn't have added test coverage so the fix might break in future versions unless test coverage is added later.

## 4.4.1

* **Bug Fix**
Expand Down
3 changes: 3 additions & 0 deletions src/BundleAnalyzerPlugin.js
Expand Up @@ -134,6 +134,9 @@ class BundleAnalyzerPlugin {
}

getBundleDirFromCompiler() {
if (typeof this.compiler.outputFileSystem.constructor === 'undefined') {
return this.compiler.outputPath;
}
switch (this.compiler.outputFileSystem.constructor.name) {
case 'MemoryFileSystem':
return null;
Expand Down

0 comments on commit 2bcf474

Please sign in to comment.