Fixes: 1) Correct mutation name from `setlanguage` to `setLanguage` for consistency; 2) Improve product listing reactivity by addressing missing initialization in `useStore`; 3) Replace generic product queries with parametrized `useProducts` for modularity; 4) Resolve minor typos, missing semicolons, and code formatting inconsistencies. Extra: 1) Refactor feedback-related types, composables, and GraphQL utilities for modularity; 2) Update styles, Vue templates, and related scripts with enhanced formatting; 3) Remove unused methods like `getProducts`, standardizing query reactivity; 4) Cleanup and organize imports across multiple files.
97 lines
No EOL
2.5 KiB
TypeScript
97 lines
No EOL
2.5 KiB
TypeScript
import { defineNuxtConfig } from 'nuxt/config';
|
|
import { i18nConfig } from './config/i18n';
|
|
import {fileURLToPath, URL} from "node:url";
|
|
import { resolve } from 'node:path';
|
|
|
|
export default defineNuxtConfig({
|
|
ssr: true,
|
|
devtools: { enabled: true },
|
|
typescript: { strict: true },
|
|
modules: [
|
|
"@nuxtjs/i18n",
|
|
"@nuxt/icon",
|
|
"@pinia/nuxt",
|
|
"@nuxtjs/apollo",
|
|
"@vueuse/nuxt",
|
|
"@element-plus/nuxt",
|
|
"nuxt-marquee",
|
|
"@nuxt/image"
|
|
],
|
|
i18n: i18nConfig,
|
|
apollo: {
|
|
autoImports: true,
|
|
clients: {
|
|
default: {
|
|
httpEndpoint: `https://api.${process.env.EVIBES_BASE_DOMAIN}/graphql/`,
|
|
connectToDevTools: true,
|
|
authType: 'Bearer',
|
|
authHeader: 'X-EVIBES-AUTH',
|
|
tokenStorage: 'cookie',
|
|
tokenName: `${process.env.EVIBES_PROJECT_NAME?.toLowerCase()}-access`,
|
|
}
|
|
}
|
|
},
|
|
runtimeConfig: {
|
|
public: {
|
|
evibesProjectName: process.env.EVIBES_PROJECT_NAME,
|
|
evibesBaseDomain: process.env.EVIBES_BASE_DOMAIN
|
|
},
|
|
},
|
|
app: {
|
|
head: {
|
|
charset: "utf-8",
|
|
viewport: "width=device-width, initial-scale=1",
|
|
title: process.env.EVIBES_PROJECT_NAME,
|
|
titleTemplate: `${process.env.EVIBES_PROJECT_NAME} | %s`,
|
|
link: [
|
|
{ rel: 'icon', type: 'image/x-icon', href: `https://${process.env.EVIBES_BASE_DOMAIN}/favicon.ico` },
|
|
]
|
|
},
|
|
pageTransition: {
|
|
name: 'opacity',
|
|
mode: 'out-in'
|
|
}
|
|
},
|
|
css: [
|
|
'./assets/styles/main.scss',
|
|
'./assets/styles/global/fonts.scss'
|
|
],
|
|
alias: {
|
|
'styles': fileURLToPath(new URL("./assets/styles", import.meta.url)),
|
|
'images': fileURLToPath(new URL("./assets/images", import.meta.url)),
|
|
'icons': fileURLToPath(new URL("./assets/icons", import.meta.url)),
|
|
},
|
|
vite: {
|
|
envDir: '../',
|
|
envPrefix: 'EVIBES_',
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
additionalData: `
|
|
@use "@/assets/styles/global/variables.scss" as *;
|
|
@use "@/assets/styles/global/mixins.scss" as *;
|
|
`
|
|
}
|
|
}
|
|
}
|
|
},
|
|
image: {
|
|
domains: [`https://api.${process.env.EVIBES_BASE_DOMAIN}`]
|
|
},
|
|
hooks: {
|
|
'pages:extend'(pages) {
|
|
pages.push(
|
|
{
|
|
name: 'activate-user',
|
|
path: '/activate-user',
|
|
file: resolve(__dirname, 'pages/index.vue')
|
|
},
|
|
{
|
|
name: 'reset-password',
|
|
path: '/reset-password',
|
|
file: resolve(__dirname, 'pages/index.vue')
|
|
}
|
|
)
|
|
}
|
|
}
|
|
}) |