Explorar o código

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

Fix issue when path to '.js'-files were incorrect
Falko Schindler %!s(int64=2) %!d(string=hai) anos
pai
achega
2d9c65d05e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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://')