taro
taro copied to clipboard
h5打包部署二级目录空白
相关平台
H5
浏览器版本: Google Chrome 124.0.6367.63 使用框架: Vue 3
复现步骤
nginx配置:
location / {
root /usr/share/nginx/html/aaa;
index index.html;
try_files $uri $uri/ /index.html;
}
这样是正常的
location /bbb {
root /usr/share/nginx/html/bbb; //或alias /usr/share/nginx/html/bbb ;
index index.html;
try_files $uri $uri/ /index.html;
}
config/index/h5 => publicPath: './'或publicPath: '/'或publicPath: './bbb'或publicPath: '/bbb' 都是空白,app.js、app.cs可以加载,其它js、css都没加载,控制台也没有报错。求教怎么改配置
期望结果
正常运行
实际结果
界面 空白
环境信息
� Taro v3.6.28
Taro CLI 3.6.28 environment info:
System:
OS: Windows 10 10.0.19042
Binaries:
Node: 20.12.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 3.6.28 => 3.6.28
@tarojs/components: 3.6.28 => 3.6.28
@tarojs/helper: 3.6.28 => 3.6.28
@tarojs/plugin-framework-vue3: 3.6.28 => 3.6.28
@tarojs/plugin-html: 3.6.28 => 3.6.28
@tarojs/plugin-platform-alipay: 3.6.28 => 3.6.28
@tarojs/plugin-platform-h5: 3.6.28 => 3.6.28
@tarojs/plugin-platform-jd: 3.6.28 => 3.6.28
@tarojs/plugin-platform-qq: 3.6.28 => 3.6.28
@tarojs/plugin-platform-swan: 3.6.28 => 3.6.28
@tarojs/plugin-platform-tt: 3.6.28 => 3.6.28
@tarojs/plugin-platform-weapp: 3.6.28 => 3.6.28
@tarojs/runtime: 3.6.28 => 3.6.28
@tarojs/shared: 3.6.28 => 3.6.28
@tarojs/taro: 3.6.28 => 3.6.28
@tarojs/taro-loader: 3.6.28 => 3.6.28
@tarojs/webpack5-runner: 3.6.28 => 3.6.28
babel-preset-taro: 3.6.28 => 3.6.28
eslint-config-taro: 3.6.28 => 3.6.28