mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
update config example auth-routes
This commit is contained in:
parent
4895433d33
commit
4d7102c3e1
11
examples/auth-routes/nuxt.config.js
Normal file
11
examples/auth-routes/nuxt.config.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
module.exports = {
|
||||||
|
head: {
|
||||||
|
title: 'Auth Routes',
|
||||||
|
meta: [
|
||||||
|
{ charset: 'utf-8' },
|
||||||
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||||
|
{ hid: 'description', content: 'Auth Routes example' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
loading: { color: '#3B8070' }
|
||||||
|
}
|
@ -31,7 +31,9 @@ app.post('/api/logout', function (req, res) {
|
|||||||
|
|
||||||
// We instantiate Nuxt.js with the options
|
// We instantiate Nuxt.js with the options
|
||||||
const isProd = process.env.NODE_ENV === 'production'
|
const isProd = process.env.NODE_ENV === 'production'
|
||||||
const nuxt = new Nuxt({ dev: !isProd })
|
let config = require('./nuxt.config.js')
|
||||||
|
config.dev = !isProd
|
||||||
|
const nuxt = new Nuxt(config)
|
||||||
// No build in production
|
// No build in production
|
||||||
const promise = (isProd ? Promise.resolve() : nuxt.build())
|
const promise = (isProd ? Promise.resolve() : nuxt.build())
|
||||||
promise.then(() => {
|
promise.then(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user