Skip to content

Commit a802bb3

Browse files
committed
utils
1 parent 290cf9e commit a802bb3

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lib/entry-data-plugin.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ const placeholderRe = /(ENTRY_DATA_PLUGIN_(?:MAIN_NAME|DEPS))(\d+)/g;
2020

2121
/** @param {string} fileName */
2222
export function fileNameToURL(fileName) {
23-
const baseUrl = fileName.replace(/^static\//, '/');
24-
// Prepend base path if BASE_PATH environment variable is set
25-
const basePath = process.env.BASE_PATH || '';
26-
return basePath + baseUrl;
23+
return fileName.replace(/^static\//, '/');
2724
}
2825

2926
export default function entryDataPlugin() {

src/static-build/utils.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ export function escapeStyleScriptContent(str: string): string {
6262
*/
6363
export const siteOrigin = (() => {
6464
if (process.env.DEV_PORT) return `http://localhost:${process.env.DEV_PORT}`;
65-
// https://docs.netlify.com/configure-builds/environment-variables/#build-metadata
6665
if (process.env.CONTEXT === 'production')
67-
return 'https://gigamaster.github.io';
66+
return 'https://gigamaster.github.io/codemo-image-optimize';
6867
if (process.env.DEPLOY_PRIME_URL) return process.env.DEPLOY_PRIME_URL;
6968
console.warn(
70-
'Unable to determine site origin, defaulting to https://gigamaster.github.io',
69+
'Unable to determine site origin, defaulting to https://gigamaster.github.io/codemo-image-optimize',
7170
);
72-
return 'https://gigamaster.github.io';
71+
return 'https://gigamaster.github.io/codemo-image-optimize';
7372
})();

0 commit comments

Comments
 (0)