mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +00:00
Use nuxt.build()
instead of promises
This commit is contained in:
parent
4d7102c3e1
commit
8c592ec3ae
@ -84,13 +84,10 @@ const options = {
|
||||
}
|
||||
|
||||
// Launch nuxt build with given options
|
||||
new Nuxt(options)
|
||||
.then((nuxt) => {
|
||||
// TODO: you can wrap below inside try/catch to catch any errors.
|
||||
let nuxt = new Nuxt(options).build();
|
||||
// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context)
|
||||
})
|
||||
.catch((error) {
|
||||
// If an error appended while building the project
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user