mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 14:42:31 +00:00
Updated the commerce config structure
This commit is contained in:
parent
f5980d2d46
commit
121ec4b61f
6
commerce.config.json
Normal file
6
commerce.config.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"provider": "bigcommerce",
|
||||
"features": {
|
||||
"wishlist": false
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"provider": "bigcommerce",
|
||||
"features": {
|
||||
"wishlist": true
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
const providerConfig = require('./config.json')
|
||||
const commerce = require('./commerce.config.json')
|
||||
|
||||
module.exports = {
|
||||
commerce: {
|
||||
provider: 'bigcommerce',
|
||||
...providerConfig,
|
||||
},
|
||||
commerce,
|
||||
images: {
|
||||
domains: ['cdn11.bigcommerce.com'],
|
||||
},
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"provider": "shopify",
|
||||
"features": {
|
||||
"wishlist": false
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
const providerConfig = require('./config.json')
|
||||
const commerce = require('./commerce.config.json')
|
||||
|
||||
module.exports = {
|
||||
commerce: {
|
||||
provider: 'shopify',
|
||||
...providerConfig,
|
||||
},
|
||||
commerce,
|
||||
images: {
|
||||
domains: ['cdn.shopify.com'],
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
const commerce = require('./commerce.config.json')
|
||||
const withCommerceConfig = require('./framework/commerce/with-config')
|
||||
|
||||
const commerce = { provider: 'shopify' }
|
||||
const isBC = commerce.provider === 'bigcommerce'
|
||||
const isShopify = commerce.provider === 'shopify'
|
||||
|
||||
@ -39,3 +39,5 @@ module.exports = withCommerceConfig({
|
||||
].filter((x) => x)
|
||||
},
|
||||
})
|
||||
|
||||
console.log('configs', module.exports)
|
||||
|
@ -22,8 +22,8 @@
|
||||
"@components/*": ["components/*"],
|
||||
"@commerce": ["framework/commerce"],
|
||||
"@commerce/*": ["framework/commerce/*"],
|
||||
"@framework": ["framework/shopify"],
|
||||
"@framework/*": ["framework/shopify/*"]
|
||||
"@framework": ["framework/bigcommerce"],
|
||||
"@framework/*": ["framework/bigcommerce/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user