@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 +3 -2
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var path$1 = require('path');
|
|
|
6
6
|
var vite = require('vite');
|
|
7
7
|
var viteReactPlugin = require('@vitejs/plugin-react');
|
|
8
8
|
var fs = require('node:fs/promises');
|
|
9
|
+
var url = require('node:url');
|
|
9
10
|
require('node:child_process');
|
|
10
11
|
var zod = require('zod');
|
|
11
12
|
var parser = require('@babel/parser');
|
|
@@ -34,6 +35,7 @@ var fs__namespace$2 = /*#__PURE__*/_interopNamespaceDefault(fs$2);
|
|
|
34
35
|
var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path$1);
|
|
35
36
|
var vite__namespace = /*#__PURE__*/_interopNamespaceDefault(vite);
|
|
36
37
|
var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
38
|
+
var url__namespace = /*#__PURE__*/_interopNamespaceDefault(url);
|
|
37
39
|
var fs__namespace$1 = /*#__PURE__*/_interopNamespaceDefault(fs$1);
|
|
38
40
|
|
|
39
41
|
var createContext = (pluginRoot, coreCtx) => {
|
|
@@ -49,7 +51,7 @@ var createContext = (pluginRoot, coreCtx) => {
|
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
const loadComponentMeta = async (moduleId) => {
|
|
52
|
-
const module = await import(moduleId);
|
|
54
|
+
const module = await import(url__namespace.pathToFileURL(moduleId).href);
|
|
53
55
|
return module.meta;
|
|
54
56
|
};
|
|
55
57
|
|
|
@@ -1087,7 +1089,7 @@ async function runViteBuild(ctx, watch = null) {
|
|
|
1087
1089
|
outDir: path__namespace.resolve(ctx.client.buildDir, ctx["sdk-react"].outputOptions.buildName),
|
|
1088
1090
|
},
|
|
1089
1091
|
define: {
|
|
1090
|
-
"process.env.NODE_ENV": `${watch ? "development" : "production"}`,
|
|
1092
|
+
"process.env.NODE_ENV": `${watch ? '"development"' : '"production"'}`,
|
|
1091
1093
|
},
|
|
1092
1094
|
});
|
|
1093
1095
|
}
|