bertui 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bertui",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Lightning-fast React dev server powered by Bun - Now with Rust image optimization (WASM, no Rust required for users)",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -145,10 +145,10 @@ export async function createDevHandler(options = {}) {
145
145
  const filepath = join(root, 'node_modules', url.pathname.replace('/node_modules/', ''));
146
146
  const file = Bun.file(filepath);
147
147
  if (await file.exists()) {
148
- const ext = extname(filepath).toLowerCase();
149
148
  const contentType = ext === '.css' ? 'text/css' :
150
- ['.js', '.mjs'].includes(ext) ? 'application/javascript; charset=utf-8' :
151
- getContentType(ext);
149
+ ['.js', '.mjs', '.jsx', '.ts', '.tsx'].includes(ext) ? 'application/javascript; charset=utf-8' :
150
+ ext === '.json' ? 'application/json' :
151
+ getContentType(ext);
152
152
  return new Response(file, {
153
153
  headers: { 'Content-Type': contentType, 'Cache-Control': 'no-cache' },
154
154
  });