diff --git a/packages/studio/src/utils/dynamicImportFromBrowser.ts b/packages/studio/src/utils/dynamicImportFromBrowser.ts index 3494f3bdc..fbcad436f 100644 --- a/packages/studio/src/utils/dynamicImportFromBrowser.ts +++ b/packages/studio/src/utils/dynamicImportFromBrowser.ts @@ -1,3 +1,5 @@ +import path from "path-browserify"; + /* eslint-disable @typescript-eslint/no-explicit-any */ /** * In order to support dynamic imports from the browser on Windows, @@ -8,5 +10,6 @@ export default function dynamicImportFromBrowser( absFilepath: string ): Promise { - return import(/* @vite-ignore */ "/@fs/" + absFilepath); + const importPath = path.join("/@fs", absFilepath); + return import(/* @vite-ignore */ importPath); }