Skip to content

Commit

Permalink
feat: Removes tenant from tenanted asset routes (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-zahedi authored Jul 16, 2024
1 parent d5095e6 commit 7c7dadd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/serious-hats-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gdu': major
---

Removes tenant from tenanted asset routes
11 changes: 1 addition & 10 deletions packages/gdu/config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ type BuildEnv = ReturnType<typeof getBuildEnvs>[number];

const getPublicPath = ({
buildEnv,
isTenanted,
tenant,
isDev,
projectFolderName,
Expand All @@ -407,15 +406,7 @@ const getPublicPath = ({
if (isDev) return '/';

if (buildEnv === 'prod') {
if (isTenanted) {
const prodTenant = tenant || '#{AutoGuru.Tenant}';
const prodAppPath = isTenanted
? `${prodTenant}/${projectFolderName}`
: `${projectFolderName}`;
return `#{PUBLIC_PATH_BASE}/${prodAppPath}/`;
} else {
return `#{PUBLIC_PATH_BASE}/${projectFolderName}/`;
}
return `#{PUBLIC_PATH_BASE}/${projectFolderName}/`
}

const folderPath = tenant
Expand Down

0 comments on commit 7c7dadd

Please sign in to comment.