Update nuxt.config.js

pull/5940/head
Mert Sincan 2024-06-20 13:50:49 +01:00
parent f99106a769
commit 7922625391
1 changed files with 13 additions and 19 deletions

View File

@ -2,6 +2,16 @@ import path from 'path';
const baseUrl = '/'; const baseUrl = '/';
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'),
'@primevue/themes': path.resolve(__dirname, '../../packages/themes/src'),
'@primevue/icons': path.resolve(__dirname, '../../packages/icons/src')
};
// https://nuxt.com/docs/api/configuration/nuxt-config // https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({ export default defineNuxtConfig({
typescript: false, typescript: false,
@ -15,34 +25,18 @@ export default defineNuxtConfig({
optimizeDeps: { optimizeDeps: {
disabled: true disabled: true
}, },
alias: { 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'),
'@primevue/themes': path.resolve(__dirname, '../../packages/themes/src'),
'@primevue/icons': path.resolve(__dirname, '../../packages/icons/src')
}
} }
}, },
nitro: { nitro: {
alias: { 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'),
'@primevue/themes': path.resolve(__dirname, '../../packages/themes/src'),
'@primevue/icons': path.resolve(__dirname, '../../packages/icons/src')
}
}, },
routeRules: { routeRules: {
'/accessibility': { redirect: { to: '/guides/accessibility', statusCode: 301 } }, '/accessibility': { redirect: { to: '/guides/accessibility', statusCode: 301 } },
'/installation': { redirect: { to: '/vite', statusCode: 301 } } '/installation': { redirect: { to: '/vite', statusCode: 301 } }
}, },
primevue: { primevue: {
autoImport: true, autoImport: true, // When enabled, the module automatically imports PrimeVue components and directives used throughout the application.
importTheme: { from: '@/themes/app-theme.js' } importTheme: { from: '@/themes/app-theme.js' }
}, },
app: { app: {