refactor: migrate to nuxt
This commit is contained in:
81
nuxt.config.ts
Normal file
81
nuxt.config.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
import process from 'node:process'
|
||||
import { pwa } from './config/pwa'
|
||||
import { appDescription } from './constants/index'
|
||||
|
||||
Object.assign(process.env, {
|
||||
VITE_COMMIT_REF: process.env.CF_PAGES_COMMIT_SHA || '',
|
||||
})
|
||||
|
||||
export default defineNuxtConfig({
|
||||
modules: [
|
||||
'@vueuse/nuxt',
|
||||
'@unocss/nuxt',
|
||||
'@pinia/nuxt',
|
||||
'@nuxtjs/color-mode',
|
||||
'@vite-pwa/nuxt',
|
||||
'@nuxt/content',
|
||||
'@zadigetvoltaire/nuxt-gtm',
|
||||
],
|
||||
|
||||
experimental: {
|
||||
// when using generate, payload js assets included in sw precache manifest
|
||||
// but missing on offline, disabling extraction it until fixed
|
||||
payloadExtraction: false,
|
||||
inlineSSRStyles: false,
|
||||
renderJsonPayloads: true,
|
||||
typedPages: true,
|
||||
},
|
||||
|
||||
css: [
|
||||
'@unocss/reset/tailwind.css',
|
||||
'~/styles/css-vars.scss',
|
||||
'~/styles/index.scss',
|
||||
],
|
||||
|
||||
colorMode: {
|
||||
classSuffix: '',
|
||||
},
|
||||
|
||||
nitro: {
|
||||
esbuild: {
|
||||
options: {
|
||||
target: 'esnext',
|
||||
},
|
||||
},
|
||||
prerender: {
|
||||
crawlLinks: false,
|
||||
routes: ['/'],
|
||||
ignore: ['/hi'],
|
||||
},
|
||||
},
|
||||
|
||||
app: {
|
||||
head: {
|
||||
viewport: 'width=device-width,initial-scale=1',
|
||||
link: [
|
||||
{ rel: 'icon', href: '/favicon.ico', sizes: 'any' },
|
||||
{ rel: 'icon', type: 'image/svg+xml', href: '/nuxt.svg' },
|
||||
{ rel: 'apple-touch-icon', href: '/apple-touch-icon.png' },
|
||||
],
|
||||
meta: [
|
||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||
{ name: 'description', content: appDescription },
|
||||
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
components: [
|
||||
{ path: '~/components', pathPrefix: false },
|
||||
],
|
||||
|
||||
gtm: {
|
||||
id: 'GTM-5FJSV46',
|
||||
},
|
||||
|
||||
pwa,
|
||||
|
||||
devtools: {
|
||||
enabled: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user