11import fs from "node:fs" ;
22import { createRequire } from "node:module" ;
3- import os from "node:os" ;
43import path from "node:path" ;
54import url from "node:url" ;
65
@@ -20,7 +19,7 @@ export type BuildOptions = ReturnType<typeof normalizeOptions>;
2019
2120export function normalizeOptions (
2221 config : OpenNextConfig ,
23- buildScriptPath : string ,
22+ distDir : string ,
2423 tempBuildDir : string ,
2524) {
2625 const appPath = path . join ( process . cwd ( ) , config . appPath || "." ) ;
@@ -55,7 +54,7 @@ export function normalizeOptions(
5554 monorepoRoot,
5655 nextVersion : getNextVersion ( appPath ) ,
5756 openNextVersion : getOpenNextVersion ( ) ,
58- openNextDistDir : url . fileURLToPath ( new URL ( "." , buildScriptPath ) ) ,
57+ openNextDistDir : distDir ,
5958 outputDir,
6059 packager,
6160 tempBuildDir,
@@ -312,21 +311,6 @@ export function copyEnvFile(
312311 }
313312}
314313
315- /**
316- * Displays a warning on windows platform.
317- */
318- export function showWarningOnWindows ( ) {
319- if ( os . platform ( ) !== "win32" ) return ;
320-
321- logger . warn ( "OpenNext is not fully compatible with Windows." ) ;
322- logger . warn (
323- "For optimal performance, it is recommended to use Windows Subsystem for Linux (WSL)." ,
324- ) ;
325- logger . warn (
326- "While OpenNext may function on Windows, it could encounter unpredictable failures during runtime." ,
327- ) ;
328- }
329-
330314/**
331315 * Check we are in a Nextjs app by looking for the Nextjs config file.
332316 */
0 commit comments