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

打包后的页面路径能否不以index结尾 #90

Open
LastHeaven opened this issue Feb 26, 2020 · 8 comments
Open

打包后的页面路径能否不以index结尾 #90

LastHeaven opened this issue Feb 26, 2020 · 8 comments
Labels

Comments

@LastHeaven
Copy link

LastHeaven commented Feb 26, 2020

需要兼容项目已经投入推广使用的小程序二维码,kbone打包后的页面路径以index结尾导致项目无法使用kbone进行开发。希望能有个配置项能配置是否以index结尾的打包方式。

// mp-webpack-plugin/src/index.js
186 const pageRoute = `${packageName ? packageName + '/' : ''}pages/${entryName}/index`
// miniprogram-render/src/bom/miniprogram.js
59 return `/${packageName ? packageName + '/' : ''}pages/${pageName}/index`
@xxxBW
Copy link

xxxBW commented Mar 4, 2020

kbone开发的是web项目,编译之后才是小程序项目哦

@LastHeaven
Copy link
Author

@xxxBW 对啊,就是小程序项目的页面路径都带上了index啊

@xxxBW
Copy link

xxxBW commented Mar 5, 2020

这个具体场景是啥呢?会有什么影响么

@toowell2015
Copy link

这个具体场景是啥呢?会有什么影响么

我也遇到这个问题,现有小程序项目文件都是/main.结尾

@LastHeaven
Copy link
Author

@xxxBW 比如之前上线的项目扫描二维码跳到的页面链接是/page/activity/1,改成kbone之后页面链接变成了/page/activity/1/index。以前推广出去的二维码又不能修改,导致项目无法使用kbone进行开发

@JuneAndGreen
Copy link
Collaborator

明白你的诉求了,这里固定路径规范是为了方便做页面的管理、分享等,自定义路径的话就会比较混乱了。但是你的场景用起来确实有点尴尬,我们想想有没有比较好的手段来处理。

@ShmilyLin
Copy link

坐等解决这个问题

@ywmail
Copy link

ywmail commented Feb 2, 2021

坐等解决这个问题

最好是小程序支持配置路由和文件夹路径的配置,类似百度小程序。
但是小程序不支持,我是建了个空页面,做的重定向,避免原二维码失效。

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

No branches or pull requests

6 participants