@cedarjs/vite 5.0.0-canary.2464 → 5.0.0-canary.2466
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.
|
@@ -183,7 +183,22 @@ async function bundleDistFile(distPath) {
|
|
|
183
183
|
format: "esm",
|
|
184
184
|
platform: "node",
|
|
185
185
|
target: "node24",
|
|
186
|
-
|
|
186
|
+
plugins: [
|
|
187
|
+
{
|
|
188
|
+
name: "ud-external",
|
|
189
|
+
setup(build2) {
|
|
190
|
+
build2.onResolve({ filter: /^[^.]/ }, (args) => {
|
|
191
|
+
if (args.path.startsWith("/")) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (args.path.startsWith("api/")) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
return { external: true };
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
],
|
|
187
202
|
logLevel: "silent"
|
|
188
203
|
});
|
|
189
204
|
let text = result.outputFiles[0].text;
|
|
@@ -204,12 +219,16 @@ const __cedar_default = ${defaultBinding};`;
|
|
|
204
219
|
}
|
|
205
220
|
async function generateGraphQLModule(distPath) {
|
|
206
221
|
const bundledCode = await bundleDistFile(distPath);
|
|
222
|
+
const cleanedCode = bundledCode.replace(
|
|
223
|
+
/\n\s*(?:var|const)\s+\w+\s*=\s*createGraphQLHandler\s*\(.*\)\s*;?/,
|
|
224
|
+
"\n"
|
|
225
|
+
);
|
|
207
226
|
return `
|
|
208
227
|
import { buildCedarContext, requestToLegacyEvent } from '@cedarjs/api/runtime';
|
|
209
228
|
import { createGraphQLYoga } from '@cedarjs/graphql-server';
|
|
210
229
|
|
|
211
230
|
// Inlined bundle of ${import_node_path.default.basename(distPath)} (node_modules kept external)
|
|
212
|
-
${
|
|
231
|
+
${cleanedCode}
|
|
213
232
|
|
|
214
233
|
let yogaInitPromise = null;
|
|
215
234
|
|
|
@@ -150,7 +150,22 @@ async function bundleDistFile(distPath) {
|
|
|
150
150
|
format: "esm",
|
|
151
151
|
platform: "node",
|
|
152
152
|
target: "node24",
|
|
153
|
-
|
|
153
|
+
plugins: [
|
|
154
|
+
{
|
|
155
|
+
name: "ud-external",
|
|
156
|
+
setup(build2) {
|
|
157
|
+
build2.onResolve({ filter: /^[^.]/ }, (args) => {
|
|
158
|
+
if (args.path.startsWith("/")) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (args.path.startsWith("api/")) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
return { external: true };
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
154
169
|
logLevel: "silent"
|
|
155
170
|
});
|
|
156
171
|
let text = result.outputFiles[0].text;
|
|
@@ -171,12 +186,16 @@ const __cedar_default = ${defaultBinding};`;
|
|
|
171
186
|
}
|
|
172
187
|
async function generateGraphQLModule(distPath) {
|
|
173
188
|
const bundledCode = await bundleDistFile(distPath);
|
|
189
|
+
const cleanedCode = bundledCode.replace(
|
|
190
|
+
/\n\s*(?:var|const)\s+\w+\s*=\s*createGraphQLHandler\s*\(.*\)\s*;?/,
|
|
191
|
+
"\n"
|
|
192
|
+
);
|
|
174
193
|
return `
|
|
175
194
|
import { buildCedarContext, requestToLegacyEvent } from '@cedarjs/api/runtime';
|
|
176
195
|
import { createGraphQLYoga } from '@cedarjs/graphql-server';
|
|
177
196
|
|
|
178
197
|
// Inlined bundle of ${path.basename(distPath)} (node_modules kept external)
|
|
179
|
-
${
|
|
198
|
+
${cleanedCode}
|
|
180
199
|
|
|
181
200
|
let yogaInitPromise = null;
|
|
182
201
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/vite",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.2466",
|
|
4
4
|
"description": "Vite configuration package for CedarJS",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -69,17 +69,17 @@
|
|
|
69
69
|
"@babel/generator": "7.29.1",
|
|
70
70
|
"@babel/parser": "7.29.3",
|
|
71
71
|
"@babel/traverse": "7.29.0",
|
|
72
|
-
"@cedarjs/api": "5.0.0-canary.
|
|
73
|
-
"@cedarjs/auth": "5.0.0-canary.
|
|
74
|
-
"@cedarjs/babel-config": "5.0.0-canary.
|
|
75
|
-
"@cedarjs/context": "5.0.0-canary.
|
|
76
|
-
"@cedarjs/cookie-jar": "5.0.0-canary.
|
|
77
|
-
"@cedarjs/graphql-server": "5.0.0-canary.
|
|
78
|
-
"@cedarjs/internal": "5.0.0-canary.
|
|
79
|
-
"@cedarjs/project-config": "5.0.0-canary.
|
|
80
|
-
"@cedarjs/server-store": "5.0.0-canary.
|
|
81
|
-
"@cedarjs/testing": "5.0.0-canary.
|
|
82
|
-
"@cedarjs/web": "5.0.0-canary.
|
|
72
|
+
"@cedarjs/api": "5.0.0-canary.2466",
|
|
73
|
+
"@cedarjs/auth": "5.0.0-canary.2466",
|
|
74
|
+
"@cedarjs/babel-config": "5.0.0-canary.2466",
|
|
75
|
+
"@cedarjs/context": "5.0.0-canary.2466",
|
|
76
|
+
"@cedarjs/cookie-jar": "5.0.0-canary.2466",
|
|
77
|
+
"@cedarjs/graphql-server": "5.0.0-canary.2466",
|
|
78
|
+
"@cedarjs/internal": "5.0.0-canary.2466",
|
|
79
|
+
"@cedarjs/project-config": "5.0.0-canary.2466",
|
|
80
|
+
"@cedarjs/server-store": "5.0.0-canary.2466",
|
|
81
|
+
"@cedarjs/testing": "5.0.0-canary.2466",
|
|
82
|
+
"@cedarjs/web": "5.0.0-canary.2466",
|
|
83
83
|
"@fastify/url-data": "6.0.3",
|
|
84
84
|
"@swc/core": "1.15.33",
|
|
85
85
|
"@universal-deploy/store": "^0.2.1",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"fastify": "5.8.5",
|
|
100
100
|
"fastify-raw-body": "5.0.0",
|
|
101
101
|
"find-my-way": "8.2.2",
|
|
102
|
-
"http-proxy-middleware": "3.0.
|
|
102
|
+
"http-proxy-middleware": "3.0.6",
|
|
103
103
|
"isbot": "5.1.41",
|
|
104
104
|
"react": "19.2.3",
|
|
105
105
|
"react-server-dom-webpack": "19.2.4",
|