[Bootstrap] Improve fetching

pull/50/head
Oj18 3 years ago
parent a36a057737
commit 73093ec01e

@ -10,8 +10,8 @@ const init = async () => {
console.log('[GooseMod Bootstrap]', 'Found locale', locale);
// eval(await (await fetch(`http://localhost:1234/goosemod.${locale}.js?_<buildtime>`)).text());
eval(await (await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-dev/goosemod.${locale}.js?_<buildtime>`)).text());
// eval(await (await fetch(`http://localhost:1234/goosemod.${locale}.js`)).text());
eval(await (await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-dev/goosemod.${locale}.js?_<buildtime>`, { cache: 'force-cache' })).text());
};
init();

@ -15,7 +15,7 @@ import goosemod from './building/rollup-plugin-gm/index';
const goosemodBootstrap = () => ({
name: 'goosemod-bootstrap',
renderChunk: async (code) => code.replace('<buildtime>', Date.now())
renderChunk: async (code) => code.replaceAll('<buildtime>', Date.now())
});
const prod = !process.env.ROLLUP_WATCH;

Loading…
Cancel
Save