mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Update master to work with multiple Vercel projects (#237)
* Moved configs * Delete with-config.js * Added log for configs * Update TS config based on the selected provider * set tsconfig to bigcommerce * Updated readme instructions on provider config * Added new commerce variable * Change the default of updateTSConfig Co-authored-by: B <curciobelen@gmail.com>
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
const commerce = require('./commerce.config.json')
|
||||
const withCommerceConfig = require('./framework/commerce/with-config')
|
||||
const {
|
||||
withCommerceConfig,
|
||||
getProviderName,
|
||||
} = require('./framework/commerce/config')
|
||||
|
||||
const isBC = commerce.provider === 'bigcommerce'
|
||||
const isShopify = commerce.provider === 'shopify'
|
||||
const provider = commerce.provider || getProviderName()
|
||||
const isBC = provider === 'bigcommerce'
|
||||
const isShopify = provider === 'shopify'
|
||||
|
||||
module.exports = withCommerceConfig({
|
||||
commerce,
|
||||
@@ -39,3 +43,6 @@ module.exports = withCommerceConfig({
|
||||
].filter((x) => x)
|
||||
},
|
||||
})
|
||||
|
||||
// Don't delete this console log, useful to see the commerce config in Vercel deployments
|
||||
console.log('next.config.js', JSON.stringify(module.exports, null, 2))
|
||||
|
Reference in New Issue
Block a user