Skip to content

Commit eeb285e

Browse files
committed
fix: types
1 parent 6ea90ae commit eeb285e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/core/src/plugins/sri.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const pluginSri = (): RsbuildPlugin => ({
105105

106106
const hash = crypto
107107
.createHash(algorithm)
108-
.update(data)
108+
.update(data as unknown as Uint8Array)
109109
.digest()
110110
.toString('base64');
111111
const integrity = `${algorithm}-${hash}`;

packages/core/src/server/devServer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ export async function createDevServer<
122122
https,
123123
};
124124

125-
let outputFileSystem: Rspack.OutputFileSystem = fs;
125+
// TODO: remove this type assertion after Rspack fix the type definition
126+
let outputFileSystem = fs as Rspack.OutputFileSystem;
126127
let lastStats: Rspack.Stats[];
127128

128129
// should register onDevCompileDone hook before startCompile
@@ -166,10 +167,11 @@ export async function createDevServer<
166167

167168
await compilerDevMiddleware.init();
168169

170+
// TODO: remove this type assertion after Rspack fix the type definition
169171
outputFileSystem =
170172
(isMultiCompiler(compiler)
171173
? compiler.compilers[0].outputFileSystem
172-
: compiler.outputFileSystem) || fs;
174+
: compiler.outputFileSystem) || (fs as Rspack.OutputFileSystem);
173175

174176
return {
175177
middleware: compilerDevMiddleware.middleware,

0 commit comments

Comments
 (0)