@embeddable.com/sdk-core 3.2.0-next.5 → 3.2.0-next.7

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/bin/embeddable CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
+ const { pathToFileURL } = require("url");
5
+
4
6
  const { spawn } = require("child_process");
5
7
  const path = require("path");
6
8
 
@@ -13,14 +15,24 @@ if (!process.env.LOADER_APPLIED) {
13
15
  "../loader/custom-esm-loader.mjs",
14
16
  );
15
17
 
18
+ const isWindows = process.platform === "win32";
19
+
20
+ const entryPointPathOrUrl = isWindows
21
+ ? pathToFileURL(entryPointPath).href
22
+ : entryPointPath;
23
+
24
+ const customLoaderPathOrUrl = isWindows
25
+ ? pathToFileURL(customLoaderPath).href
26
+ : customLoaderPath;
27
+
16
28
  const child = spawn(
17
29
  process.execPath,
18
30
  [
19
31
  "--loader",
20
- customLoaderPath,
32
+ customLoaderPathOrUrl,
21
33
  "--no-warnings=ExperimentalWarning",
22
34
  "--enable-source-maps",
23
- entryPointPath,
35
+ entryPointPathOrUrl,
24
36
  ...process.argv.slice(2),
25
37
  ],
26
38
  { stdio: ["inherit", "pipe", "inherit"], env },
package/lib/index.esm.js CHANGED
@@ -4631,10 +4631,12 @@ var provideConfig = async () => {
4631
4631
  console.log("Please create a proper `embeddable.config.js` or `embeddable.config.ts` file in the root of your project.");
4632
4632
  process.exit(1);
4633
4633
  }
4634
+ const isWindows = process.platform === "win32";
4634
4635
  const configPath = fs$2.existsSync(tsConfigFilePath)
4635
4636
  ? tsConfigFilePath
4636
4637
  : configFilePath;
4637
- return (await import(url$2.pathToFileURL(configPath).href)).default;
4638
+ const pathOrUrl = isWindows ? url$2.pathToFileURL(configPath).href : configPath;
4639
+ return (await import(pathOrUrl)).default;
4638
4640
  };
4639
4641
 
4640
4642
  function getDefaultExportFromCjs (x) {