mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
fix (ios): boot issue on ios
This commit is contained in:
parent
10503f8dee
commit
0629060661
1 changed files with 6 additions and 2 deletions
|
|
@ -11,8 +11,12 @@ window.bundler = (function(origin) {
|
|||
`import "${new URL(spec, fullpath).href}"`,
|
||||
);
|
||||
code = code.replace(
|
||||
/(?<!["])\bimport\.meta\.url\b(?!["])/g,
|
||||
`"${fullpath}"`,
|
||||
/\bimport\.meta\.url\b/g,
|
||||
(match, offset, string) => {
|
||||
const before = string[offset - 1];
|
||||
const after = string[offset + match.length];
|
||||
return (before === "\"" || after === "\"") ? match : `"${fullpath}"`;
|
||||
},
|
||||
);
|
||||
esModules[fullpath] = "data:text/javascript," + encodeURIComponent(
|
||||
code + `\n//# sourceURL=${path}`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue