Skip to content

Commit 3c041e1

Browse files
authored
Merge branch 'v6' into v5-link
2 parents 7efc678 + cb57355 commit 3c041e1

3 files changed

Lines changed: 38 additions & 7 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<!-- Thank you for opening a PR! We really appreciate you taking the time to help out 🙌 -->
22

3-
<!-- 🚨 IMPORTANT INFO AS WE PREPARE FOR v6 🚨 -->
4-
<!-- We are only accepting emergency fixes for v5 docs (typos, links etc.) -->
5-
<!-- All new feature documentation PRs must use the `v6` branch -->
6-
<!-- No new translations will be accepted until v6 is released -->
7-
83
#### Description (required)
94

105
<!-- Please describe the change you are proposing, and why -->
@@ -20,7 +15,7 @@
2015
<!-- 1. Uncomment the line below, update the minor version number if known, and include a PR link -->
2116
<!-- #### For Astro version: `6.x`. See astro PR [#](url). -->
2217

23-
<!-- 2. Check that your PR includes `<p><Since v="4.x.0" /></p>` and imports the `<Since>` component, if necessary! -->
18+
<!-- 2. Check that your PR includes `<p><Since v="6.x.x" /></p>` and imports the `<Since>` component, if necessary! -->
2419

2520
<!-- #### First-time contributor to Astro Docs? -->
2621

public/_redirects

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@
4444
/:lang/guides/deploy/google-firebase/ /:lang/guides/deploy/firebase/
4545
/:lang/guides/backend/google-firebase/ /:lang/guides/backend/firebase/
4646
/:lang/guides/backend/appwriteio/ /:lang/guides/backend/appwrite/
47-
47+
/:lang/reference/experimental-flags/csp/ /:lang/reference/configuration-reference/#securitycsp
48+
/:lang/reference/experimental-flags/fail-on-prerender-conflict/ /:lang/reference/configuration-reference/#prerenderconflictbehavior
49+
/:lang/reference/experimental-flags/fonts/ /:lang/guides/fonts/
50+
/:lang/reference/experimental-flags/heading-id-compat/ /:lang/guides/markdown-content/#heading-ids
51+
/:lang/reference/experimental-flags/live-content-collections/ /:lang/guides/content-collections/#live-content-collections
52+
/:lang/reference/experimental-flags/preserve-scripts-order/ /:lang/guides/client-side-scripts/
53+
/:lang/reference/experimental-flags/static-import-meta-env/ /:lang/guides/environment-variables/
4854

4955
# Very old docs site redirects
5056
# Once upon a time these URLs existed, so we try to keep them meaning something.

src/content/docs/en/guides/integrations-guide/cloudflare.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,36 @@ This change helps you catch issues during development that would have previously
454454

455455
This change is transparent for most projects. If your project had special configuration for `astro dev` or was relying on Node.js-specific behavior in development, adjust your code or configuration accordingly.
456456

457+
### Some dependencies might need to be pre-compiled
458+
459+
The new workerd environment does not support CommonJS syntax, including Node.js specific syntax such as `require` and `module.exports`. This means that some of your project dependencies may throw errors in the development server or during the build.
460+
461+
If you have control over the dependency, you can create a Vite plugin and pre-compile the dependency using the `optimiseDeps.include` option.
462+
463+
For example, you can create a Vite plugin to pre-compile the dependency `postcss` in order to use the Expressive Code syntax highlighter:
464+
465+
```js ins={8-14}
466+
function noExternalPlugin() {
467+
return {
468+
name: "optimise-dependencies",
469+
configEnvironment(environment) {
470+
// We're only interested in server environments
471+
if (environment !== 'client') {
472+
return {
473+
optimizeDeps: {
474+
include: [
475+
"postcss"
476+
// Or you can use this syntax if you don't depend directly on a dependency
477+
// "expressive-code > postcss"
478+
]
479+
}
480+
}
481+
}
482+
}
483+
}
484+
}
485+
```
486+
457487
### Changed: Wrangler entrypoint configuration
458488

459489
Previously, the `main` field in your Wrangler configuration pointed to the built worker file (e.g. `dist/_worker.js/index.js`). With Astro 6, this has changed to point to a new unified entrypoint provided by the Cloudflare adapter: `@astrojs/cloudflare/entrypoints/server`.

0 commit comments

Comments
 (0)