Get /blog/[slug].js and /blog/index.js out of next export #16534
Unanswered
funwhilelost
asked this question in
Help
Replies: 1 comment 2 replies
-
You can export use following in module.exports = {
trailingSlash: true
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just upgraded to Next 9 and started using the dynamic routing from the package. Awesome work! One thing that's throwing me for a loop is the files coming out of this situation:
pages/blog/[slug].js
->out/blog/post-name.html
pages/blog/index.js
->out/blog.html
This is a bit confusing to me because when I use
npx serve out
ornpx http-server out
neither of them will renderhttp://localhost:8080/blog
. They're looking for/out/blog/index.html
which is not being created. My /blog/index.js source is being exported asblog.html
which is not one of the fallbacks for either of the basic, static-file servers.Is there a config option I can set, or a
getStaticPaths
configuration I can give, or something else entirely?Beta Was this translation helpful? Give feedback.
All reactions