diff --git a/dash/dash.py b/dash/dash.py index fb14dbee03..715a794ea1 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -327,9 +327,13 @@ def _relative_url_path(relative_package_path='', namespace=''): 'Serving files from absolute_path isn\'t supported yet' ) elif 'asset_path' in resource: - static_url = flask.url_for('assets.static', - filename=resource['asset_path'], - mod=resource['ts']) + static_url = '/'.join([ + # Only take the first part of the pathname + self.config.requests_pathname_prefix.rstrip( + self.config.routes_pathname_prefix), + 'assets', + resource['asset_path'] + ]) + '?m={}'.format(resource['ts']) srcs.append(static_url) return srcs