4
0
forked from crowetic/commerce

Disabled wishlist and user login in bigcommerce (#703)

This commit is contained in:
Luis Alvarez D 2022-03-07 19:34:59 -05:00 committed by GitHub
parent 5af4004b57
commit 9a45329ad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View File

@ -10,6 +10,7 @@
"build": "turbo run build --scope=next-commerce --include-dependencies --no-deps", "build": "turbo run build --scope=next-commerce --include-dependencies --no-deps",
"dev": "turbo run dev", "dev": "turbo run dev",
"start": "turbo run start", "start": "turbo run start",
"types": "turbo run types",
"prettier-fix": "prettier --write ." "prettier-fix": "prettier --write ."
}, },
"devDependencies": { "devDependencies": {

View File

@ -18,10 +18,14 @@ function withCommerceConfig(nextConfig = {}) {
const commerceNextConfig = importCwd(path.join(provider, 'next.config')) const commerceNextConfig = importCwd(path.join(provider, 'next.config'))
const config = merge(nextConfig, commerceNextConfig) const config = merge(nextConfig, commerceNextConfig)
const features = merge(
config.commerce.features,
config.commerce[provider]?.features ?? {}
)
config.env = config.env || {} 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 if (v) config.env[`COMMERCE_${k.toUpperCase()}_ENABLED`] = true
}) })

View File

@ -5,5 +5,11 @@
"wishlist": false, "wishlist": false,
"customerAuth": false, "customerAuth": false,
"customCheckout": false "customCheckout": false
},
"@vercel/commerce-bigcommerce": {
"features": {
"wishlist": false,
"customerAuth": false
}
} }
} }

View File

@ -30,6 +30,9 @@
}, },
"start": { "start": {
"cache": false "cache": false
},
"types": {
"outputs": ["dist/**/*.d.ts"]
} }
} }
} }