@pronto-tools-and-more/components-renderer 8.0.1 → 8.1.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components-renderer",
3
- "version": "8.0.1",
3
+ "version": "8.1.0",
4
4
  "description": "",
5
5
  "main": "src/componentsRendererMain.js",
6
6
  "type": "module",
@@ -1,5 +1,6 @@
1
1
  import { VError } from "@lvce-editor/verror";
2
2
  import * as Assert from "../Assert/Assert.js";
3
+ import { pathToFileURL } from "url";
3
4
 
4
5
  export const loadSwc = async (swcNodePath, tsconfigPath) => {
5
6
  try {
@@ -7,7 +8,8 @@ export const loadSwc = async (swcNodePath, tsconfigPath) => {
7
8
  Assert.string(tsconfigPath);
8
9
  // @ts-ignore
9
10
  process.env.TS_NODE_PROJECT = tsconfigPath;
10
- await import(swcNodePath);
11
+ const swcUri = pathToFileURL(swcNodePath).toString();
12
+ await import(swcUri);
11
13
  } catch (error) {
12
14
  throw new VError(error, `Failed to load swc`);
13
15
  }