Static GitHub Issues

[701] npm run generate and dynamic routes

prev: Reading meta tags: Title
next: 中文官网进不去

Hi there,

I can't get dynamic routes to work with nuxt generate.. I must be missing something?

  • create the starter project (vue init nuxt/starter <project-name>)
  • add the folder/file "pages/posts/_id.vue"
  • npm run generate

the docs tell me I should get an error (Could not generate the dynamic route /posts/:id, please add the mapping params in nuxt.config.js (generate.routeParams).)

But i don't get this error, its simply ignored and there is no file in the dist folder. Even if I do add the mapping params it is still ignored?

"npm run dev" works as expected

Thanks

<!--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/c602">#c602</a>)</em></sub></div>