mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-03 12:57:20 +02:00
Compare commits
No commits in common. "0bde69c7bf410ff3f2daaac2d18854ddee32c710" and "16c876569f134081431602d6c1dd073381500e86" have entirely different histories.
0bde69c7bf
...
16c876569f
@ -173,36 +173,6 @@ function babelPluginPDFJSPreprocessor(babel, ctx) {
|
|||||||
path.replaceWith(t.importExpression(source));
|
path.replaceWith(t.importExpression(source));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
NewExpression(path) {
|
|
||||||
const { node } = path;
|
|
||||||
|
|
||||||
if (
|
|
||||||
t.isIdentifier(node.callee, { name: "URL" }) &&
|
|
||||||
node.arguments.length === 2
|
|
||||||
) {
|
|
||||||
const [arg1, arg2] = node.arguments;
|
|
||||||
|
|
||||||
if (
|
|
||||||
arg1.type === "StringLiteral" &&
|
|
||||||
arg1.value.endsWith(".wasm") &&
|
|
||||||
arg2.type === "MemberExpression"
|
|
||||||
) {
|
|
||||||
// This statement is generated by the Emscripten Compiler (emcc),
|
|
||||||
// however we're manually loading wasm-files and we want to ensure
|
|
||||||
// that bundlers will leave it alone; this *must* include Webpack.
|
|
||||||
arg1.leadingComments = [
|
|
||||||
{
|
|
||||||
type: "CommentBlock",
|
|
||||||
value: "webpackIgnore: true",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "CommentBlock",
|
|
||||||
value: "@vite-ignore",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"BlockStatement|StaticBlock": {
|
"BlockStatement|StaticBlock": {
|
||||||
// Visit node in post-order so that recursive flattening
|
// Visit node in post-order so that recursive flattening
|
||||||
// of blocks works correctly.
|
// of blocks works correctly.
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
const wasmUrl = new URL(
|
|
||||||
/*webpackIgnore: true*/
|
|
||||||
/*@vite-ignore*/
|
|
||||||
"qwerty.wasm", import.meta.url);
|
|
||||||
1
external/builder/fixtures_babel/ignore.js
vendored
1
external/builder/fixtures_babel/ignore.js
vendored
@ -1 +0,0 @@
|
|||||||
const wasmUrl = new URL("qwerty.wasm" , import.meta.url);
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"stableVersion": "5.1.91",
|
"stableVersion": "5.1.91",
|
||||||
"baseVersion": "e5fbf52405fbb092351ef1cda8f44fbae3a84473",
|
"baseVersion": "d86045eacbd6f8cc9cbe8fd616800ca3edcbd0dc",
|
||||||
"versionPrefix": "5.2."
|
"versionPrefix": "5.1."
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user