Skip to content

Commit

Permalink
fix: fixes playground when deployed to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethaasan committed Mar 14, 2024
1 parent 446a962 commit 70ff40a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions playground/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
const isGithubActions = process.env.GITHUB_ACTIONS || false;

let assetPrefix = undefined;
let basePath = undefined;

if (isGithubActions) {
const repo = 'asyncapi-react';

assetPrefix = `/${repo}/`;
basePath = `/${repo}`;
}

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
Expand All @@ -12,6 +24,8 @@ const nextConfig = {

return config;
},
assetPrefix,
basePath,
};

export default nextConfig;

0 comments on commit 70ff40a

Please sign in to comment.