@embeddable.com/sdk-react 3.1.1-next.0 → 3.1.1-next.2

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/lib/index.esm.js CHANGED
@@ -6,6 +6,7 @@ import * as vite from 'vite';
6
6
  import viteReactPlugin from '@vitejs/plugin-react';
7
7
  import * as fs from 'node:fs/promises';
8
8
  import { readdir, lstat, rm } from 'node:fs/promises';
9
+ import * as url from 'node:url';
9
10
  import 'node:child_process';
10
11
  import { z } from 'zod';
11
12
  import { parse } from '@babel/parser';
@@ -25,7 +26,7 @@ var createContext = (pluginRoot, coreCtx) => {
25
26
  };
26
27
 
27
28
  const loadComponentMeta = async (moduleId) => {
28
- const module = await import(moduleId);
29
+ const module = await import(url.pathToFileURL(moduleId).href);
29
30
  return module.meta;
30
31
  };
31
32
 
@@ -1063,7 +1064,7 @@ async function runViteBuild(ctx, watch = null) {
1063
1064
  outDir: path.resolve(ctx.client.buildDir, ctx["sdk-react"].outputOptions.buildName),
1064
1065
  },
1065
1066
  define: {
1066
- "process.env.NODE_ENV": `${watch ? "development" : "production"}`,
1067
+ "process.env.NODE_ENV": `${watch ? '"development"' : '"production"'}`,
1067
1068
  },
1068
1069
  });
1069
1070
  }