Skip to content

Comments

Register MIME types for .mjs and .wasm#6140

Merged
FeodorFitsner merged 1 commit intomainfrom
fix-mjs
Feb 7, 2026
Merged

Register MIME types for .mjs and .wasm#6140
FeodorFitsner merged 1 commit intomainfrom
fix-mjs

Conversation

@FeodorFitsner
Copy link
Contributor

@FeodorFitsner FeodorFitsner commented Feb 7, 2026

Fix #6057

Add mimetypes import and register text/javascript for .mjs and application/wasm for .wasm to ensure correct MIME types when serving static files (fixes platforms like Windows that don't register these by default). The calls are made at module import time near the logger initialization.

Summary by Sourcery

Bug Fixes:

  • Register explicit MIME types for .mjs (text/javascript) and .wasm (application/wasm) to fix incorrect or missing MIME types on platforms that do not provide them by default.

Add mimetypes import and register text/javascript for .mjs and application/wasm for .wasm to ensure correct MIME types when serving static files (fixes platforms like Windows that don't register these by default). The calls are made at module import time near the logger initialization.
@cloudflare-workers-and-pages
Copy link

Deploying flet-examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: a010f5e
Status: ✅  Deploy successful!
Preview URL: https://5e81751e.flet-examples.pages.dev
Branch Preview URL: https://fix-mjs.flet-examples.pages.dev

View logs

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@cloudflare-workers-and-pages
Copy link

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a010f5e
Status: ✅  Deploy successful!
Preview URL: https://fc4107ca.flet-docs.pages.dev
Branch Preview URL: https://fix-mjs.flet-docs.pages.dev

View logs

@FeodorFitsner FeodorFitsner merged commit 3b8644f into main Feb 7, 2026
32 of 67 checks passed
@FeodorFitsner FeodorFitsner deleted the fix-mjs branch February 7, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Error with WASM script when running flet for web on Windows

1 participant