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', }) diff --git a/docs/package-lock.json b/docs/package-lock.json index 6d1f6e7..1a3e9d4 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@carbonplan/charts": "^3.1.1", - "@carbonplan/components": "^12.6.1", + "@carbonplan/components": "^12.6.3", "@carbonplan/layouts": "^4.1.0", "@carbonplan/prism": "^2.0.0", "@carbonplan/theme": "^8.1.0", @@ -124,9 +124,9 @@ } }, "node_modules/@carbonplan/components": { - "version": "12.6.1", - "resolved": "https://registry.npmjs.org/@carbonplan/components/-/components-12.6.1.tgz", - "integrity": "sha512-u2rbA+7TqEZHxLUZSXxFL5O4c7vcGVqF7246ZkCKz0gPj0igHV3Phjinsb/2uog2rqvFIJP+2d6bY1ly2b4T7A==", + "version": "12.6.3", + "resolved": "https://registry.npmjs.org/@carbonplan/components/-/components-12.6.3.tgz", + "integrity": "sha512-Flsu63U3xryCcVEUbd51Pqt6/EXO54+23i1uqdePuxpTpFSzV+ShCsETzMYtiOA1MdXsYNg1UGF5avCs9Xj3Hw==", "dependencies": { "@carbonplan/emoji": "^2.0.0", "@carbonplan/icons": "^2.0.0", @@ -4249,9 +4249,9 @@ } }, "@carbonplan/components": { - "version": "12.6.1", - "resolved": "https://registry.npmjs.org/@carbonplan/components/-/components-12.6.1.tgz", - "integrity": "sha512-u2rbA+7TqEZHxLUZSXxFL5O4c7vcGVqF7246ZkCKz0gPj0igHV3Phjinsb/2uog2rqvFIJP+2d6bY1ly2b4T7A==", + "version": "12.6.3", + "resolved": "https://registry.npmjs.org/@carbonplan/components/-/components-12.6.3.tgz", + "integrity": "sha512-Flsu63U3xryCcVEUbd51Pqt6/EXO54+23i1uqdePuxpTpFSzV+ShCsETzMYtiOA1MdXsYNg1UGF5avCs9Xj3Hw==", "requires": { "@carbonplan/emoji": "^2.0.0", "@carbonplan/icons": "^2.0.0", diff --git a/docs/package.json b/docs/package.json index 7733870..1350d30 100644 --- a/docs/package.json +++ b/docs/package.json @@ -26,7 +26,7 @@ }, "dependencies": { "@carbonplan/charts": "^3.1.1", - "@carbonplan/components": "^12.6.1", + "@carbonplan/components": "^12.6.3", "@carbonplan/layouts": "^4.1.0", "@carbonplan/prism": "^2.0.0", "@carbonplan/theme": "^8.1.0",