diff --git a/.changeset/itchy-beds-drop.md b/.changeset/itchy-beds-drop.md new file mode 100644 index 000000000000..01a0d6906b0e --- /dev/null +++ b/.changeset/itchy-beds-drop.md @@ -0,0 +1,6 @@ +--- +"@sveltejs/adapter-cloudflare": patch +--- + +- Allow `npm publish` to succeed via `publishConfig.access` config +- Add instructions to README for configuring a new/existing Pages project diff --git a/packages/adapter-cloudflare/README.md b/packages/adapter-cloudflare/README.md index 62f05ae35e8b..19e627ed7b6f 100644 --- a/packages/adapter-cloudflare/README.md +++ b/packages/adapter-cloudflare/README.md @@ -39,7 +39,7 @@ export default { }; ``` -## Options +### Options The adapter optionally accepts all [`esbuild.build`](https://esbuild.github.io/api/#build-api) configuration. @@ -57,6 +57,20 @@ format: 'esm', bundle: true, ``` +## Deployment + +Please follow the [Get Started Guide](https://developers.cloudflare.com/pages/get-started) for Cloudflare Pages to begin. + +When configuring your project settings, you must use the following settings: + +- **Framework preset** – None +- **Build command** – `npm run build` or `svelte-kit build` +- **Build output directory** – `.svelte-kit/cloudflare` +- **Environment variables** + - `NODE_VERSION`: `16` or `14` + +> **Important:** You need to add a `NODE_VERSION` environment variable to both the "production" and "preview" environments. You can add this during project setup or later in the Pages project settings. SvelteKit requires Node `14.13` or later, so you should use `14` or `16` as the `NODE_VERSION` value. + ## Changelog [The Changelog for this package is available on diff --git a/packages/adapter-cloudflare/package.json b/packages/adapter-cloudflare/package.json index e58bca94b8c4..b00c68d90278 100644 --- a/packages/adapter-cloudflare/package.json +++ b/packages/adapter-cloudflare/package.json @@ -31,5 +31,8 @@ }, "devDependencies": { "@sveltejs/kit": "workspace:*" + }, + "publishConfig": { + "access": "public" } }