next-bun-compile 0.2.0 → 0.2.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 CHANGED
@@ -73,12 +73,12 @@ function generateEntryPoint(options) {
73
73
  const staticDir = join(distDir, "static");
74
74
  const staticFiles = walkDir(staticDir).map((f) => ({
75
75
  ...f,
76
- urlPath: `/_next/static/${f.relativePath}`
76
+ urlPath: `/_next/static/${f.relativePath.replace(/\\/g, "/")}`
77
77
  }));
78
78
  const publicDir = join(projectDir, "public");
79
79
  const publicFiles = walkDir(publicDir).map((f) => ({
80
80
  ...f,
81
- urlPath: `/${f.relativePath}`
81
+ urlPath: `/${f.relativePath.replace(/\\/g, "/")}`
82
82
  }));
83
83
  const ctx = JSON.parse(readFileSync(join(distDir, "bun-compile-ctx.json"), "utf-8"));
84
84
  const { assetPrefix } = ctx;
package/dist/generate.js CHANGED
@@ -72,12 +72,12 @@ function generateEntryPoint(options) {
72
72
  const staticDir = join(distDir, "static");
73
73
  const staticFiles = walkDir(staticDir).map((f) => ({
74
74
  ...f,
75
- urlPath: `/_next/static/${f.relativePath}`
75
+ urlPath: `/_next/static/${f.relativePath.replace(/\\/g, "/")}`
76
76
  }));
77
77
  const publicDir = join(projectDir, "public");
78
78
  const publicFiles = walkDir(publicDir).map((f) => ({
79
79
  ...f,
80
- urlPath: `/${f.relativePath}`
80
+ urlPath: `/${f.relativePath.replace(/\\/g, "/")}`
81
81
  }));
82
82
  const ctx = JSON.parse(readFileSync(join(distDir, "bun-compile-ctx.json"), "utf-8"));
83
83
  const { assetPrefix } = ctx;
package/dist/index.js CHANGED
@@ -72,12 +72,12 @@ function generateEntryPoint(options) {
72
72
  const staticDir = join(distDir, "static");
73
73
  const staticFiles = walkDir(staticDir).map((f) => ({
74
74
  ...f,
75
- urlPath: `/_next/static/${f.relativePath}`
75
+ urlPath: `/_next/static/${f.relativePath.replace(/\\/g, "/")}`
76
76
  }));
77
77
  const publicDir = join(projectDir, "public");
78
78
  const publicFiles = walkDir(publicDir).map((f) => ({
79
79
  ...f,
80
- urlPath: `/${f.relativePath}`
80
+ urlPath: `/${f.relativePath.replace(/\\/g, "/")}`
81
81
  }));
82
82
  const ctx = JSON.parse(readFileSync(join(distDir, "bun-compile-ctx.json"), "utf-8"));
83
83
  const { assetPrefix } = ctx;
@@ -186,9 +186,15 @@ import { join as join3 } from "node:path";
186
186
  var knownTranspilePackages = ["pino", "pino-pretty"];
187
187
  var adapter = {
188
188
  name: "next-bun-compile",
189
- modifyConfig(config, { phase }) {
190
- if (phase !== "phase-production-build")
189
+ modifyConfig(config, ctx) {
190
+ if (!ctx) {
191
+ throw new Error("next-bun-compile: Next.js 16+ is required. Please upgrade your Next.js version.");
192
+ }
193
+ if (ctx.phase !== "phase-production-build")
191
194
  return config;
195
+ if (process.argv.includes("--webpack")) {
196
+ throw new Error("next-bun-compile: Webpack builds are not supported. Remove --webpack to use Turbopack (default).");
197
+ }
192
198
  if (config.output !== "standalone") {
193
199
  console.warn('next-bun-compile: Setting output to "standalone" (required for compilation)');
194
200
  config.output = "standalone";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-bun-compile",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Next.js Build Adapter that compiles your app into a Bun single-file executable",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",