Browse Source

Merge pull request #52 from Gipzo/fix-vue-filepath

Fix issue when path to '.js'-files were incorrect
Falko Schindler 2 years ago
parent
commit
2d9c65d05e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nicegui/elements/custom_view.py

+ 1 - 1
nicegui/elements/custom_view.py

@@ -34,7 +34,7 @@ class CustomView(jp.JustpyBaseComponent):
 
     @staticmethod
     def use(py_filepath: str, dependencies: List[str] = []):
-        vue_filepath = os.path.realpath(py_filepath).replace('.py', '.js')
+        vue_filepath = os.path.splitext(os.path.realpath(py_filepath))[0] + '.js'
 
         for dependency in dependencies:
             is_remote = dependency.startswith('http://') or dependency.startswith('https://')