You've already forked AstralRinth
forked from didirus/AstralRinth
Fix Cloudflare Pages build (#1285)
* fix(temp): remove box shadows from tailwind config * fix(temp): "polyfill" global during build process * refactor: use `import.meta` instead of deprecated `process` * oops: replace `process.server` as well
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
export const useBaseFetch = async (url, options = {}, skipAuth = false) => {
|
||||
const config = useRuntimeConfig();
|
||||
let base = process.server ? config.apiBaseUrl : config.public.apiBaseUrl;
|
||||
let base = import.meta.server ? config.apiBaseUrl : config.public.apiBaseUrl;
|
||||
|
||||
if (!options.headers) {
|
||||
options.headers = {};
|
||||
}
|
||||
|
||||
if (process.server) {
|
||||
if (import.meta.server) {
|
||||
options.headers["x-ratelimit-key"] = config.rateLimitKey;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user