使用绝对URL调用Nested Nuxt 3路线
只是一个快速的问题,我找不到答案。
我有两个路由“/”
和“/auth”
。
-- pages
-- auth
-- index.vue
-- index.vue
当我调用“/”
时,一切都很好。当我调用“/auth” 带有
< nuxtlink to =“/auth”/>
component时,一切都起作用。 但是,当我调用url http:// localhost:3000/auth
时,我会获得基本NUXT 3 404错误屏幕。
这是我缺少的配置设置吗?
干杯
Just a quick question, that I couldn't find an answer to.
I have two routes "/"
and "/auth"
.
-- pages
-- auth
-- index.vue
-- index.vue
When I call "/"
everything is fine. When I call "/auth"
with a <NuxtLink to="/auth" />
component, everything works.
But when I call the url http://localhost:3000/auth
directly, I get the base Nuxt 3 404 error screen.
Is this a config setting I'm missing?
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己找到了答案:
如果我想使用
YARN DEV
我需要首先调用纱线生成
。希望这对别人也有帮助。
I found the answer myself:
If I want to use
yarn dev
I need to first callyarn generate
.Hope this helps someone else, too.