-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
135 lines (135 loc) · 2.8 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
export default defineNuxtConfig({
extends: [
"@shopware-pwa/composables-next/nuxt-layer",
"@shopware-pwa/cms-base",
],
runtimeConfig: {
shopware: {
/**
* SSR Shopware Endpoint
* More here: https://frontends.shopware.com/getting-started/templates/custom-vue-project.html#shopware-endpoint-on-the-ssr-mode
*/
// endpoint: "",
},
// public: {
// endpoint: "https://demo-frontends.shopware.store/store-api/",
// accessToken: "SWSCBHFSNTVMAWNZDNFKSHLAYW",
// devStorefrontUrl: "",
// },
},
shopware: {
accessToken: "SWSCBHFSNTVMAWNZDNFKSHLAYW",
endpoint: "https://demo-frontends.shopware.store/store-api/",
devStorefrontUrl: "",
},
routeRules: {
"/": {
isr: 60 * 60 * 24,
},
"/checkout": {
ssr: false,
headers: {
"Cache-Control": "no-cache, no-store, must-revalidate",
},
},
"/checkout/**": {
ssr: false,
},
"/login": {
ssr: false,
},
"/register": {
ssr: false,
},
"/reset-password": {
ssr: false,
},
"/wishlist": {
ssr: false,
},
"/account": {
ssr: false,
},
"/account/**": {
ssr: false,
},
"/search": {
ssr: false,
},
"/search/**": {
ssr: false,
},
"/**": {
isr: 60 * 60 * 24,
},
},
/**
* Commented because of the StackBlitz error
* Issue: https://github.com/shopware/frontends/issues/88
*/
typescript: {
// typeCheck: true,
strict: true,
},
modules: [
"@vueuse/nuxt",
"@unocss/nuxt",
"@shopware-pwa/nuxt3-module",
"@nuxtjs/i18n",
],
// components: true,
components: {
dirs: [
{
path: "~/components",
priority: 2,
},
],
global: true,
},
vueuse: {
ssrHandlers: true,
},
nitro: {
compressPublicAssets: true,
},
unocss: {
// for presets, theme config, ... look at the uno.config.ts file
},
css: [
"@unocss/reset/tailwind-compat.css", // needed to reset styles see https://unocss.dev/guide/style-reset (@unocss/reset)
],
router: {
options: {
linkActiveClass: "link-active",
linkExactActiveClass: "link-exact-active text-primary",
},
},
i18n: {
strategy: "prefix_except_default",
defaultLocale: "en-GB",
detectBrowserLanguage: false,
langDir: "./i18n/src/langs/",
vueI18n: "./i18n/config",
locales: [
{
code: "en-GB",
iso: "en-GB",
file: "en-GB.ts",
},
{
code: "pl-PL",
iso: "pl-PL",
file: "pl-PL.ts",
},
{
code: "testde",
iso: "de-DE",
file: "de-DE.ts",
localeId: "c19b753b5f2c4bea8ad15e00027802d4",
},
],
},
telemetry: false,
});