Skip to content

Commit

Permalink
[IMP] Add route configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultrey committed Jan 19, 2023
1 parent 5b5bf30 commit 3165991
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ export default defineNuxtConfig({
]
},
css: ['@/assets/css/main.scss'],
routeRules: {
'/_nuxt/**': { headers: { 'cache-control': 'max-age=31536000' } },
'/*': { swr: true },
'/cart/*': { static: true },
'/account/*': { static: true },
'/cart': { static: true }
},
runtimeConfig: {
public: {
shopinvader: {
Expand Down Expand Up @@ -57,7 +64,6 @@ export default defineNuxtConfig({
'~/plugins/shopinvader-cart.client.ts'
],
pages: true,
imports: true,
i18n: {
locales: [
{
Expand All @@ -83,5 +89,19 @@ export default defineNuxtConfig({
},
build: {
transpile: ['@shopinvader/cart']
},
sourcemap: {
server: false,
client: false
},

nitro: {
compressPublicAssets: true,
routes: {
'/**': { swr: 120 }
},
prerender: {
crawlLinks: false
}
}
})

0 comments on commit 3165991

Please sign in to comment.