We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e34bb0 commit f0c820bCopy full SHA for f0c820b
packages/adapter-cloudflare-workers/index.js
@@ -94,6 +94,18 @@ function validate_config(builder) {
94
);
95
}
96
97
+ // @ts-ignore
98
+ if (!wrangler_config.build || !wrangler_config.build.upload) {
99
+ throw new Error(
100
+ 'You must specify build.upload options in wrangler.toml. Consult https://github.com/sveltejs/kit/tree/master/packages/adapter-cloudflare-workers'
101
+ );
102
+ }
103
+
104
105
+ if (wrangler_config.build.upload.format !== 'modules') {
106
+ throw new Error('build.upload.format in wrangler.toml must be "modules"');
107
108
109
// @ts-ignore
110
const main_file = wrangler_config.build?.upload?.main;
111
const main_file_ext = main_file?.split('.').slice(-1)[0];
0 commit comments