@astrojs/cloudflare 12.2.0 → 12.2.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.js +0 -11
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -152,23 +152,12 @@ export default function createIntegration(args) {
|
|
|
152
152
|
vite.ssr.resolve.conditions.push('workerd', 'worker');
|
|
153
153
|
vite.ssr.target = 'webworker';
|
|
154
154
|
vite.ssr.noExternal = true;
|
|
155
|
-
if (typeof _config.vite.ssr?.external === 'undefined')
|
|
156
|
-
vite.ssr.external = [];
|
|
157
|
-
if (typeof _config.vite.ssr?.external === 'boolean')
|
|
158
|
-
vite.ssr.external = _config.vite.ssr?.external;
|
|
159
|
-
if (Array.isArray(_config.vite.ssr?.external))
|
|
160
|
-
// `@astrojs/vue` sets `@vue/server-renderer` to external
|
|
161
|
-
// https://github.com/withastro/astro/blob/e648c5575a8774af739231cfa9fc27a32086aa5f/packages/integrations/vue/src/index.ts#L119
|
|
162
|
-
// the cloudflare adapter needs to get all dependencies inlined, we use `noExternal` for that, but any `external` config overrides that
|
|
163
|
-
// therefore we need to remove `@vue/server-renderer` from the external config again
|
|
164
|
-
vite.ssr.external = _config.vite.ssr?.external.filter((entry) => entry !== '@vue/server-renderer');
|
|
165
155
|
vite.build ||= {};
|
|
166
156
|
vite.build.rollupOptions ||= {};
|
|
167
157
|
vite.build.rollupOptions.output ||= {};
|
|
168
158
|
// @ts-expect-error
|
|
169
159
|
vite.build.rollupOptions.output.banner ||=
|
|
170
160
|
'globalThis.process ??= {}; globalThis.process.env ??= {};';
|
|
171
|
-
vite.build.rollupOptions.external = _config.vite.build?.rollupOptions?.external ?? [];
|
|
172
161
|
// Cloudflare env is only available per request. This isn't feasible for code that access env vars
|
|
173
162
|
// in a global way, so we shim their access as `process.env.*`. This is not the recommended way for users to access environment variables. But we'll add this for compatibility for chosen variables. Mainly to support `@astrojs/db`
|
|
174
163
|
vite.define = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/cloudflare",
|
|
3
3
|
"description": "Deploy your site to Cloudflare Workers/Pages",
|
|
4
|
-
"version": "12.2.
|
|
4
|
+
"version": "12.2.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -31,24 +31,24 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@astrojs/internal-helpers": "0.4.2",
|
|
33
33
|
"@astrojs/underscore-redirects": "^0.6.0",
|
|
34
|
-
"@cloudflare/workers-types": "^4.
|
|
34
|
+
"@cloudflare/workers-types": "^4.20250109.0",
|
|
35
35
|
"esbuild": "^0.24.0",
|
|
36
36
|
"estree-walker": "^3.0.3",
|
|
37
37
|
"magic-string": "^0.30.17",
|
|
38
|
-
"miniflare": "^3.
|
|
38
|
+
"miniflare": "^3.20241230.1",
|
|
39
39
|
"tiny-glob": "^0.2.9",
|
|
40
40
|
"vite": "^6.0.7",
|
|
41
|
-
"wrangler": "^3.
|
|
41
|
+
"wrangler": "^3.101.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"astro": "^5.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"astro": "^5.1.
|
|
47
|
+
"astro": "^5.1.6",
|
|
48
48
|
"cheerio": "1.0.0",
|
|
49
49
|
"execa": "^8.0.1",
|
|
50
|
-
"fast-glob": "^3.3.
|
|
51
|
-
"rollup": "^4.
|
|
50
|
+
"fast-glob": "^3.3.3",
|
|
51
|
+
"rollup": "^4.30.1",
|
|
52
52
|
"strip-ansi": "^7.1.0",
|
|
53
53
|
"@astrojs/test-utils": "0.0.2",
|
|
54
54
|
"astro-scripts": "0.0.14"
|