$ npm install pinia @pinia/nuxt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Enable the ESlint flat config support | |
"eslint.experimental.useFlatConfig": true, | |
// Disable the default formatter, use eslint instead | |
"prettier.enable": false, | |
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | |
"editor.formatOnSave": false, | |
"editor.formatOnPaste": true, | |
"eslint.format.enable": true, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default defineNuxtConfig({ | |
modules: ['@pinia/nuxt'], | |
}) |
.
βββ server
β βββ api
β βββ hello.ts
βββ ...
$ npx nuxi@latest init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default defineNuxtConfig({ | |
modules: ['@pinia/nuxt'], | |
pinia: { | |
storeDirs: ['./stores/**', './custom-folder/stores/**'], | |
}, | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VueGtag, { trackRouter } from 'vue-gtag-next' | |
export default defineNuxtPlugin((nuxtApp) => { | |
nuxtApp.vueApp.use(VueGtag, { | |
property: { | |
id: 'GA_MEASUREMENT_ID' | |
} | |
}) | |
trackRouter(useRouter()) | |
}) |
$ npm install vue-gtag -D
.
βββ layouts
β βββ default.vue
β βββ custom.vue
β βββ ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default [ | |
{ | |
name: aboutqwyr2lWwdIMeta?.name ?? "about", | |
path: aboutqwyr2lWwdIMeta?.path ?? "/about", | |
meta: aboutqwyr2lWwdIMeta || {}, | |
alias: aboutqwyr2lWwdIMeta?.alias || [], | |
redirect: aboutqwyr2lWwdIMeta?.redirect || undefined, | |
component: () => import("/Path/to/project/pages/about.vue").then(m => m.default || m) | |
}, | |
{ |
NewerOlder