diff --git a/docs/next.config.js b/docs/next.config.js index 7510410..b455ee2 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -2,6 +2,11 @@ const withMDX = require('@next/mdx')({ extension: /\.mdx?$/, options: { format: 'mdx' }, }) + +const isDev = + process.env.VERCEL_ENV === 'preview' || process.env.NODE_ENV === 'development' + module.exports = withMDX({ pageExtensions: ['js', 'jsx', 'tsx', 'md', 'mdx'], + assetPrefix: isDev ? '' : 'https://charts.docs.carbonplan.org', })