From 9e93e1ac05a25a20bdbea32f70224ecee8d4c994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=AA=E5=B0=8F=E9=99=88?= Date: Thu, 19 Sep 2024 11:30:26 +0800 Subject: [PATCH] fix: webpack builder js error when use custom protocol (#12704) --- 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}` }; }); }); };