From 9a45329ad2402c99d6d3bc99e2f4e71d1ac2b233 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Mon, 7 Mar 2022 19:34:59 -0500 Subject: [PATCH] Disabled wishlist and user login in bigcommerce (#703) --- package.json | 1 + packages/commerce/src/config.cjs | 6 +++++- site/commerce.config.json | 6 ++++++ turbo.json | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2854cf992..fc97f30b9 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "build": "turbo run build --scope=next-commerce --include-dependencies --no-deps", "dev": "turbo run dev", "start": "turbo run start", + "types": "turbo run types", "prettier-fix": "prettier --write ." }, "devDependencies": { diff --git a/packages/commerce/src/config.cjs b/packages/commerce/src/config.cjs index aabc16e0c..add0061a9 100644 --- a/packages/commerce/src/config.cjs +++ b/packages/commerce/src/config.cjs @@ -18,10 +18,14 @@ function withCommerceConfig(nextConfig = {}) { const commerceNextConfig = importCwd(path.join(provider, 'next.config')) const config = merge(nextConfig, commerceNextConfig) + const features = merge( + config.commerce.features, + config.commerce[provider]?.features ?? {} + ) config.env = config.env || {} - Object.entries(config.commerce.features).forEach(([k, v]) => { + Object.entries(features).forEach(([k, v]) => { if (v) config.env[`COMMERCE_${k.toUpperCase()}_ENABLED`] = true }) diff --git a/site/commerce.config.json b/site/commerce.config.json index ad72b58de..dd43ae077 100644 --- a/site/commerce.config.json +++ b/site/commerce.config.json @@ -5,5 +5,11 @@ "wishlist": false, "customerAuth": false, "customCheckout": false + }, + "@vercel/commerce-bigcommerce": { + "features": { + "wishlist": false, + "customerAuth": false + } } } diff --git a/turbo.json b/turbo.json index c734b801f..8e38ccddc 100644 --- a/turbo.json +++ b/turbo.json @@ -30,6 +30,9 @@ }, "start": { "cache": false + }, + "types": { + "outputs": ["dist/**/*.d.ts"] } } }