InterviewSolution
Saved Bookmarks
| 1. |
How to setup CDN in next js? |
|
Answer» Developers have to follow these steps to setup CDN in Next JS. Example
const isProd = process.env.NODE_ENV === 'production'; module.exports = { // You may only need to add assetPrefix in the production. assetPrefix: isProd ? 'https://cdn.mydomain.com' : '' };
// next.config.js module.exports = { crossOrigin: 'anonymous' }; |
|