4
0
forked from crowetic/commerce
commerce/next.config.js

38 lines
901 B
JavaScript
Raw Normal View History

2021-01-11 13:55:45 -03:00
module.exports = {
images: {
2020-10-22 20:59:45 -05:00
domains: ['cdn11.bigcommerce.com'],
},
2020-10-29 19:03:18 -05:00
i18n: {
locales: ['en-US', 'es'],
defaultLocale: 'en-US',
2020-10-27 03:49:24 -05:00
},
2020-10-13 18:52:02 -05:00
rewrites() {
return [
2020-10-27 03:38:28 -05:00
{
source: '/checkout',
destination: '/api/bigcommerce/checkout',
},
// The logout is also an action so this route is not required, but it's also another way
// you can allow a logout!
{
source: '/logout',
destination: '/api/bigcommerce/customers/logout?redirect_to=/',
},
// Rewrites for /search
2020-10-13 18:52:02 -05:00
{
source: '/search/designers/:name',
destination: '/search',
},
{
source: '/search/designers/:name/:category',
destination: '/search',
},
{
// This rewrite will also handle `/search/designers`
source: '/search/:category',
destination: '/search',
},
]
},
2021-01-11 13:55:45 -03:00
}