I’m currently using Nuxt 2 and now looking to move to Nuxt 3.
I am using Nuxt 2 programmatically to generate pages as so
import nuxt from 'nuxt'
const { Nuxt, Builder, Generator } = nuxt
const config = (await import('./default.config.js').default
const _nuxt = new Nuxt(config)
const builder = new Builder(_nuxt)
const generator = new Generator(_nuxt, builder)
// do stuff with some fetched data and config.generate.routes
const webData = await axios.get('MY_URL')
await generator.generate()
// manipulate generated files
Anyone know what’s the equivalent of Generator
in Nuxt 3 or if this is even possible in Nuxt 3?
Thinking about it, I’m trying to accomplish the same thing as npx nuxi generate
but programmatically with dynamic data
New contributor
grant is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.