@djangocfg/nextjs 2.1.34 → 2.1.35
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/bin/dev-with-browser.js +20 -11
- package/dist/config/index.mjs +1 -1
- package/dist/config/index.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/bin/dev-with-browser.js
CHANGED
|
@@ -17,23 +17,32 @@ const consola = require('consola');
|
|
|
17
17
|
|
|
18
18
|
// Parse arguments
|
|
19
19
|
const args = process.argv.slice(2);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
|
|
21
|
+
// Extract port
|
|
22
|
+
let PORT = process.env.PORT || '3000';
|
|
23
|
+
const portIndex = args.findIndex(arg => arg === '-p' || arg === '--port');
|
|
24
|
+
if (portIndex !== -1 && args[portIndex + 1]) {
|
|
25
|
+
PORT = args[portIndex + 1];
|
|
26
|
+
}
|
|
25
27
|
|
|
26
28
|
// Build next dev command
|
|
27
|
-
const nextArgs = ['dev'];
|
|
29
|
+
const nextArgs = ['dev', '-p', PORT];
|
|
28
30
|
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
// Check if --webpack flag is present
|
|
32
|
+
const hasWebpackFlag = args.includes('--webpack');
|
|
33
|
+
|
|
34
|
+
// Add --turbopack by default (unless --webpack is specified)
|
|
35
|
+
// This silences the "webpack config with no turbopack config" warning
|
|
36
|
+
if (!hasWebpackFlag) {
|
|
37
|
+
nextArgs.push('--turbopack');
|
|
32
38
|
}
|
|
33
39
|
|
|
34
|
-
// Pass through other flags
|
|
40
|
+
// Pass through other flags, excluding port arguments
|
|
35
41
|
args.forEach((arg, i) => {
|
|
36
|
-
|
|
42
|
+
const isPreviousPort = i > 0 && (args[i - 1] === '-p' || args[i - 1] === '--port');
|
|
43
|
+
const isPortFlag = arg === '-p' || arg === '--port';
|
|
44
|
+
|
|
45
|
+
if (!isPortFlag && !isPreviousPort) {
|
|
37
46
|
nextArgs.push(arg);
|
|
38
47
|
}
|
|
39
48
|
});
|
package/dist/config/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var require_package = __commonJS({
|
|
|
14
14
|
"package.json"(exports, module) {
|
|
15
15
|
module.exports = {
|
|
16
16
|
name: "@djangocfg/nextjs",
|
|
17
|
-
version: "2.1.
|
|
17
|
+
version: "2.1.35",
|
|
18
18
|
description: "Next.js server utilities: sitemap, health, OG images, contact forms, navigation, config",
|
|
19
19
|
keywords: [
|
|
20
20
|
"nextjs",
|