cart enabled

This commit is contained in:
Bel Curcio 2021-06-15 19:59:11 -03:00
parent 0e19f131b3
commit 85b659d787
2 changed files with 3 additions and 9 deletions

View File

@ -12,13 +12,6 @@ export async function getStaticProps({
locale, locale,
locales, locales,
}: GetStaticPropsContext) { }: GetStaticPropsContext) {
// Disabling page if Feature is not available
if (!process.env.COMMERCE_CART_ENABLED) {
return {
notFound: true,
}
}
const config = { locale, locales } const config = { locale, locales }
const pagesPromise = commerce.getAllPages({ config, preview }) const pagesPromise = commerce.getAllPages({ config, preview })
const siteInfoPromise = commerce.getSiteInfo({ config, preview }) const siteInfoPromise = commerce.getSiteInfo({ config, preview })

View File

@ -22,8 +22,8 @@
"@components/*": ["components/*"], "@components/*": ["components/*"],
"@commerce": ["framework/commerce"], "@commerce": ["framework/commerce"],
"@commerce/*": ["framework/commerce/*"], "@commerce/*": ["framework/commerce/*"],
"@framework": ["framework/swell"], "@framework": ["framework/local"],
"@framework/*": ["framework/swell/*"] "@framework/*": ["framework/local/*"]
} }
}, },
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
@ -31,6 +31,7 @@
"node_modules", "node_modules",
"./framework/bigcommerce", "./framework/bigcommerce",
"./framework/shopify", "./framework/shopify",
"./framework/swell",
"./framework/vendure", "./framework/vendure",
"./framework/saleor" "./framework/saleor"
] ]