Skip to content

Commit f559936

Browse files
More webpack fixes
1 parent 9dae886 commit f559936

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

repo-scripts/size-analysis/bundle/webpack.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import webpack from 'webpack';
1919
// @ts-ignore
2020
import virtualModulesPlugin from 'webpack-virtual-modules';
21-
import { createFsFromVolume, Volume } from 'memfs';
21+
import { createFsFromVolume, IFs, Volume } from 'memfs';
2222
import path from 'path';
2323
import { projectRoot } from '../util';
2424

@@ -71,15 +71,15 @@ export async function bundleWithWebpack(
7171
}
7272

7373
// Hack to get string output without reading the output file using an internal API from webpack
74-
res(stats.compilation.assets[outputFileName]._value);
74+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
75+
res((stats!.compilation.assets[outputFileName] as any)['_value']);
7576
});
7677
});
7778
}
7879

79-
function getMemoryFileSystem(): webpack.OutputFileSystem {
80+
function getMemoryFileSystem(): IFs {
8081
const fs = createFsFromVolume(new Volume());
8182
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8283
(fs as any).join = path.join.bind(path);
83-
84-
return (fs as unknown) as webpack.OutputFileSystem;
84+
return fs;
8585
}

0 commit comments

Comments
 (0)