We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0c820b commit 9b70922Copy full SHA for 9b70922
packages/adapter-cloudflare-workers/index.js
@@ -6,7 +6,7 @@ import toml from '@iarna/toml';
6
import { fileURLToPath } from 'url';
7
8
/** @type {import('.')} */
9
-export default function () {
+export default function (options = {}) {
10
return {
11
name: '@sveltejs/adapter-cloudflare-workers',
12
@@ -53,12 +53,13 @@ export default function () {
53
);
54
55
await esbuild.build({
56
- entryPoints: [`${tmp}/entry.js`],
57
- outfile: `${entrypoint}/${main_path}`,
58
target: 'es2020',
59
platform: 'browser',
+ ...options,
+ entryPoints: [`${tmp}/entry.js`],
60
+ outfile: `${entrypoint}/${main_path}`,
61
bundle: true,
- external: ['__STATIC_CONTENT_MANIFEST'],
62
+ external: ['__STATIC_CONTENT_MANIFEST', ...(options?.external || [])],
63
format: 'esm'
64
});
65
0 commit comments