From 79226253912616b309e53beb78e5f721c2bf39b0 Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Thu, 20 Jun 2024 13:50:49 +0100 Subject: [PATCH] Update nuxt.config.js --- apps/showcase/nuxt.config.js | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/apps/showcase/nuxt.config.js b/apps/showcase/nuxt.config.js index 3f41a7182..0594b7721 100644 --- a/apps/showcase/nuxt.config.js +++ b/apps/showcase/nuxt.config.js @@ -2,6 +2,16 @@ import path from 'path'; 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 export default defineNuxtConfig({ typescript: false, @@ -15,34 +25,18 @@ export default defineNuxtConfig({ optimizeDeps: { disabled: true }, - 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') - } + alias } }, nitro: { - 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') - } + alias }, routeRules: { '/accessibility': { redirect: { to: '/guides/accessibility', statusCode: 301 } }, '/installation': { redirect: { to: '/vite', statusCode: 301 } } }, 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' } }, app: {