setup swell checkout

This commit is contained in:
Greg Hoskin
2021-04-19 20:37:33 -05:00
parent 79ed72a710
commit 8a8ef7dbba
6 changed files with 17 additions and 50 deletions

View File

@@ -3,6 +3,7 @@ const withCommerceConfig = require('./framework/commerce/with-config')
const isBC = commerce.provider === 'bigcommerce'
const isShopify = commerce.provider === 'shopify'
const isSwell = commerce.provider === 'swell'
module.exports = withCommerceConfig({
commerce,
@@ -12,7 +13,7 @@ module.exports = withCommerceConfig({
},
rewrites() {
return [
(isBC || isShopify) && {
(isBC || isShopify || isSwell) && {
source: '/checkout',
destination: '/api/bigcommerce/checkout',
},