File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,17 +229,19 @@ class BundleAnalyzerPlugin {
229229 }
230230
231231 getBundleDirFromCompiler ( ) {
232- const outputFileSystem =
233- /** @type {OutputFileSystem } */
234- ( /** @type {Compiler } */ ( this . compiler ) . outputFileSystem ) ;
232+ const { outputFileSystem } = /** @type {Compiler } */ ( this . compiler ) ;
233+
234+ // TypeScript thinks `outputFileSystem` can be null, but in practice it's always set
235+ // when this method is called
236+ const outputFs = /** @type {OutputFileSystem } */ ( outputFileSystem ) ;
235237
236238 // Detect `memfs` (used by webpack-dev-server 4+) by checking for the `__vol` property
237239 // Related: #471
238- if ( /** @type {{ __vol?: unknown } } */ ( outputFileSystem ) . __vol ) {
240+ if ( /** @type {{ __vol?: unknown } } */ ( outputFs ) . __vol ) {
239241 return null ;
240242 }
241243
242- const outputFileSystemConstructor = outputFileSystem . constructor ;
244+ const outputFileSystemConstructor = outputFs . constructor ;
243245
244246 if ( typeof outputFileSystemConstructor === "undefined" ) {
245247 return /** @type {Compiler } */ ( this . compiler ) . outputPath ;
You can’t perform that action at this time.
0 commit comments