fix(core): remove hash prefix from cdn path (#5509)

The hash prefix will cause cache invalidate during deployment
It's for debug purpose but I forgot to remove it
This commit is contained in:
LongYinan
2024-01-18 03:50:24 +00:00
parent 943ede4ffd
commit aa437bcd35
3 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ import type { BuildFlags } from '@affine/cli/config';
import { projectRoot } from '@affine/cli/config';
import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin';
import type { RuntimeConfig } from '@affine/env/global';
import { WebpackS3Plugin, gitShortHash } from './s3-plugin.js';
import { WebpackS3Plugin } from './s3-plugin.js';
const IN_CI = !!process.env.CI;
@@ -81,9 +81,9 @@ export const getPublicPath = (buildFlags: BuildFlags) => {
}
if (BUILD_TYPE === 'canary') {
return `https://dev.affineassets.com/${gitShortHash()}/`;
return `https://dev.affineassets.com/`;
} else if (BUILD_TYPE === 'beta' || BUILD_TYPE === 'stable') {
return `https://prod.affineassets.com/${gitShortHash()}/`;
return `https://prod.affineassets.com/`;
}
return publicPath;
};