-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
36 lines (35 loc) · 868 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const { hostname } = require('os');
/** @type {import('next').NextConfig} */
if (process.env.ECOMMERCE_PLATFORM === 'shopify') {
module.exports.images = {
domains: ['cdn.shopify.com'],
remotePatterns: [
{
protocol: 'https',
hostname: 'cdn.shopify.com',
pathname: '/s/files/!**',
port: ''
}
]
};
} else if (process.env.ECOMMERCE_PLATFORM === 'bigcommerce') {
module.exports.images = {
remotePatterns: [
{
hostname: process.env.BIGCOMMERCE_CDN_HOSTNAME ?? '*.bigcommerce.com'
},
{
hostname: 'cdn11.bigcommerce.com'
},
{ hostname: 'vercel.kensiumcommerce.com' }
]
};
} else if (process.env.ECOMMERCE_PLATFORM === 'magento') {
module.exports.images = {
remotePatterns: [
{
hostname: 'vercel.kensiumcommerce.com'
}
]
};
}