Skip to content

Commit

Permalink
Set up assetPrefix for production fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
katamartin committed Dec 13, 2024
1 parent 7f82ed9 commit d0cf665
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})

0 comments on commit d0cf665

Please sign in to comment.