next-bun-compile 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +4 -4
- package/dist/generate.js +4 -4
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -81,14 +81,14 @@ let resolve = (id) => { try { return _resolve(id); } catch { return ''; } };`);
|
|
|
81
81
|
console.log("next-bun-compile: Patched require-hook.js for compiled binary compatibility");
|
|
82
82
|
}
|
|
83
83
|
function collectExternalModules(standaloneDir) {
|
|
84
|
-
const chunksDir = join(standaloneDir, ".next/server/chunks
|
|
84
|
+
const chunksDir = join(standaloneDir, ".next/server/chunks");
|
|
85
85
|
if (!existsSync(chunksDir))
|
|
86
86
|
return [];
|
|
87
87
|
const seeds = new Set;
|
|
88
|
-
for (const
|
|
89
|
-
if (!
|
|
88
|
+
for (const { absolutePath } of walkDir(chunksDir)) {
|
|
89
|
+
if (!absolutePath.endsWith(".js"))
|
|
90
90
|
continue;
|
|
91
|
-
const content = readFileSync(
|
|
91
|
+
const content = readFileSync(absolutePath, "utf-8");
|
|
92
92
|
for (const match of content.matchAll(/require\("(next\/dist\/[^"]+)"\)/g)) {
|
|
93
93
|
seeds.add(match[1]);
|
|
94
94
|
}
|
package/dist/generate.js
CHANGED
|
@@ -80,14 +80,14 @@ let resolve = (id) => { try { return _resolve(id); } catch { return ''; } };`);
|
|
|
80
80
|
console.log("next-bun-compile: Patched require-hook.js for compiled binary compatibility");
|
|
81
81
|
}
|
|
82
82
|
function collectExternalModules(standaloneDir) {
|
|
83
|
-
const chunksDir = join(standaloneDir, ".next/server/chunks
|
|
83
|
+
const chunksDir = join(standaloneDir, ".next/server/chunks");
|
|
84
84
|
if (!existsSync(chunksDir))
|
|
85
85
|
return [];
|
|
86
86
|
const seeds = new Set;
|
|
87
|
-
for (const
|
|
88
|
-
if (!
|
|
87
|
+
for (const { absolutePath } of walkDir(chunksDir)) {
|
|
88
|
+
if (!absolutePath.endsWith(".js"))
|
|
89
89
|
continue;
|
|
90
|
-
const content = readFileSync(
|
|
90
|
+
const content = readFileSync(absolutePath, "utf-8");
|
|
91
91
|
for (const match of content.matchAll(/require\("(next\/dist\/[^"]+)"\)/g)) {
|
|
92
92
|
seeds.add(match[1]);
|
|
93
93
|
}
|
package/dist/index.js
CHANGED
|
@@ -80,14 +80,14 @@ let resolve = (id) => { try { return _resolve(id); } catch { return ''; } };`);
|
|
|
80
80
|
console.log("next-bun-compile: Patched require-hook.js for compiled binary compatibility");
|
|
81
81
|
}
|
|
82
82
|
function collectExternalModules(standaloneDir) {
|
|
83
|
-
const chunksDir = join(standaloneDir, ".next/server/chunks
|
|
83
|
+
const chunksDir = join(standaloneDir, ".next/server/chunks");
|
|
84
84
|
if (!existsSync(chunksDir))
|
|
85
85
|
return [];
|
|
86
86
|
const seeds = new Set;
|
|
87
|
-
for (const
|
|
88
|
-
if (!
|
|
87
|
+
for (const { absolutePath } of walkDir(chunksDir)) {
|
|
88
|
+
if (!absolutePath.endsWith(".js"))
|
|
89
89
|
continue;
|
|
90
|
-
const content = readFileSync(
|
|
90
|
+
const content = readFileSync(absolutePath, "utf-8");
|
|
91
91
|
for (const match of content.matchAll(/require\("(next\/dist\/[^"]+)"\)/g)) {
|
|
92
92
|
seeds.add(match[1]);
|
|
93
93
|
}
|