@astrojs/cloudflare 7.3.1 → 7.4.0
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 +4 -5
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -169,7 +169,7 @@ default: `false`
|
|
|
169
169
|
|
|
170
170
|
Whether or not to import `.wasm` files [directly as ES modules](https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration) using the `.wasm?module` import syntax.
|
|
171
171
|
|
|
172
|
-
Add `wasmModuleImports: true` to `astro.config.mjs` to enable this functionality in both the Cloudflare build and the Astro dev server.
|
|
172
|
+
Add `wasmModuleImports: true` to `astro.config.mjs` to enable this functionality in both the Cloudflare build and the Astro dev server. Read more about [using Wasm modules](#use-wasm-modules)
|
|
173
173
|
|
|
174
174
|
```diff lang="js"
|
|
175
175
|
// astro.config.mjs
|
|
@@ -186,16 +186,15 @@ export default defineConfig({
|
|
|
186
186
|
|
|
187
187
|
### `runtime`
|
|
188
188
|
|
|
189
|
-
`runtime: "off" | "local"
|
|
189
|
+
`runtime: "off" | "local"`
|
|
190
190
|
|
|
191
191
|
default `"off"`
|
|
192
192
|
|
|
193
193
|
Determines whether and how the Cloudflare Runtime is added to `astro dev`.
|
|
194
194
|
|
|
195
|
-
The Cloudflare Runtime includes [Cloudflare bindings](https://developers.cloudflare.com/pages/platform/functions/bindings), [environment variables](https://developers.cloudflare.com/pages/platform/functions/bindings/#environment-variables), and the [cf object](https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties). Read more about [accessing the Cloudflare Runtime](#
|
|
195
|
+
The Cloudflare Runtime includes [Cloudflare bindings](https://developers.cloudflare.com/pages/platform/functions/bindings), [environment variables](https://developers.cloudflare.com/pages/platform/functions/bindings/#environment-variables), and the [cf object](https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties). Read more about [accessing the Cloudflare Runtime](#cloudflare-runtime).
|
|
196
196
|
|
|
197
|
-
- `local`: uses bindings mocking and locally static
|
|
198
|
-
- `remote`: uses remote bindings and a live fetched cf object
|
|
197
|
+
- `local`: uses bindings mocking and locally static placeholders
|
|
199
198
|
- `off`: no access to the Cloudflare runtime using `astro dev`. You can alternatively use [Preview with Wrangler](#preview-with-wrangler)
|
|
200
199
|
|
|
201
200
|
```diff lang="js"
|
package/dist/index.js
CHANGED
|
@@ -164,7 +164,7 @@ function createIntegration(args) {
|
|
|
164
164
|
fileURLToPath(assetsUrl)
|
|
165
165
|
);
|
|
166
166
|
await esbuild.build({
|
|
167
|
-
target: "
|
|
167
|
+
target: "es2022",
|
|
168
168
|
platform: "browser",
|
|
169
169
|
conditions: ["workerd", "worker", "browser"],
|
|
170
170
|
external: [
|
|
@@ -228,7 +228,7 @@ function createIntegration(args) {
|
|
|
228
228
|
const buildPath = fileURLToPath(entryUrl);
|
|
229
229
|
const finalBuildUrl = pathToFileURL(buildPath.replace(/\.mjs$/, ".js"));
|
|
230
230
|
await esbuild.build({
|
|
231
|
-
target: "
|
|
231
|
+
target: "es2022",
|
|
232
232
|
platform: "browser",
|
|
233
233
|
conditions: ["workerd", "worker", "browser"],
|
|
234
234
|
external: [
|
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": "7.
|
|
4
|
+
"version": "7.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@astrojs/underscore-redirects": "0.3.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"astro": "^3.2.
|
|
43
|
+
"astro": "^3.2.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/iarna__toml": "^2.0.2",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"cheerio": "1.0.0-rc.12",
|
|
49
49
|
"mocha": "^10.2.0",
|
|
50
50
|
"wrangler": "^3.5.1",
|
|
51
|
-
"astro": "3.2.
|
|
51
|
+
"astro": "3.2.1",
|
|
52
52
|
"astro-scripts": "0.0.14"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|