0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Added CSS support for custom local setup for Safari

This commit is contained in:
Simon Backx 2022-07-20 16:03:07 +02:00
parent e4c9ecc621
commit 723b35bfa6

View file

@ -109,6 +109,11 @@ export function getBundledCssLink({appVersion}) {
if (process.env.NODE_ENV === 'production' && appVersion) {
return `https://unpkg.com/@tryghost/comments-ui@~${appVersion}/umd/main.css`;
} else {
if (document.currentScript) {
// Dynamically determine the current path
const url = new URL(document.currentScript.src);
return url.origin + '/main.css';
}
return 'http://localhost:4000/main.css';
}
}