Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@astrojs/cloudflare

Package Overview
Dependencies
Maintainers
4
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/cloudflare - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0

6

CHANGELOG.md
# @astrojs/cloudflare
## 2.0.0
### Major Changes
- [#4815](https://github.com/withastro/astro/pull/4815) [`ce0b92ba7`](https://github.com/withastro/astro/commit/ce0b92ba73072c0f0143829a53f870155ad4c7ff) Thanks [@AirBorne04](https://github.com/AirBorne04)! - adjusted esbuild config to work with worker environment (fixing solid js ssr)
## 1.0.2

@@ -4,0 +10,0 @@

8

dist/index.js

@@ -55,4 +55,4 @@ import esbuild from "esbuild";

vite.ssr = {
target: "webworker",
noExternal: true
...vite.ssr,
target: "webworker"
};

@@ -66,3 +66,5 @@ }

target: "es2020",
platform: "browser",
platform: "neutral",
mainFields: ["main", "module"],
conditions: ["worker", "node"],
entryPoints: [pkg],

@@ -69,0 +71,0 @@ outfile: pkg,

{
"name": "@astrojs/cloudflare",
"description": "Deploy your site to cloudflare pages functions",
"version": "1.0.2",
"version": "2.0.0",
"type": "module",

@@ -30,3 +30,3 @@ "types": "./dist/index.d.ts",

"devDependencies": {
"astro": "1.1.3",
"astro": "1.2.8",
"astro-scripts": "0.0.7",

@@ -33,0 +33,0 @@ "wrangler": "^2.0.23"

@@ -5,5 +5,21 @@ # @astrojs/cloudflare

In your `astro.config.mjs` use:
## Install
```js
Add the Cloudflare adapter to enable SSR in your Astro project with the following `astro add` command. This will install the adapter and make the appropriate changes to your `astro.config.mjs` file in one step.
```bash
npx astro add cloudflare
```
If you prefer to install the adapter manually instead, complete the following two steps:
1. Add the Cloudflare adapter to your project's dependencies using your preferred package manager. If you’re using npm or aren’t sure, run this in the terminal:
```bash
npm install @astrojs/cloudflare
```
2. Add the following to your `astro.config.mjs` file:
```js title="astro.config.mjs" ins={2, 5-6}
import { defineConfig } from 'astro/config';

@@ -10,0 +26,0 @@ import cloudflare from '@astrojs/cloudflare';

@@ -70,4 +70,4 @@ import type { AstroAdapter, AstroConfig, AstroIntegration, BuildConfig } from 'astro';

vite.ssr = {
...vite.ssr,
target: 'webworker',
noExternal: true,
};

@@ -81,3 +81,5 @@ }

target: 'es2020',
platform: 'browser',
platform: 'neutral',
mainFields: ['main', 'module'],
conditions: ['worker', 'node'],
entryPoints: [pkg],

@@ -84,0 +86,0 @@ outfile: pkg,

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc