详细问题描述
[内容]
hbuilder打包react生成的dist目录的文件 但是router无法跳转,或者失效,而同样为单页面应用的vue 则没有这个现象。
重现步骤
[步骤] react项目, webpack打包出dist生产文件, hbuilder打包APP
[结果] 生成后的APP 打开后路由有问题
[期望] 生成后的APP 页面正常跳转 项目正常运行
运行环境 windows
[系统版本]
[浏览器版本]
[IDE版本]
[mui版本]
附件
[代码片段]
[安装包]
联系方式
[QQ]
[电话]
3 个回复
7***@qq.com
看一下你的路由模式,有些模式本地不能使用
1***@qq.com (作者)
这是路由配置,不过我大概知道问题原因了。
猫爱水煮鱼 - 号客服哈市的废话
请问解决了吗?我也遇到了同样的问题,在webpack的服务器8080端口开发调试好好的,本地80端口只能打开主页,其他路径都是报错的
[an error occurred while processing this directive] The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. [an error occurred while processing this directive]
这是页面报错信息
下面是控制台报错信息
Error in event handler for (unknown): TypeError: Cannot read property 'textContent' of null
at displayError (chrome-extension://chklaanhfefbnpoihckbnefhakgolnmc/content.js:4:99)
at chrome-extension://chklaanhfefbnpoihckbnefhakgolnmc/content.js:282:4