Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Mar 12, 2024
1 parent c751471 commit e799ad3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { join } from 'path';
import { existsSync, readFileSync } from 'fs-extra';
import glob from 'fast-glob';
import send from 'send';
import * as stream from "stream";

function findPublicAsset(relativePath: string, resolver: Resolver) {
const packageCache = resolver.packageCache;
Expand Down Expand Up @@ -41,7 +42,7 @@ export function assets(): Plugin {
if (req.originalUrl && req.originalUrl.length > 1) {
const assetUrl = findPublicAsset(req.originalUrl, resolverLoader.resolver);
if (assetUrl) {
return send(req, assetUrl).pipe(res);
return send(req as stream.Readable, assetUrl).pipe(res);
}
}
return next();
Expand Down

0 comments on commit e799ad3

Please sign in to comment.