fix: patch mlly
to solve bundle error
This commit is contained in:
parent
2df2fefdc9
commit
51e5540d36
4 changed files with 45 additions and 16 deletions
17
patches/mlly@1.0.0.patch
Normal file
17
patches/mlly@1.0.0.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
diff --git a/dist/index.mjs b/dist/index.mjs
|
||||
index 6b5fb1566bee73cefdf165519146604b59ebe7a5..8df0f81f3df4c13bf06b003c472c46db9772db91 100644
|
||||
--- a/dist/index.mjs
|
||||
+++ b/dist/index.mjs
|
||||
@@ -972,10 +972,10 @@ function fileURLToPath(id) {
|
||||
}
|
||||
const INVALID_CHAR_RE = /[\u0000-\u001F"#$&*+,/:;<=>?@[\]^`{|}\u007F]+/g;
|
||||
function sanitizeURIComponent(name = "", replacement = "_") {
|
||||
- return name.replace(INVALID_CHAR_RE, replacement);
|
||||
+ return name.replace(INVALID_CHAR_RE, replacement).replace(/%../g, replacement);
|
||||
}
|
||||
function sanitizeFilePath(filePath = "") {
|
||||
- return filePath.split(/[/\\]/g).map((p) => sanitizeURIComponent(p)).join("/").replace(/^([A-Za-z])_\//, "$1:/");
|
||||
+ return filePath.replace(/[?#].*$/, '').split(/[/\\]/g).map((p) => sanitizeURIComponent(p)).join("/").replace(/^([A-Za-z])_\//, "$1:/");
|
||||
}
|
||||
function normalizeid(id) {
|
||||
if (typeof id !== "string") {
|
Loading…
Add table
Add a link
Reference in a new issue