Static GitHub Issues

[2716] Incorrect route generated for page name with underscore

prev: Pass Data into Transition
next: "in-out" transition modes can never animate out?

Hi, I found an issue with route generation for pages that contain an underscore in the name.

When page name is pages/sept_2017.vue Observed route path is /sept:2017? Expected route path to be /sept_2017

I'm testing by inspecting this.$nuxt._router.options.routes in the browser:

{path: "/sept:2017?", component: function, name: "sept2017"}

The main problem is that the ? wildcard matches invalid paths like sept_2017njakljsndflkajsndflkajsdf, which breaks 404 routing.

You can work around the problem by removing the underscore from the page filename.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2360">#c2360</a>)</em></sub></div>