47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
import type {
|
|
NuxtPage
|
|
} from 'nuxt/schema'
|
|
|
|
export default defineNuxtConfig({
|
|
devtools: { enabled: true },
|
|
modules: [
|
|
'@pinia/nuxt',
|
|
],/*
|
|
buildModules: [
|
|
'@nuxtjs/composition-api/module',
|
|
['@pinia/nuxt', { disableVuex: false }],
|
|
],*/
|
|
devServer: {
|
|
https: {
|
|
key: './certs/privkey.pem',
|
|
cert: './certs/fullchain.pem'
|
|
}
|
|
},
|
|
vite: {
|
|
server: {
|
|
cors: {
|
|
origin: true,
|
|
optionsSuccessStatus: 204,
|
|
},
|
|
}
|
|
},
|
|
// hooks: {
|
|
// 'pages:extend'(pages) {
|
|
// function setMiddleware(pages: NuxtPage[]) {
|
|
// for (const page of pages) {
|
|
// if (/* some condition */ true) {
|
|
// page.meta ||= {}
|
|
// // Note that this will override any middleware set in `definePageMeta` in the page
|
|
// page.meta.middleware = ['auth']
|
|
// }
|
|
// if (page.children) {
|
|
// setMiddleware(page.children)
|
|
// }
|
|
// }
|
|
// }
|
|
// setMiddleware(pages)
|
|
// }
|
|
// }
|
|
})
|