Skip to content

Instantly share code, notes, and snippets.

@huntz20
Created July 7, 2023 02:10
Show Gist options
  • Save huntz20/da84c397a955020ea2815a9f1adfadaa to your computer and use it in GitHub Desktop.
Save huntz20/da84c397a955020ea2815a9f1adfadaa to your computer and use it in GitHub Desktop.
// https://v3.nuxtjs.org/api/configuration/nuxt.config
import Components from 'unplugin-vue-components/vite';
import {AntDesignVueResolver} from 'unplugin-vue-components/resolvers';
export default defineNuxtConfig({
nitro: {
compressPublicAssets: true,
prerender: {
routes: ['/', '/tournament/*', '/organizer/*/profile'],
},
},
app: {
head: {
htmlAttrs: {
lang: "id"
},
title: "Tumwuh | Sport Tournament",
meta: [
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
{name: 'Content-Type', content: 'text/html; charset=utf-8'},
{
name: 'description',
content: 'Tumwuh adalah online tournament platform tempat mu berkompetisi dan meraih pencapaian dalam hidupmu'
},
{
name: 'og:description',
content: 'Tumwuh adalah online tournament platform tempat mu berkompetisi dan meraih pencapaian dalam hidupmu'
},
{name: 'keywords', content: 'kompetisi olahraga, lomba, esport, turnamen'},
{name: 'og:title', content: "Tumwuh | Sport Tournament"},
{name: 'og:url', content: "https://tumwuh.com"},
{name: 'og:site_name', content: 'Tumwuh'},
{name: 'og:type', content: 'business.business'},
{name: 'og:image', content: 'https://tumwuh.twic.pics/public/android-chrome-192x192.png'},
{name: 'twitter:title', content: "Tumwuh | Sport Tournament"},
{name: 'twitter:card', content: "summary_large_image"},
{name: 'twitter:url', content: "https://tumwuh.com"},
{name: 'twitter:image', content: 'https://tumwuh.twic.pics/public/android-chrome-192x192.png'},
],
link: [
{rel: 'preconnect', href: 'https://fonts.googleapis.com'},
{rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: ''},
{rel: 'favicon', type: 'image/x-icon', href: 'https://tumwuh.twic.pics/public/favicon.ico?v=2'},
{rel: 'apple-touch-icon', href: 'https://tumwuh.twic.pics/public/apple-touch-icon.png', sizes: "180x180"},
{
rel: 'icon',
href: 'https://tumwuh.twic.pics/public/favicon-32x32.png?v=2',
sizes: "32x32",
type: "image/png"
},
{
rel: 'icon',
href: 'https://tumwuh.twic.pics/public/favicon-16x16.png?v=2',
sizes: "16x16",
type: "image/png"
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Mali:ital,wght@0,300;0,400;0,700;1,400&family=Poppins:wght@500;600&family=Quicksand:wght@400;500;600;700&display=swap'
},
{
rel: 'stylesheet',
href: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css'
},
]
}
},
modules: [
'@pinia/nuxt',
'@nuxt/image-edge',
'@sidebase/nuxt-session',
'@vueuse/nuxt',
'nuxt-vitest',
'nuxt-purgecss',
],
plugins: [
'~/plugins/pinia-plugin-persist.client',
'~/plugins/vue-masonry-wall.client',
'~/plugins/firebase.client',
'~/plugins/sentry.client'
],
session: {
session: {
expiryInSeconds: 60 * 60 * 24 * 30,
cookieSecure: true,
}
},
image: {
twicpics: {
baseURL: "https://tumwuh.twic.pics/public/"
}
},
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
css: [
'ant-design-vue/dist/antd.css',
'@/assets/css/main.css',
],
runtimeConfig: {
public: {
runningEnv: process.env.ENV,
baseUrl: process.env.API_URL,
uploadImageUrl: process.env.UPLOAD_IMAGE_URL,
userAssetBaseUrl: process.env.USER_ASSET_BASE_URL,
firebaseApiKey: process.env.FIREBASE_API_KEY,
firebaseAuthDomain: process.env.FIREBASE_AUTH_DOMAIN,
firebaseProjectId: process.env.FIREBASE_PROJECT_ID,
firebaseAppId: process.env.FIREBASE_APP_ID,
firebaseMeasurementId: process.env.FIREBASE_MEASUREMENT_ID,
firebaseStorageBucket: process.env.FIREBASE_STORAGE_BUCKET,
}
},
vite: {
css: {
preprocessorOptions: {
less: {
modifyVars: {
"primary-color": "#5EC92B",
"link-color": "#1890ff",
"success-color": "#52c41a",
"warning-color": "#faad14",
"error-color": "#f5222d",
"font-size-base": "14px",
"heading-color": "rgba(0, 0, 0, 0.85)",
"text-color": "rgba(0, 0, 0, 0.65)",
"text-color-secondary": "rgba(0, 0, 0, 0.45)",
"disabled-color": "rgba(0, 0, 0, 0.25)",
"border-radius-base": "4px",
"border-color-base": "#d9d9d9",
"box-shadow-base": "0 2px 8px rgba(0, 0, 0, 0.15)"
},
javascriptEnabled: true,
},
},
},
plugins: [
Components({
resolvers: [
AntDesignVueResolver({resolveIcons: true, importStyle: false}),
],
dts: "types/components.d.ts",
}),
],
ssr: {
noExternal: ['moment', 'compute-scroll-into-view', 'ant-design-vue', '@ant-design/icons-vue'],
},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment