@serwist/next 9.4.0 → 9.4.1
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/index.config.js +3 -3
- package/package.json +9 -9
- package/src/index.config.ts +3 -3
package/dist/index.config.js
CHANGED
|
@@ -12,8 +12,8 @@ const generateGlobPatterns = (distDir)=>[
|
|
|
12
12
|
const __require = createRequire(import.meta.url);
|
|
13
13
|
const loadNextConfig = __require("next/dist/server/config.js");
|
|
14
14
|
const serwist = async (options)=>{
|
|
15
|
-
const
|
|
16
|
-
const nextPhase =
|
|
15
|
+
const isDev = process.env.NODE_ENV === "development";
|
|
16
|
+
const nextPhase = isDev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_BUILD;
|
|
17
17
|
const config = await loadNextConfig.default(nextPhase, process.cwd(), {
|
|
18
18
|
silent: false
|
|
19
19
|
});
|
|
@@ -35,7 +35,7 @@ const serwist = async (options)=>{
|
|
|
35
35
|
}
|
|
36
36
|
return {
|
|
37
37
|
dontCacheBustURLsMatching: new RegExp(`^${distDir}static/`),
|
|
38
|
-
disablePrecacheManifest:
|
|
38
|
+
disablePrecacheManifest: isDev,
|
|
39
39
|
...cliOptions,
|
|
40
40
|
globDirectory,
|
|
41
41
|
globPatterns: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/next",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A module that integrates Serwist into your Next.js application.",
|
|
6
6
|
"files": [
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"kolorist": "1.8.0",
|
|
81
81
|
"semver": "7.7.3",
|
|
82
82
|
"zod": "4.2.1",
|
|
83
|
-
"@serwist/build": "9.4.
|
|
84
|
-
"@serwist/webpack-plugin": "9.4.
|
|
85
|
-
"@serwist/window": "9.4.
|
|
86
|
-
"serwist": "9.4.
|
|
83
|
+
"@serwist/build": "9.4.1",
|
|
84
|
+
"@serwist/webpack-plugin": "9.4.1",
|
|
85
|
+
"@serwist/window": "9.4.1",
|
|
86
|
+
"serwist": "9.4.1"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@types/node": "25.0.3",
|
|
@@ -96,15 +96,15 @@
|
|
|
96
96
|
"type-fest": "5.3.1",
|
|
97
97
|
"typescript": "5.9.3",
|
|
98
98
|
"webpack": "5.104.1",
|
|
99
|
-
"@serwist/cli": "9.4.
|
|
100
|
-
"@serwist/configs": "9.4.
|
|
101
|
-
"@serwist/utils": "9.4.
|
|
99
|
+
"@serwist/cli": "9.4.1",
|
|
100
|
+
"@serwist/configs": "9.4.1",
|
|
101
|
+
"@serwist/utils": "9.4.1"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"next": ">=14.0.0",
|
|
105
105
|
"react": ">=18.0.0",
|
|
106
106
|
"typescript": ">=5.0.0",
|
|
107
|
-
"@serwist/cli": "^9.4.
|
|
107
|
+
"@serwist/cli": "^9.4.1"
|
|
108
108
|
},
|
|
109
109
|
"peerDependenciesMeta": {
|
|
110
110
|
"@serwist/cli": {
|
package/src/index.config.ts
CHANGED
|
@@ -9,8 +9,8 @@ import { generateGlobPatterns } from "./lib/config/utils.js";
|
|
|
9
9
|
import loadNextConfig = require("next/dist/server/config.js");
|
|
10
10
|
|
|
11
11
|
export const serwist = async (options: SerwistOptions): Promise<BuildOptions> => {
|
|
12
|
-
const
|
|
13
|
-
const nextPhase =
|
|
12
|
+
const isDev = process.env.NODE_ENV === "development";
|
|
13
|
+
const nextPhase = isDev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_BUILD;
|
|
14
14
|
const config = await loadNextConfig.default(nextPhase, process.cwd(), {
|
|
15
15
|
silent: false,
|
|
16
16
|
});
|
|
@@ -27,7 +27,7 @@ export const serwist = async (options: SerwistOptions): Promise<BuildOptions> =>
|
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
29
|
dontCacheBustURLsMatching: new RegExp(`^${distDir}static/`),
|
|
30
|
-
disablePrecacheManifest:
|
|
30
|
+
disablePrecacheManifest: isDev,
|
|
31
31
|
...cliOptions,
|
|
32
32
|
globDirectory,
|
|
33
33
|
globPatterns: [
|