alibaba / ice

🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
https://ice.work
MIT License
17.8k stars 2.09k forks source link

构建后的build 文件 点击index.html 直接访问提示路径报错 #6862

Closed dengying918 closed 2 months ago

dengying918 commented 2 months ago

Describe the bug

构建后的build 文件 点击index.html 直接访问提示路径报错

企业微信截图_17128887018580

Expected behavior

构建后的build 文件 点击index.html 直接访问提示路径报错

企业微信截图_17128887018580

Actual behavior

No response

Version of ice.js

3.0

Content of build.json or ice.config.mts

No response

Additional context

No response

ClarkXia commented 2 months ago

参考 https://v3.ice.work/docs/guide/basic/config/#publicpath window 下可以试试将 publicPath 设置成 ./,如果最终是要部署到服务器的,需要配置成部署的服务器地址

dengying918 commented 2 months ago

路由设置为 hash 这样静态页面访问就没问题了