From d7bae43ed0535cad6475da6650f2f856386a9dd6 Mon Sep 17 00:00:00 2001 From: Elroi Allouch Date: Tue, 15 Aug 2023 11:10:12 +0300 Subject: [PATCH 1/2] Fix flask backend mimetype for modules --- src/py/reactpy/reactpy/backend/flask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/py/reactpy/reactpy/backend/flask.py b/src/py/reactpy/reactpy/backend/flask.py index 2e00e8f64..faa979aa9 100644 --- a/src/py/reactpy/reactpy/backend/flask.py +++ b/src/py/reactpy/reactpy/backend/flask.py @@ -165,7 +165,7 @@ def send_assets_dir(path: str = "") -> Any: @api_blueprint.route(f"/{MODULES_PATH.name}/") 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) From 552ea1377a575894f7d8fb7873970b480abca15d Mon Sep 17 00:00:00 2001 From: Elroi Allouch Date: Tue, 15 Aug 2023 11:22:57 +0300 Subject: [PATCH 2/2] Update changelog --- docs/source/about/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/about/changelog.rst b/docs/source/about/changelog.rst index 9535d0b67..32a3df2dc 100644 --- a/docs/source/about/changelog.rst +++ b/docs/source/about/changelog.rst @@ -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