package.json
{
"name": "example-hello-world",
"dependencies": {
"nuxt": "latest"
},
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start"
}
}
page/index.vue
<template>
<div>
<h1>Welcome!</h1>
<nuxt-link to="/about">About page</nuxt-link>
</div>
</template>
<script>
export default {
head: {
title: "Home page"
}
}
</script>
page/about.vue
<template>
<div>
Hi from {{ name }}
<nuxt-link to="/">Home page</nuxt-link>
</div>
</template>
<script>
export default {
asyncData() {
return {
name: process.static ? "static" : (process.server ? "server" : "client")
}
},
head: {
title: "About page"
}
}
</script>
< H1 > error message is as follows < / H1 >