@payloadcms/next 3.68.0-internal.35482da → 3.68.0-internal.4c88018
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/cjs/withPayload.cjs +288 -228
- package/dist/cjs/withPayload.cjs.map +7 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/index.scss +38 -0
- package/dist/elements/DocumentHeader/Tabs/index.scss +54 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.scss +9 -0
- package/dist/elements/DocumentHeader/index.scss +64 -0
- package/dist/elements/FormHeader/index.scss +8 -0
- package/dist/elements/Nav/NavWrapper/index.scss +27 -0
- package/dist/elements/Nav/SettingsMenuButton/index.scss +11 -0
- package/dist/elements/Nav/index.scss +173 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/prod/styles.css +1 -1
- package/dist/templates/Default/Wrapper/index.scss +58 -0
- package/dist/templates/Default/index.scss +79 -0
- package/dist/templates/Minimal/index.scss +30 -0
- package/dist/views/API/RenderJSON/index.scss +129 -0
- package/dist/views/API/index.client.js +2 -4
- package/dist/views/API/index.client.js.map +1 -1
- package/dist/views/API/index.scss +119 -0
- package/dist/views/Account/Settings/index.scss +48 -0
- package/dist/views/BrowseByFolder/index.js +1 -2
- package/dist/views/BrowseByFolder/index.js.map +1 -1
- package/dist/views/CollectionFolders/index.js +1 -2
- package/dist/views/CollectionFolders/index.js.map +1 -1
- package/dist/views/CollectionTrash/index.js +1 -2
- package/dist/views/CollectionTrash/index.js.map +1 -1
- package/dist/views/CreateFirstUser/index.scss +21 -0
- package/dist/views/Dashboard/Default/index.scss +69 -0
- package/dist/views/List/index.js +1 -2
- package/dist/views/List/index.js.map +1 -1
- package/dist/views/Login/LoginForm/index.scss +10 -0
- package/dist/views/Login/index.scss +10 -0
- package/dist/views/Logout/index.scss +25 -0
- package/dist/views/NotFound/index.scss +57 -0
- package/dist/views/ResetPassword/index.scss +11 -0
- package/dist/views/Unauthorized/index.scss +14 -0
- package/dist/views/Verify/index.scss +16 -0
- package/dist/views/Version/Default/index.scss +170 -0
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.scss +81 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.scss +12 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.scss +9 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.scss +59 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.scss +91 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.scss +4 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.scss +9 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.scss +4 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.scss +121 -0
- package/dist/views/Version/RenderFieldsToDiff/index.scss +24 -0
- package/dist/views/Version/Restore/index.scss +84 -0
- package/dist/views/Version/SelectComparison/VersionDrawer/index.scss +18 -0
- package/dist/views/Version/SelectComparison/index.scss +9 -0
- package/dist/views/Version/VersionPillLabel/index.scss +26 -0
- package/dist/views/Versions/cells/AutosaveCell/index.scss +9 -0
- package/dist/views/Versions/index.scss +110 -0
- package/dist/withPayload/withPayload.d.ts +11 -0
- package/dist/withPayload/withPayload.d.ts.map +1 -0
- package/dist/{withPayload.js → withPayload/withPayload.js} +34 -61
- package/dist/withPayload/withPayload.js.map +1 -0
- package/dist/withPayload/withPayload.utils.d.ts +58 -0
- package/dist/withPayload/withPayload.utils.d.ts.map +1 -0
- package/dist/withPayload/withPayload.utils.js +101 -0
- package/dist/withPayload/withPayload.utils.js.map +1 -0
- package/dist/withPayload/withPayloadLegacy.d.ts +6 -0
- package/dist/withPayload/withPayloadLegacy.d.ts.map +1 -0
- package/dist/withPayload/withPayloadLegacy.js +44 -0
- package/dist/withPayload/withPayloadLegacy.js.map +1 -0
- package/package.json +18 -20
- package/dist/withPayload.d.ts +0 -5
- package/dist/withPayload.d.ts.map +0 -1
- package/dist/withPayload.js.map +0 -1
package/dist/cjs/withPayload.cjs
CHANGED
|
@@ -1,237 +1,297 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// dist/withPayload/withPayload.js
|
|
20
|
+
var withPayload_exports = {};
|
|
21
|
+
__export(withPayload_exports, {
|
|
22
|
+
default: () => withPayload_default,
|
|
23
|
+
withPayload: () => withPayload
|
|
10
24
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
module.exports = __toCommonJS(withPayload_exports);
|
|
26
|
+
|
|
27
|
+
// dist/withPayload/withPayload.utils.js
|
|
28
|
+
var import_fs = require("fs");
|
|
29
|
+
var import_meta = {};
|
|
30
|
+
function _parseInt(input) {
|
|
31
|
+
return parseInt(input || "", 10);
|
|
16
32
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
33
|
+
var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-z-][0-9a-z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-z-][0-9a-z-]*))*))?(?:\+([0-9a-z-]+(?:\.[0-9a-z-]+)*))?$/i;
|
|
34
|
+
function parseSemver(input) {
|
|
35
|
+
const match = input.match(SEMVER_REGEXP) || [];
|
|
36
|
+
const major = _parseInt(match[1]);
|
|
37
|
+
const minor = _parseInt(match[2]);
|
|
38
|
+
const patch = _parseInt(match[3]);
|
|
39
|
+
const prerelease = match[4];
|
|
40
|
+
const canaryVersion = prerelease?.startsWith("canary.") ? parseInt(prerelease.split(".")[1] || "0", 10) : void 0;
|
|
41
|
+
return {
|
|
42
|
+
buildmetadata: match[5],
|
|
43
|
+
canaryVersion,
|
|
44
|
+
major: isNaN(major) ? void 0 : major,
|
|
45
|
+
minor: isNaN(minor) ? void 0 : minor,
|
|
46
|
+
patch: isNaN(patch) ? void 0 : patch,
|
|
47
|
+
prerelease: match[4]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function getNextjsVersion() {
|
|
51
|
+
try {
|
|
52
|
+
const pkgUrl = import_meta.resolve("next/package.json");
|
|
53
|
+
const pkgJson = JSON.parse((0, import_fs.readFileSync)(new URL(pkgUrl), "utf8"));
|
|
54
|
+
return parseSemver(pkgJson.version);
|
|
55
|
+
} catch {
|
|
56
|
+
return void 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function supportsTurbopackExternalizeTransitiveDependencies(version) {
|
|
60
|
+
if (!version) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const {
|
|
64
|
+
canaryVersion,
|
|
65
|
+
major,
|
|
66
|
+
minor
|
|
67
|
+
} = version;
|
|
68
|
+
if (major === void 0 || minor === void 0) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
if (major > 16) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
if (major === 16) {
|
|
75
|
+
if (minor > 1) {
|
|
76
|
+
return true;
|
|
53
77
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
78
|
+
if (minor === 1) {
|
|
79
|
+
if (canaryVersion !== void 0) {
|
|
80
|
+
return canaryVersion >= 15;
|
|
81
|
+
} else {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
59
84
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// dist/withPayload/withPayloadLegacy.js
|
|
90
|
+
var withPayloadLegacy = (nextConfig = {}) => {
|
|
91
|
+
if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== "false") {
|
|
92
|
+
const turbopackWarningText = "Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.\nTry to install it into the project directory by running";
|
|
93
|
+
const turbopackConfigWarningText = "Unrecognized key(s) in object: 'turbopack'";
|
|
94
|
+
const consoleWarn = console.warn;
|
|
95
|
+
console.warn = (...args) => {
|
|
96
|
+
if (typeof args[1] === "string" && args[1].includes(turbopackWarningText) || typeof args[0] === "string" && args[0].includes(turbopackWarningText)) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const hasTurbopackConfigWarning = typeof args[1] === "string" && args[1].includes(turbopackConfigWarningText) || typeof args[0] === "string" && args[0].includes(turbopackConfigWarningText);
|
|
100
|
+
if (hasTurbopackConfigWarning) {
|
|
101
|
+
consoleWarn(...args);
|
|
102
|
+
consoleWarn('Payload: You can safely ignore the "Invalid next.config" warning above. This only occurs on Next.js 15.2.x or lower. We recommend upgrading to Next.js 15.4.7 to resolve this warning.');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
consoleWarn(...args);
|
|
63
106
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
107
|
+
}
|
|
108
|
+
const isBuild = process.env.NODE_ENV === "production";
|
|
109
|
+
const isTurbopackNextjs15 = process.env.TURBOPACK === "1";
|
|
110
|
+
const isTurbopackNextjs16 = process.env.TURBOPACK === "auto";
|
|
111
|
+
if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {
|
|
112
|
+
throw new Error("Your Next.js and Payload versions do not support using Turbopack for production builds. Please upgrade to Next.js 16.1.0-canary.15 or higher if you want to use Turbopack for builds.");
|
|
113
|
+
}
|
|
114
|
+
const toReturn = {
|
|
115
|
+
...nextConfig,
|
|
116
|
+
serverExternalPackages: [
|
|
117
|
+
// serverExternalPackages = webpack.externals, but with turbopack support and an additional check
|
|
118
|
+
// for whether the package is resolvable from the project root
|
|
119
|
+
...nextConfig.serverExternalPackages || [],
|
|
120
|
+
// External, because it installs import-in-the-middle and require-in-the-middle - both in the default serverExternalPackages list.
|
|
121
|
+
"@sentry/nextjs"
|
|
122
|
+
]
|
|
123
|
+
};
|
|
124
|
+
return toReturn;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// dist/withPayload/withPayload.js
|
|
128
|
+
var poweredByHeader = {
|
|
129
|
+
key: "X-Powered-By",
|
|
130
|
+
value: "Next.js, Payload"
|
|
131
|
+
};
|
|
132
|
+
var withPayload = (nextConfig = {}, options = {}) => {
|
|
133
|
+
const nextjsVersion = getNextjsVersion();
|
|
134
|
+
const supportsTurbopackBuild = supportsTurbopackExternalizeTransitiveDependencies(nextjsVersion);
|
|
135
|
+
const env = nextConfig.env || {};
|
|
136
|
+
if (nextConfig.experimental?.staleTimes?.dynamic) {
|
|
137
|
+
console.warn("Payload detected a non-zero value for the `staleTimes.dynamic` option in your Next.js config. This will slow down page transitions and may cause stale data to load within the Admin panel. To clear this warning, remove the `staleTimes.dynamic` option from your Next.js config or set it to 0. In the future, Next.js may support scoping this option to specific routes.");
|
|
138
|
+
env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH = "true";
|
|
139
|
+
}
|
|
140
|
+
const baseConfig = {
|
|
141
|
+
...nextConfig,
|
|
142
|
+
env,
|
|
143
|
+
outputFileTracingExcludes: {
|
|
144
|
+
...nextConfig.outputFileTracingExcludes || {},
|
|
145
|
+
"**/*": [...nextConfig.outputFileTracingExcludes?.["**/*"] || [], "drizzle-kit", "drizzle-kit/api"]
|
|
146
|
+
},
|
|
147
|
+
outputFileTracingIncludes: {
|
|
148
|
+
...nextConfig.outputFileTracingIncludes || {},
|
|
149
|
+
"**/*": [...nextConfig.outputFileTracingIncludes?.["**/*"] || [], "@libsql/client"]
|
|
150
|
+
},
|
|
151
|
+
turbopack: {
|
|
152
|
+
...nextConfig.turbopack || {}
|
|
153
|
+
},
|
|
154
|
+
// We disable the poweredByHeader here because we add it manually in the headers function below
|
|
155
|
+
...nextConfig.poweredByHeader !== false ? {
|
|
156
|
+
poweredByHeader: false
|
|
157
|
+
} : {},
|
|
158
|
+
headers: async () => {
|
|
159
|
+
const headersFromConfig = "headers" in nextConfig ? await nextConfig.headers() : [];
|
|
160
|
+
return [...headersFromConfig || [], {
|
|
161
|
+
headers: [{
|
|
162
|
+
key: "Accept-CH",
|
|
163
|
+
value: "Sec-CH-Prefers-Color-Scheme"
|
|
164
|
+
}, {
|
|
165
|
+
key: "Vary",
|
|
166
|
+
value: "Sec-CH-Prefers-Color-Scheme"
|
|
167
|
+
}, {
|
|
168
|
+
key: "Critical-CH",
|
|
169
|
+
value: "Sec-CH-Prefers-Color-Scheme"
|
|
170
|
+
}, ...nextConfig.poweredByHeader !== false ? [poweredByHeader] : []],
|
|
171
|
+
source: "/:path*"
|
|
172
|
+
}];
|
|
173
|
+
},
|
|
174
|
+
serverExternalPackages: [
|
|
175
|
+
// WHY: without externalizing graphql, a graphql version error will be thrown
|
|
176
|
+
// during runtime ("Ensure that there is only one instance of \"graphql\" in the node_modules\ndirectory.")
|
|
177
|
+
"graphql",
|
|
178
|
+
...process.env.NODE_ENV === "development" && options.devBundleServerPackages !== true ? (
|
|
179
|
+
/**
|
|
180
|
+
* Unless explicitly disabled by the user, by passing `devBundleServerPackages: true` to withPayload, we
|
|
181
|
+
* do not bundle server-only packages during dev for two reasons:
|
|
182
|
+
*
|
|
183
|
+
* 1. Performance: Fewer files to compile means faster compilation speeds.
|
|
184
|
+
* 2. Turbopack support: Webpack's externals are not supported by Turbopack.
|
|
185
|
+
*
|
|
186
|
+
* Regarding Turbopack support: Unlike webpack.externals, we cannot use serverExternalPackages to
|
|
187
|
+
* externalized packages that are not resolvable from the project root. So including a package like
|
|
188
|
+
* "drizzle-kit" in here would do nothing - Next.js will ignore the rule and still bundle the package -
|
|
189
|
+
* because it detects that the package is not resolvable from the project root (= not directly installed
|
|
190
|
+
* by the user in their own package.json).
|
|
191
|
+
*
|
|
192
|
+
* Instead, we can use serverExternalPackages for the entry-point packages that *are* installed directly
|
|
193
|
+
* by the user (e.g. db-postgres, which then installs drizzle-kit as a dependency).
|
|
194
|
+
*
|
|
195
|
+
*
|
|
196
|
+
*
|
|
197
|
+
* We should only do this during development, not build, because externalizing these packages can hurt
|
|
198
|
+
* the bundle size. Not only does it disable tree-shaking, it also risks installing duplicate copies of the
|
|
199
|
+
* same package.
|
|
200
|
+
*
|
|
201
|
+
* Example:
|
|
202
|
+
* - @payloadcms/richtext-lexical (in bundle) -> installs qs-esm (bundled because of importer)
|
|
203
|
+
* - payload (not in bundle, external) -> installs qs-esm (external because of importer)
|
|
204
|
+
* Result: we have two copies of qs-esm installed - one in the bundle, and one in node_modules.
|
|
205
|
+
*
|
|
206
|
+
* During development, these bundle size difference do not matter much, and development speed /
|
|
207
|
+
* turbopack support are more important.
|
|
208
|
+
*/
|
|
209
|
+
["payload", "@payloadcms/db-mongodb", "@payloadcms/db-postgres", "@payloadcms/db-sqlite", "@payloadcms/db-vercel-postgres", "@payloadcms/db-d1-sqlite", "@payloadcms/drizzle", "@payloadcms/email-nodemailer", "@payloadcms/email-resend", "@payloadcms/graphql", "@payloadcms/payload-cloud", "@payloadcms/plugin-redirects"]
|
|
210
|
+
) : []
|
|
211
|
+
],
|
|
212
|
+
webpack: (webpackConfig, webpackOptions) => {
|
|
213
|
+
const incomingWebpackConfig = typeof nextConfig.webpack === "function" ? nextConfig.webpack(webpackConfig, webpackOptions) : webpackConfig;
|
|
214
|
+
return {
|
|
215
|
+
...incomingWebpackConfig,
|
|
216
|
+
externals: [
|
|
217
|
+
...incomingWebpackConfig?.externals || [],
|
|
218
|
+
/**
|
|
219
|
+
* See the explanation in the serverExternalPackages section above.
|
|
220
|
+
* We need to force Webpack to emit require() calls for these packages, even though they are not
|
|
221
|
+
* resolvable from the project root. You would expect this to error during runtime, but Next.js seems to be able to require these just fine.
|
|
222
|
+
*
|
|
223
|
+
* This is the only way to get Webpack Build to work, without the bundle size caveats of externalizing the
|
|
224
|
+
* entry point packages, as explained in the serverExternalPackages section above.
|
|
225
|
+
*/
|
|
226
|
+
"drizzle-kit",
|
|
227
|
+
"drizzle-kit/api",
|
|
228
|
+
"sharp",
|
|
229
|
+
"libsql",
|
|
230
|
+
"require-in-the-middle"
|
|
171
231
|
],
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js
|
|
208
|
-
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.js
|
|
209
|
-
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/index.js
|
|
210
|
-
* ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/lib/index.js
|
|
211
|
-
* ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/index.js
|
|
212
|
-
* ./node_modules/.pnpm/@payloadcms+db-mongodb@3.64.0_payload@3.64.0_graphql@16.12.0_typescript@5.7.3_/node_modules/@payloadcms/db-mongodb/dist/index.js
|
|
213
|
-
* ./src/payload.config.ts
|
|
214
|
-
* ./src/app/my-route/route.ts
|
|
215
|
-
*
|
|
216
|
-
**/ aws4: false
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
plugins: [
|
|
220
|
-
...incomingWebpackConfig?.plugins || [],
|
|
221
|
-
// Fix cloudflare:sockets error: https://github.com/vercel/next.js/discussions/50177
|
|
222
|
-
new webpackOptions.webpack.IgnorePlugin({
|
|
223
|
-
resourceRegExp: /^pg-native$|^cloudflare:sockets$/
|
|
224
|
-
})
|
|
225
|
-
]
|
|
226
|
-
};
|
|
232
|
+
plugins: [
|
|
233
|
+
...incomingWebpackConfig?.plugins || [],
|
|
234
|
+
// Fix cloudflare:sockets error: https://github.com/vercel/next.js/discussions/50177
|
|
235
|
+
new webpackOptions.webpack.IgnorePlugin({
|
|
236
|
+
resourceRegExp: /^pg-native$|^cloudflare:sockets$/
|
|
237
|
+
})
|
|
238
|
+
],
|
|
239
|
+
resolve: {
|
|
240
|
+
...incomingWebpackConfig?.resolve || {},
|
|
241
|
+
alias: {
|
|
242
|
+
...incomingWebpackConfig?.resolve?.alias || {}
|
|
243
|
+
},
|
|
244
|
+
fallback: {
|
|
245
|
+
...incomingWebpackConfig?.resolve?.fallback || {},
|
|
246
|
+
/*
|
|
247
|
+
* This fixes the following warning when running next build with webpack (tested on Next.js 16.0.3 with Payload 3.64.0):
|
|
248
|
+
*
|
|
249
|
+
* ⚠ Compiled with warnings in 8.7s
|
|
250
|
+
*
|
|
251
|
+
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js
|
|
252
|
+
* Module not found: Can't resolve 'aws4' in '/Users/alessio/Documents/temp/next16p/node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib'
|
|
253
|
+
*
|
|
254
|
+
* Import trace for requested module:
|
|
255
|
+
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js
|
|
256
|
+
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.js
|
|
257
|
+
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/index.js
|
|
258
|
+
* ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/lib/index.js
|
|
259
|
+
* ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/index.js
|
|
260
|
+
* ./node_modules/.pnpm/@payloadcms+db-mongodb@3.64.0_payload@3.64.0_graphql@16.12.0_typescript@5.7.3_/node_modules/@payloadcms/db-mongodb/dist/index.js
|
|
261
|
+
* ./src/payload.config.ts
|
|
262
|
+
* ./src/app/my-route/route.ts
|
|
263
|
+
*
|
|
264
|
+
**/
|
|
265
|
+
aws4: false
|
|
266
|
+
}
|
|
227
267
|
}
|
|
228
|
-
|
|
229
|
-
if (nextConfig.basePath) {
|
|
230
|
-
toReturn.env.NEXT_BASE_PATH = nextConfig.basePath;
|
|
268
|
+
};
|
|
231
269
|
}
|
|
232
|
-
|
|
270
|
+
};
|
|
271
|
+
if (nextConfig.basePath) {
|
|
272
|
+
baseConfig.env.NEXT_BASE_PATH = nextConfig.basePath;
|
|
273
|
+
}
|
|
274
|
+
if (!supportsTurbopackBuild) {
|
|
275
|
+
return withPayloadLegacy(baseConfig);
|
|
276
|
+
} else {
|
|
277
|
+
return {
|
|
278
|
+
...baseConfig,
|
|
279
|
+
serverExternalPackages: [
|
|
280
|
+
...baseConfig.serverExternalPackages || [],
|
|
281
|
+
"drizzle-kit",
|
|
282
|
+
"drizzle-kit/api",
|
|
283
|
+
"sharp",
|
|
284
|
+
"libsql",
|
|
285
|
+
"require-in-the-middle",
|
|
286
|
+
// Prevents turbopack build errors by the thread-stream package which is installed by pino
|
|
287
|
+
"pino"
|
|
288
|
+
]
|
|
289
|
+
};
|
|
290
|
+
}
|
|
233
291
|
};
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
292
|
+
var withPayload_default = withPayload;
|
|
293
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
294
|
+
0 && (module.exports = {
|
|
295
|
+
withPayload
|
|
296
|
+
});
|
|
297
|
+
//# sourceMappingURL=withPayload.cjs.map
|