@djangocfg/nextjs 2.1.33 → 2.1.34
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/README.md +22 -0
- package/bin/dev-with-browser.js +105 -0
- package/dist/config/index.d.mts +5 -1
- package/dist/config/index.mjs +7 -5
- package/dist/config/index.mjs.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -5
- package/src/config/createNextConfig.ts +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/nextjs",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.34",
|
|
4
4
|
"description": "Next.js server utilities: sitemap, health, OG images, contact forms, navigation, config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nextjs",
|
|
@@ -83,11 +83,13 @@
|
|
|
83
83
|
"files": [
|
|
84
84
|
"dist",
|
|
85
85
|
"src",
|
|
86
|
+
"bin",
|
|
86
87
|
"README.md",
|
|
87
88
|
"LICENSE"
|
|
88
89
|
],
|
|
89
90
|
"bin": {
|
|
90
|
-
"djangocfg-docs": "./dist/ai/cli.mjs"
|
|
91
|
+
"djangocfg-docs": "./dist/ai/cli.mjs",
|
|
92
|
+
"nextjs-dev": "./bin/dev-with-browser.js"
|
|
91
93
|
},
|
|
92
94
|
"scripts": {
|
|
93
95
|
"build": "tsup",
|
|
@@ -109,9 +111,9 @@
|
|
|
109
111
|
"semver": "^7.7.3"
|
|
110
112
|
},
|
|
111
113
|
"devDependencies": {
|
|
112
|
-
"@djangocfg/imgai": "^2.1.
|
|
113
|
-
"@djangocfg/layouts": "^2.1.
|
|
114
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
114
|
+
"@djangocfg/imgai": "^2.1.34",
|
|
115
|
+
"@djangocfg/layouts": "^2.1.34",
|
|
116
|
+
"@djangocfg/typescript-config": "^2.1.34",
|
|
115
117
|
"@types/node": "^24.7.2",
|
|
116
118
|
"@types/react": "19.2.2",
|
|
117
119
|
"@types/react-dom": "19.2.1",
|
|
@@ -42,7 +42,11 @@ export interface BaseNextConfigOptions {
|
|
|
42
42
|
transpilePackages?: string[];
|
|
43
43
|
/** Additional optimize package imports (merged with defaults) */
|
|
44
44
|
optimizePackageImports?: string[];
|
|
45
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Automatically open browser in dev mode (default: false)
|
|
47
|
+
* NOTE: Only works with webpack mode in Next.js 16+ (Turbopack doesn't support webpack plugins)
|
|
48
|
+
* For Turbopack compatibility, use a custom dev script instead of this option
|
|
49
|
+
*/
|
|
46
50
|
openBrowser?: boolean;
|
|
47
51
|
/** Check for @djangocfg/* package updates on startup (default: true) */
|
|
48
52
|
checkUpdates?: boolean;
|
|
@@ -101,10 +105,6 @@ export function createBaseNextConfig(
|
|
|
101
105
|
reactStrictMode: true,
|
|
102
106
|
trailingSlash: true,
|
|
103
107
|
|
|
104
|
-
// Turbopack config (empty to silence Next.js 16 warning about webpack config)
|
|
105
|
-
// Webpack config is still used for dev startup plugin and compression
|
|
106
|
-
turbopack: {},
|
|
107
|
-
|
|
108
108
|
// Static export configuration
|
|
109
109
|
...(isStaticBuild && {
|
|
110
110
|
output: 'export' as const,
|
|
@@ -197,10 +197,13 @@ export function createBaseNextConfig(
|
|
|
197
197
|
},
|
|
198
198
|
|
|
199
199
|
// Webpack configuration
|
|
200
|
+
// NOTE: Next.js 16 uses Turbopack by default in dev mode, which doesn't support webpack plugins.
|
|
201
|
+
// DevStartupPlugin only runs in webpack mode (next dev --webpack).
|
|
202
|
+
// For Turbopack compatibility, consider using a custom dev script for browser auto-open.
|
|
200
203
|
webpack: (config: WebpackConfig, webpackOptions: { isServer: boolean; dev: boolean; [key: string]: any }) => {
|
|
201
204
|
const { isServer, dev } = webpackOptions;
|
|
202
205
|
|
|
203
|
-
// Add dev startup plugin (client-side only in dev)
|
|
206
|
+
// Add dev startup plugin (client-side only in dev, webpack mode only)
|
|
204
207
|
if (dev && !isServer) {
|
|
205
208
|
if (!config.plugins) {
|
|
206
209
|
config.plugins = [];
|