mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-02 05:12:11 +03:00
fix(runtime): isolate unique 8177 repairs (#8298)
This commit is contained in:
@@ -31,18 +31,6 @@ function resolveSqlJsWasmPath(): string {
|
||||
const sqlJsEntry = _require.resolve("sql.js");
|
||||
candidatePaths.push(path.join(path.dirname(sqlJsEntry), "sql-wasm.wasm"));
|
||||
} catch {}
|
||||
// #8135: Use a dynamic expression to avoid Next.js bundler's static analysis
|
||||
// producing a "Can't resolve 'sql.js/package.json'" build warning. The package.json
|
||||
// resolution is only needed for the WASM path, and the try/catch is still required
|
||||
// at runtime since sql.js is an optional dependency.
|
||||
try {
|
||||
const pkgName = "sql.js" + "/package.json";
|
||||
const sqlJsPackage = _require.resolve(pkgName);
|
||||
candidatePaths.push(
|
||||
path.join(path.dirname(sqlJsPackage), "dist", "sql-wasm.wasm"),
|
||||
path.join(path.dirname(sqlJsPackage), "sql-wasm.wasm")
|
||||
);
|
||||
} catch {}
|
||||
|
||||
for (const candidatePath of candidatePaths) {
|
||||
if (fs.existsSync(candidatePath)) {
|
||||
|
||||
Reference in New Issue
Block a user