@pronto-tools-and-more/components-renderer 8.0.2 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -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
|
-
|
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
|
}
|