Skip to content

Conversation

treenewlyn
Copy link

实现路由链接自动没有 'pages/'。

如果在 pages.json 文件上配置了 simplifyPath 为 true了:

image

则上图的文件路径为:“pages/index.vue” 和 "pages/my.vue“,路由地址则变为:

http://localhost:8080/index“

 http://localhost:8080/my

实现路由链接自动没有 'pages/'
@treenewlyn
Copy link
Author

如果没有这个功能,则原始链接为:

http://localhost:8080/pages/index

 http://localhost:8080/pages/my

@SilurianYang
Copy link

SilurianYang commented Apr 10, 2020

如果我的页面是放在非 pages 下的呢? 这么怎么操作,而不应该从cli上解决这个问题 应该通过 loader 来解决这个问题! 或者看看这个 桥接了H5的Router

@hbcui1984 hbcui1984 requested a review from zhetengbiji April 16, 2020 08:13
@januwA
Copy link

januwA commented Jun 30, 2020

将替换规则换成配置函数,也能应付不同项目文件构架

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

Successfully merging this pull request may close these issues.

3 participants