From 83fd79b3ae5c33b8d3b9d08605bce673dd4d9100 Mon Sep 17 00:00:00 2001 From: xiaohuoni Date: Wed, 18 Sep 2024 17:20:59 +0800 Subject: [PATCH] fix: webpack builder js error when use custom protocol --- packages/preset-umi/src/features/webpack/webpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/preset-umi/src/features/webpack/webpack.ts b/packages/preset-umi/src/features/webpack/webpack.ts index 6c727ff2f543..c069149cad3c 100644 --- a/packages/preset-umi/src/features/webpack/webpack.ts +++ b/packages/preset-umi/src/features/webpack/webpack.ts @@ -63,7 +63,7 @@ export default (api: IApi) => { const displayPublicPath = publicPath === 'auto' ? '/' : publicPath; return assets.js.map((js) => { - return `${displayPublicPath}${js}`; + return { src: `${displayPublicPath}${js}` }; }); }); };