Skip to content

Commit 701e462

Browse files
elro444rmorshea
andauthored
Fix flask backend mimetype for modules (#1131)
* Fix flask backend mimetype for modules * Update changelog --------- Co-authored-by: Ryan Morshead <[email protected]>
1 parent d3959e4 commit 701e462

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/source/about/changelog.rst

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Unreleased
2626
**Fixed**
2727

2828
- :pull:`1118` - `module_from_template` is broken with a recent release of `requests`
29+
- :pull:`1131` - `module_from_template` did not work when using Flask backend
2930

3031

3132
v1.0.2

src/py/reactpy/reactpy/backend/flask.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def send_assets_dir(path: str = "") -> Any:
165165

166166
@api_blueprint.route(f"/{MODULES_PATH.name}/<path:path>")
167167
def send_modules_dir(path: str = "") -> Any:
168-
return send_file(safe_web_modules_dir_path(path))
168+
return send_file(safe_web_modules_dir_path(path), mimetype="text/javascript")
169169

170170
index_html = read_client_index_html(options)
171171

0 commit comments

Comments
 (0)