Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vite 里使用hash路由方式做离线包问题咨询? #16

Open
minchangyong opened this issue Oct 27, 2023 · 1 comment
Open

vite 里使用hash路由方式做离线包问题咨询? #16

minchangyong opened this issue Oct 27, 2023 · 1 comment

Comments

@minchangyong
Copy link

目前我们启动server在客户端内访问正常,使用file://协议加载本地html也是正常,但是存在路由问题,即我访问超过3页,点击返回它会返回到第一页,实际它返回到了第三页再返回到了第一页,通过查询window.history.state.position可以看到层级变化。
A(push) > B(replace) > C(push) > D(调用router.go(-1)) server访问D返回C。本地:D返回C然后又返回到了A。视觉上看着是D返回到了A,C页面打印的log查看到,其实返回到了C,C没有返回上一页的逻辑。

问下是否有同学解决该问题。

插件使用了 vite版本的“vite-plugin-offline-package”,主要是改造了webpack版:offline-package-webpack-plugin

@minchangyong
Copy link
Author

minchangyong commented Oct 27, 2023

同时想问下 是否支持uniapp里使用你这个webpack版的打包插件呢,因为之前测试不支持,所以我们新建了个vite项目,改造了打包的内容。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant