For development, I'd like to serve static files from the blueprint's static folder. However, I don't want to load all files via the url prefix of the blueprint. Is there a possibility to configure flask, so it looks in all blueprint's static folders and returns the first file it finds? The reason for this is that when I deploy the application, the build process will pull all the files our of the blueprints and put them into a separate folder (similar to Django's collectstatics).
In other words, I have 2 blueprints: foo
and bar
:
app
+--- foo
| +--- assets
| | +--- css
| | |
| | +--- js
| +
| |
| +--- __init__.py: foo_blueprint = Blueprint('foo', __name__, static_folder='assets')
|
+--- bar
+
|
+--- __init__.py: bar_blueprint = Blueprint('bar', __name__, static_folder='assets')
I want all js files in the particular js
subfolders to be available from the url /static/js/file.js
. Is this possible?