Skip to content

Commit

Permalink
Fix flask backend mimetype for modules (#1131)
Browse files Browse the repository at this point in the history
* Fix flask backend mimetype for modules

* Update changelog

---------

Co-authored-by: Ryan Morshead <ryan.morshead@gmail.com>
  • Loading branch information
elro444 and rmorshea authored Oct 22, 2023
1 parent d3959e4 commit 701e462
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/source/about/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Unreleased
**Fixed**

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


v1.0.2
Expand Down
2 changes: 1 addition & 1 deletion src/py/reactpy/reactpy/backend/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def send_assets_dir(path: str = "") -> Any:

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

index_html = read_client_index_html(options)

Expand Down

0 comments on commit 701e462

Please sign in to comment.