Skip to content

Commit d9f7105

Browse files
committed
feat: add WebAssembly content type support
- Add application/wasm MIME type for .wasm files to default content types https://webassembly.github.io/spec/web-api/#streaming-modules says: > If mimeType is not a byte-case-insensitive match for `application/wasm`, > reject returnValue with a TypeError and abort these substeps.
1 parent c8b7c4c commit d9f7105

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/cli/util/content-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const defaultContentTypes: ContentTypeDef[] = [
3636
{ test: /\.pdf$/, contentType: 'application/pdf', text: false },
3737
{ test: /\.tar$/, contentType: 'application/x-tar', text: false, precompressAsset: true, },
3838
{ test: /\.zip$/, contentType: 'application/zip', text: false },
39+
{ test: /\.wasm$/, contentType: 'application/wasm', text: false },
3940
{ test: /\.eot$/, contentType: 'application/vnd.ms-fontobject', text: false },
4041
{ test: /\.otf$/, contentType: 'font/otf', text: false },
4142
{ test: /\.ttf$/, contentType: 'font/ttf', text: false },

0 commit comments

Comments
 (0)