Skip to content

Commit

Permalink
fix: Windows compat.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfermigier committed Jul 16, 2024
1 parent bea2812 commit faa7b47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/flask_vite/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from __future__ import annotations

import glob
from pathlib import Path
from textwrap import dedent

from flask import current_app, url_for
Expand All @@ -20,8 +21,8 @@ def make_tag(*, static: bool = False):


def make_static_tag():
js_file = glob.glob("vite/dist/assets/*.js")[0].split("/")[-1]
css_file = glob.glob("vite/dist/assets/*.css")[0].split("/")[-1]
js_file = Path(glob.glob("vite/dist/assets/*.js")[0]).name
css_file = Path(glob.glob("vite/dist/assets/*.css")[0]).name

js_file_url = url_for("vite.static", filename=js_file)
css_file_url = url_for("vite.static", filename=css_file)
Expand Down

0 comments on commit faa7b47

Please sign in to comment.