We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe790b9 commit 5cd32b1Copy full SHA for 5cd32b1
.changeset/cute-pianos-joke.md
@@ -0,0 +1,5 @@
1
+---
2
+"wrangler": patch
3
4
+
5
+fix: throw explicit error for unknown mimetype during `wrangler check startup`
packages/wrangler/src/check/commands.ts
@@ -148,7 +148,15 @@ async function getEntryValue(
148
149
function getModuleType(entry: FormDataEntryValue) {
150
if (entry instanceof Blob) {
151
- return ModuleTypeToRuleType[mimeTypeModuleType[entry.type]];
+ const type = ModuleTypeToRuleType[mimeTypeModuleType[entry.type]];
152
153
+ if (!type) {
154
+ throw new Error(
155
+ `Unable to determine module type for ${entry.type} mime type`
156
+ );
157
+ }
158
159
+ return type;
160
} else {
161
return "Text";
162
}
0 commit comments