Skip to content
Discussion options

You must be logged in to vote

Okay I just tried some hack while writing this post, solution is at the bottom.

I have been tinkering with this for a while now, looks like I am stuck in a order of compatibility problems;

Packages;

  • Vite.js
  • Capacitor.js
  • Maplibre-gl

Given this worker file (not working, just demonstration);

// import { CapacitorHttp } from "@capacitor/core";
// importScripts("/@capacitor/core");

var CapacitorHttp;
import("@capacitor/core").then(module => {
  CapacitorHttp = module.CapacitorHttp;
});

async function loadFn(params, abortController) {
  const urlNext = params.url.split("://")[1];
  const response = await CapacitorHttp.get({
    url: `${urlNext.startsWith("localhost") ? "http" : "https"}://${u…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@Duoquote
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Duoquote
Comment options

You must be logged in to vote
5 replies
@Duoquote
Comment options

@Duoquote
Comment options

@HarelM
Comment options

@Duoquote
Comment options

@Duoquote
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5249 on December 20, 2024 07:49.