-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnuxt.config.ts
53 lines (44 loc) · 1.69 KB
/
nuxt.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import pkg from './package.json';
export default defineNuxtConfig({
app: {
head: {
htmlAttrs: { lang: 'en' },
link: [{ rel: 'icon', href: '/logo.svg', type: 'image/svg+xml' }],
},
pageTransition: { name: 'page', mode: 'out-in' },
},
components: [{ path: '~/components', pathPrefix: false }],
modules: ['woonuxt-settings', 'nuxt-graphql-client', '@nuxtjs/tailwindcss', 'nuxt-icon', '@nuxt/image-edge', '@nuxtjs/i18n'],
plugins: ['~/plugins/init.ts'],
image: {
domains: process.env.NUXT_IMAGE_DOMAINS ? process.env.NUXT_IMAGE_DOMAINS.replace(/ /g, '').split(',') : [],
},
runtimeConfig: {
public: {
version: pkg.version,
},
},
hooks: {
'pages:extend'(pages) {
pages.push({ name: 'product-page-pager', path: '/products/page/:pageNumber', file: '~/pages/products.vue' });
pages.push({ name: 'product-category-page', path: '/product-category/:categorySlug', file: '~/pages/products.vue' });
pages.push({ name: 'product-category-page-pager', path: '/product-category/:categorySlug/page/:pageNumber', file: '~/pages/products.vue' });
pages.push({ name: 'order-received', path: '/checkout/order-received/:orderId', file: '~/pages/order-summary.vue' });
pages.push({ name: 'order-summary', path: '/order-summary/:orderId', file: '~/pages/order-summary.vue' });
},
},
i18n: {
locales: [
{ code: 'en', file: 'en-US.json', name: 'English' },
{ code: 'de', file: 'de-DE.json', name: 'Deutsch' },
],
// lazy: true,
langDir: 'lang/',
defaultLocale: 'en',
strategy: 'no_prefix',
},
routeRules: {
'/checkout/order-received/**': { ssr: false },
'/order-summary/**': { ssr: false },
},
});