This commit is contained in:
Kismet Hasanaj
2026-05-02 20:07:02 +02:00
parent ce8672e283
commit 34dc9aec52
9428 changed files with 1733330 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
const replacementRegExes = [
/^webpack-internal:\/\/\/(\([\w-]+\)\/)?/,
/^(webpack:\/\/\/|webpack:\/\/(_N_E\/)?)(\([\w-]+\)\/)?/
];
export function isWebpackInternalResource(file) {
for (const regex of replacementRegExes){
if (regex.test(file)) return true;
file = file.replace(regex, '');
}
return false;
}
/**
* Format the webpack internal id to original file path
*
* webpack-internal:///./src/hello.tsx => ./src/hello.tsx
* webpack://_N_E/./src/hello.tsx => ./src/hello.tsx
* webpack://./src/hello.tsx => ./src/hello.tsx
* webpack:///./src/hello.tsx => ./src/hello.tsx
*/ export function formatStackFrameFile(file) {
for (const regex of replacementRegExes){
file = file.replace(regex, '');
}
return file;
}
//# sourceMappingURL=webpack-module-path.js.map