Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check this.compiler.outputFileSystem.constructor is not undefined #447

Merged
merged 3 commits into from May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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