From e2fa08b8a1e027083b01515100ef19d97a84894e Mon Sep 17 00:00:00 2001 From: Priyatham Sai Chand Date: Mon, 11 Jan 2021 23:35:11 +0530 Subject: [PATCH] add statically cdn --- next.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/next.config.js b/next.config.js index 464844a..2eb211a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,7 @@ + +const isProd = process.env.NODE_ENV === 'production' + module.exports = { - basePath: '/Portfolio', - assetPrefix: '/Portfolio/', -} + // Use the CDN in production and localhost for development. + assetPrefix: isProd ? 'https://cdn.statically.io/gh/Priyatham-sai-chand/Portfolio/gh-pages/' : '', +} \ No newline at end of file