the nuxt.js's docs say that we should use process.server instand of isServer. When the middleware was running,I console.log(process) but I can't find process.server. why?
from a middleware, it should work
// middleware/demo.js
export default function () {
console.log(process.server) // if true check your server log, if false check your browser log
}
see my example https://github.com/NicoPennec/nuxt-weather/blob/master/middleware/check-renderer.js
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.