nuxt-community / nuxtent-module

Seamlessly use content files in your Nuxt.js sites.
https://nuxtent-module.netlify.com/guide
MIT License
388 stars 50 forks source link

nuxt.config.js generate.routes with callback instead of an array not supported? #127

Open ghost opened 6 years ago

ghost commented 6 years ago

"generate.routes" must be an array

Please add support for callback function routes. I got it to work by changing those lines

https://github.com/nuxt-community/nuxtent-module/blob/8f7afaa87706b27b30b927371eadd88b2a2b6ec2/lib/content/build.js#L61-L65

to support functions by doing nuxtOpts.generate.routes().then(routes => routes.concat(routeData))

but I can't get the module to build for whatever reason, or else I'd submit a pull request.

This question is available on Nuxt.js community (#c101)
florentb commented 5 years ago

Same problem here. Using Nextent in combinaison with dynamic routes (as explained in Nuxt doc) fails.