Skip to content

Commit

Permalink
Update Nuxt build command in netlify.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyzen committed Apr 21, 2024
1 parent e6911b7 commit 5c12e5d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
NUXT_IMAGE_DOMAINS = "Comma separated list of domains. example.com,example2.com"

[build]
command = "nuxt generate"

[images]
remote_images = ["https://secure.woonuxt.com/*"]
command = "nuxi generate"
2 changes: 1 addition & 1 deletion woonuxt_base/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ watch(
<MobileMenu v-if="isShowingMobileMenu" />
</Transition>

<NuxtPage keepalive />
<NuxtPage />

<Transition name="fade">
<div v-if="isShowingCart || isShowingMobileMenu" class="bg-black opacity-25 inset-0 z-40 fixed" @click="closeCartAndMenu" />
Expand Down
2 changes: 2 additions & 0 deletions woonuxt_base/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export default defineNuxtConfig({

nitro: {
routeRules: {
'/': { prerender: true },
'/products/**': { swr: 3600 },
'/checkout/order-received/**': { ssr: false },
'/order-summary/**': { ssr: false },
},
Expand Down
2 changes: 1 addition & 1 deletion woonuxt_base/pages/products.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const route = useRoute();
const { isQueryEmpty } = useHelpers();
const { data } = await useAsyncGql('getProducts');
const allProducts = (data.value?.products?.nodes as Product[]) || [];
const allProducts = (data.value?.products?.nodes || []) as Product[];
setProducts(allProducts);
onActivated(() => {
Expand Down

0 comments on commit 5c12e5d

Please sign in to comment.