Skip to content

Commit

Permalink
Add **/*.wasm?module as a default module rule (#2783)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregBrimble committed Apr 11, 2023
1 parent 86e942b commit 4c55baf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/proud-sloths-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

feat: Add `**/*.wasm?module` as default module rule (alias of `**/*.wasm`)
2 changes: 1 addition & 1 deletion packages/wrangler/src/module-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const ModuleTypeToRuleType = flipObject(RuleTypeToModuleType);
export const DEFAULT_MODULE_RULES: Config["rules"] = [
{ type: "Text", globs: ["**/*.txt", "**/*.html"] },
{ type: "Data", globs: ["**/*.bin"] },
{ type: "CompiledWasm", globs: ["**/*.wasm"] },
{ type: "CompiledWasm", globs: ["**/*.wasm", "**/*.wasm?module"] },
];

export function parseRules(userRules: Config["rules"] = []) {
Expand Down

0 comments on commit 4c55baf

Please sign in to comment.