mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
build(prepublish): make next build bundler configurable
Allow the prepublish script to choose between webpack and turbopack using the OMNIROUTE_USE_TURBOPACK environment variable. This keeps the default build path explicit while making it possible to switch bundlers for packaging and release workflows without editing the script.
This commit is contained in:
@@ -128,7 +128,9 @@ if (existsSync(APP_DIR)) {
|
||||
|
||||
// ── Step 3: Build Next.js ──────────────────────────────────
|
||||
console.log(" 🏗️ Building Next.js (standalone)...");
|
||||
execSync("npx next build", {
|
||||
const nextBuildBundlerFlag =
|
||||
process.env.OMNIROUTE_USE_TURBOPACK === "1" ? "--turbopack" : "--webpack";
|
||||
execSync(`npx next build ${nextBuildBundlerFlag}`, {
|
||||
cwd: ROOT,
|
||||
stdio: "inherit",
|
||||
env: {
|
||||
|
||||
Reference in New Issue
Block a user