Skip to content

Commit

Permalink
Don't do it for preview envs
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Feb 20, 2024
1 parent b25252b commit 150c17e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
const createMDX = require('@next/mdx');
const remarkPrism = require('remark-prism');

const isProd = process.env.NODE_ENV === 'production';
const isProd = process.env.NODE_ENV === 'production' && !process.env.IS_PREVIEW;

/** @type {import('next').NextConfig} */
const nextConfig = {
async headers() {
return [
{
source: '/_next/static/([^/]+/pages|chunks|runtime|css|fonts|media)/(.+)',
headers: [{key: 'Access-Control-Allow-Origin', value: '*'}],
},
];
},
headers: [
{
source: '/_next/static/([^/]+/pages|chunks|runtime|css|fonts|media)/(.+)',
headers: [{key: 'Access-Control-Allow-Origin', value: '*'}],
},
],
publicRuntimeConfig: {
assetPrefix: isProd ? 'https://docs.sentry.io' : undefined,
},
Expand Down

0 comments on commit 150c17e

Please sign in to comment.