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 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)