-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.mjs
33 lines (29 loc) · 967 Bytes
/
next.config.mjs
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
import path from 'path';
const __dirname = path.dirname(new URL(import.meta.url).pathname);
const optimizelyCmsUrl = new URL(process.env.OPTIMIZELY_CMS_URL ?? 'http://localhost:3000')
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
// Allow images from the configured Optimizely CMS URL
{
protocol: optimizelyCmsUrl.protocol.replace(':', ''),
hostname: optimizelyCmsUrl.hostname,
port: optimizelyCmsUrl.port,
pathname: '/globalassets/**',
}
],
},
reactStrictMode: false,
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
};
/**
console.log(' 🚀 Site configuration')
nextConfig.images.remotePatterns.forEach(pattern => {
console.log(` - White-listing images matching: ${ pattern.protocol }://${ pattern.hostname }${ pattern.port ? ':' + pattern.port : '' }${ pattern.pathname }`)
})
console.log('')
*/
export default nextConfig;