Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/integrations/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ export default function createIntegration(args?: Options): AstroIntegration {
vite.build.rollupOptions.output.banner ||=
'globalThis.process ??= {}; globalThis.process.env ??= {};';

vite.build.rollupOptions.external = ['sharp'];

// Cloudflare env is only available per request. This isn't feasible for code that access env vars
// 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`
vite.define = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "astro dev"
"dev": "astro dev",
"build": "astro build"
},
"dependencies": {
"@astrojs/cloudflare": "workspace:*",
"@astrojs/mdx": "^4.3.5",
"@astrojs/react": "workspace:*",
"@types/react": "^18.3.24",
"@types/react-dom": "^18.3.7",
"astro": "workspace:*",
"@types/react": "^18.3.24",
"@types/react-dom": "^18.3.7",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sharp": "^0.34.3"
}
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading