create project
This commit is contained in:
28
kitabcitab/node_modules/next/dist/server/lib/squoosh/emscripten-utils.js
generated
vendored
Normal file
28
kitabcitab/node_modules/next/dist/server/lib/squoosh/emscripten-utils.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.pathify = pathify;
|
||||
exports.instantiateEmscriptenWasm = instantiateEmscriptenWasm;
|
||||
var _url = require("url");
|
||||
function pathify(path) {
|
||||
if (path.startsWith("file://")) {
|
||||
path = (0, _url).fileURLToPath(path);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
function instantiateEmscriptenWasm(factory, path, workerJS = "") {
|
||||
return factory({
|
||||
locateFile (requestPath) {
|
||||
// The glue code generated by emscripten uses the original
|
||||
// file names of the worker file and the wasm binary.
|
||||
// These will have changed in the bundling process and
|
||||
// we need to inject them here.
|
||||
if (requestPath.endsWith(".wasm")) return pathify(path);
|
||||
if (requestPath.endsWith(".worker.js")) return pathify(workerJS);
|
||||
return requestPath;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=emscripten-utils.js.map
|
||||
Reference in New Issue
Block a user