From 2fe4adc9e21ba26fd25b00994c0fbb3611599512 Mon Sep 17 00:00:00 2001 From: chenliangngng <49113930+chenliangngng@users.noreply.github.com> Date: Tue, 31 May 2022 15:03:30 +0800 Subject: [PATCH] fix: build error with 'publicPath' ```bash $ alita build Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating Validate config "publicPath" failed, config.publicPath must end with /. Error: config.publicPath must end with /. ``` --- config/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.ts b/config/config.ts index 7115440..1e1f34b 100644 --- a/config/config.ts +++ b/config/config.ts @@ -3,7 +3,7 @@ const isCordova = false; const outputPath = isCordova ? 'www' : 'dist'; const env = process.env.NODE_ENV; // 这里需要对应服务器地址 -const path = env === 'development' ? 'http://127.0.0.1:8000/' : outputPath; +const path = env === 'development' ? 'http://127.0.0.1:8000/' : `${outputPath}/`; export default { appType: isCordova ? 'cordova' : 'h5',