primevue-mirror/apps/showcase/nuxt.config.js

107 lines
4.0 KiB
JavaScript
Raw Normal View History

2024-06-11 12:21:12 +00:00
import path from 'path';
2023-10-12 08:22:24 +00:00
2023-01-30 12:32:05 +00:00
const baseUrl = '/';
2022-12-09 20:45:50 +00:00
2024-06-20 12:50:49 +00:00
const alias = {
primevue: path.resolve(__dirname, '../../packages/primevue/src'),
'@primevue/core': path.resolve(__dirname, '../../packages/core/src'),
'@primevue/themes/aura': path.resolve(__dirname, '../../packages/themes/src/presets/aura'),
'@primevue/themes/lara': path.resolve(__dirname, '../../packages/themes/src/presets/lara'),
'@primevue/themes/nora': path.resolve(__dirname, '../../packages/themes/src/presets/nora'),
2024-09-20 19:54:43 +00:00
'@primevue/themes/material': path.resolve(__dirname, '../../packages/themes/src/presets/material'),
2024-06-20 12:50:49 +00:00
'@primevue/themes': path.resolve(__dirname, '../../packages/themes/src'),
'@primevue/icons': path.resolve(__dirname, '../../packages/icons/src')
};
2024-09-17 21:55:40 +00:00
let PROCESS_ENV = {};
try {
PROCESS_ENV = process?.env || {};
} catch {
// NOOP
}
2023-04-01 02:41:15 +00:00
// https://nuxt.com/docs/api/configuration/nuxt-config
2022-09-06 11:52:18 +00:00
export default defineNuxtConfig({
2022-09-14 14:26:41 +00:00
typescript: false,
2024-06-11 12:21:12 +00:00
modules: ['nuxt-gtag', '@primevue/nuxt-module'],
2024-06-11 21:33:37 +00:00
components: {
path: '~/components',
pathPrefix: false
},
2024-06-11 12:21:12 +00:00
vite: {
resolve: {
optimizeDeps: {
disabled: true
},
2024-06-20 12:50:49 +00:00
alias
2024-06-11 12:21:12 +00:00
}
},
2023-10-12 08:22:24 +00:00
nitro: {
2024-06-20 12:50:49 +00:00
alias
2023-10-12 08:22:24 +00:00
},
2023-12-26 21:29:20 +00:00
routeRules: {
'/accessibility': { redirect: { to: '/guides/accessibility', statusCode: 301 } },
'/installation': { redirect: { to: '/vite', statusCode: 301 } }
},
2024-09-17 21:55:40 +00:00
primevue:
PROCESS_ENV.DEV_ENV === 'hot'
? {
usePrimeVue: false,
autoImport: true,
loadStyles: false
}
: {
autoImport: true, // When enabled, the module automatically imports PrimeVue components and directives used throughout the application.
importTheme: { from: '@/themes/app-theme.js' }
},
2022-09-14 14:26:41 +00:00
app: {
2022-12-09 12:58:51 +00:00
baseURL: baseUrl,
2022-09-14 14:26:41 +00:00
head: {
2022-12-19 13:04:37 +00:00
title: 'PrimeVue - Vue UI Component Library',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'description', content: 'The ultimate collection of design-agnostic, flexible and accessible Vue UI Components.' },
{ name: 'robots', content: 'index,follow' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:site', content: '@primevue' },
{ name: 'twitter:title', content: 'PrimeVue | Vue UI Component Library' },
{ name: 'twitter:description', content: 'The ultimate collection of design-agnostic, flexible and accessible Vue UI Components.' },
{ property: 'og:type', content: 'website' },
{ property: 'og:title', content: 'PrimeVue | Vue UI Component Library' },
2023-03-02 08:32:40 +00:00
{ property: 'og:url', content: 'https://primevue.org/' },
2022-12-19 13:04:37 +00:00
{ property: 'og:description', content: 'The ultimate collection of design-agnostic, flexible and accessible Vue UI Components.' },
{ property: 'og:image', content: 'https://www.primefaces.org/static/social/primevue-preview.jpg' },
{ property: 'og:ttl', content: '604800' }
],
2024-02-11 21:25:50 +00:00
link: [
{ rel: 'icon', href: baseUrl + 'favicon.ico' },
{ rel: 'stylesheet', href: 'https://rsms.me/inter/inter.css' }
],
2022-12-19 13:42:18 +00:00
script: [
{
src: baseUrl + 'scripts/prism.js',
'data-manual': true
2022-12-19 13:42:18 +00:00
}
2022-09-14 14:26:41 +00:00
]
2022-09-07 14:20:55 +00:00
}
},
2024-05-18 07:48:06 +00:00
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
},
runtimeConfig: {
public: {
2024-09-17 21:55:40 +00:00
contextPath: baseUrl,
DEV_ENV: PROCESS_ENV.DEV_ENV
}
},
2023-08-31 21:09:19 +00:00
gtag: {
id: 'G-48TTQ6G6KV'
},
2024-05-22 13:52:56 +00:00
css: ['primeicons/primeicons.css', '@/assets/styles/flags.css', '@docsearch/css/dist/style.css', '@/assets/styles/tailwind/main.css', '@/assets/styles/layout/layout.scss']
2022-09-14 14:26:41 +00:00
});