@embeddable.com/sdk-react 3.7.0-next.0 → 3.7.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/lib/index.esm.js +9 -24
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +9 -24
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.esm.js
CHANGED
|
@@ -385,19 +385,13 @@ var extractComponentsConfigPlugin = ({ globalKey, outputDir, fileName, component
|
|
|
385
385
|
var _a;
|
|
386
386
|
if (componentFileRegex.test(moduleInfo.id) &&
|
|
387
387
|
((_a = moduleInfo.code) === null || _a === void 0 ? void 0 : _a.includes(searchEntry))) {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
configs.push(configJSON);
|
|
396
|
-
}
|
|
397
|
-
catch (error) {
|
|
398
|
-
console.log("Error parsing component meta: ", moduleInfo.id);
|
|
399
|
-
console.error(error);
|
|
400
|
-
}
|
|
388
|
+
const meta = await loadComponentMeta(moduleInfo.id);
|
|
389
|
+
const configJSON = JSON.stringify(meta, (_key, value) => typeof value === "object" &&
|
|
390
|
+
value !== null &&
|
|
391
|
+
"__embeddableType" in value
|
|
392
|
+
? value.toString()
|
|
393
|
+
: value);
|
|
394
|
+
configs.push(configJSON);
|
|
401
395
|
}
|
|
402
396
|
},
|
|
403
397
|
buildEnd: async () => {
|
|
@@ -1060,10 +1054,7 @@ async function runViteBuild(ctx, watch = null) {
|
|
|
1060
1054
|
var _a;
|
|
1061
1055
|
return await vite.build({
|
|
1062
1056
|
logLevel: !!watch ? "info" : "error",
|
|
1063
|
-
resolve:
|
|
1064
|
-
extensions: [".ts", ".tsx", ".js", ".jsx", ".json"],
|
|
1065
|
-
...(_a = ctx.client.viteConfig) === null || _a === void 0 ? void 0 : _a.resolve,
|
|
1066
|
-
},
|
|
1057
|
+
resolve: (_a = ctx.client.viteConfig) === null || _a === void 0 ? void 0 : _a.resolve,
|
|
1067
1058
|
plugins: [
|
|
1068
1059
|
viteReactPlugin(),
|
|
1069
1060
|
extractComponentsConfigPlugin({
|
|
@@ -1086,16 +1077,10 @@ async function runViteBuild(ctx, watch = null) {
|
|
|
1086
1077
|
],
|
|
1087
1078
|
build: {
|
|
1088
1079
|
sourcemap: true,
|
|
1089
|
-
watch
|
|
1090
|
-
? {
|
|
1091
|
-
include: [ctx.client.srcDir + "/**"],
|
|
1092
|
-
exclude: ["**/node_modules/**"],
|
|
1093
|
-
}
|
|
1094
|
-
: undefined,
|
|
1080
|
+
watch,
|
|
1095
1081
|
minify: !watch,
|
|
1096
1082
|
rollupOptions: watch
|
|
1097
1083
|
? {
|
|
1098
|
-
cache: true,
|
|
1099
1084
|
...ctx.client.rollupOptions,
|
|
1100
1085
|
output: {
|
|
1101
1086
|
sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => {
|