Explorar el Código

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

Fix issue when path to '.js'-files were incorrect
Falko Schindler hace 2 años
padre
commit
2d9c65d05e
Se han modificado 1 ficheros con 1 adiciones y 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://')