summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/cuddly-clouds-complain.md7
-rw-r--r--packages/integrations/cloudflare/src/index.ts11
-rw-r--r--packages/integrations/solid/src/index.ts2
3 files changed, 12 insertions, 8 deletions
diff --git a/.changeset/cuddly-clouds-complain.md b/.changeset/cuddly-clouds-complain.md
new file mode 100644
index 000000000..8a1c88897
--- /dev/null
+++ b/.changeset/cuddly-clouds-complain.md
@@ -0,0 +1,7 @@
+---
+'@astrojs/cloudflare': major
+'@astrojs/solid-js': patch
+---
+
+adjusting the build settings for cloudflare (reverting back to platform browser over neutral)
+adjusting the ssr settings for solidjs (to build for node)
diff --git a/packages/integrations/cloudflare/src/index.ts b/packages/integrations/cloudflare/src/index.ts
index ef7dec2d4..13c8578ee 100644
--- a/packages/integrations/cloudflare/src/index.ts
+++ b/packages/integrations/cloudflare/src/index.ts
@@ -65,11 +65,8 @@ export default function createIntegration(args?: Options): AstroIntegration {
(vite.resolve.alias as Record<string, string>)[alias.find] = alias.replacement;
}
}
-
- vite.ssr = {
- ...vite.ssr,
- target: 'webworker',
- };
+ vite.ssr = vite.ssr || {};
+ vite.ssr.target = vite.ssr.target || 'webworker';
}
},
'astro:build:done': async () => {
@@ -77,9 +74,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
const pkg = fileURLToPath(entryUrl);
await esbuild.build({
target: 'es2020',
- platform: 'neutral',
- mainFields: ['main', 'module'],
- conditions: ['worker', 'node'],
+ platform: 'browser',
entryPoints: [pkg],
outfile: pkg,
allowOverwrite: true,
diff --git a/packages/integrations/solid/src/index.ts b/packages/integrations/solid/src/index.ts
index 071d05a17..38e19ad9b 100644
--- a/packages/integrations/solid/src/index.ts
+++ b/packages/integrations/solid/src/index.ts
@@ -44,6 +44,8 @@ function getViteConfiguration(isDev: boolean) {
},
ssr: {
external: ['babel-preset-solid'],
+ target: 'node',
+ noExternal: ['solid-js']
},
};
}