Skip to content

Commit

Permalink
fix: adding the default url for main branch (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadaraUchiha-314 authored Jun 21, 2024
1 parent 7ce88c1 commit 159d1b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/examples/project-a/federation.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const getProjectBRemoteEntry = async (bundler) => {
const packageName = 'project-b';
const reviewId = process.env.REVIEW_ID;
const branch = process.env.BRANCH;
const prefix = branch === 'main' ? 'main' : `deploy-preview-${reviewId}`;
const url = `https://${prefix}--${projectName}.netlify.app/packages/examples/${packageName}/dist/${bundler}/esm/${remoteEntryName}`;
const prefix = branch === 'main' ? '' : `deploy-preview-${reviewId}--`;
const url = `https://${prefix}${projectName}.netlify.app/packages/examples/${packageName}/dist/${bundler}/esm/${remoteEntryName}`;
return url;
}
/**
Expand Down

0 comments on commit 159d1b9

Please sign in to comment.