@embeddable.com/sdk-react 3.2.3 → 3.3.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 +4 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1138,7 +1138,7 @@ async function runViteBuild(ctx, watch = null) {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
: undefined,
|
|
1140
1140
|
lib: {
|
|
1141
|
-
entry: path__namespace.resolve(ctx.client.
|
|
1141
|
+
entry: path__namespace.resolve(ctx.client.buildDir, ctx["sdk-react"].outputOptions.componentsEntryPointFilename),
|
|
1142
1142
|
formats: ["es"],
|
|
1143
1143
|
fileName: ctx["sdk-react"].outputOptions.fileName,
|
|
1144
1144
|
},
|
|
@@ -1165,7 +1165,7 @@ const ADDITIONAL_CONTENT_IMPORT_TOKEN = "{{ADDITIONAL_CONTENT_IMPORT}}";
|
|
|
1165
1165
|
const ADDITIONAL_CONTENT_BEGIN_TOKEN = "{{ADDITIONAL_CONTENT_BEGIN}}";
|
|
1166
1166
|
const ADDITIONAL_CONTENT_END_TOKEN = "{{ADDITIONAL_CONTENT_END}}";
|
|
1167
1167
|
function getRelativeFileNameForImport(ctx, fileName) {
|
|
1168
|
-
return
|
|
1168
|
+
return `../${path__namespace
|
|
1169
1169
|
.relative(ctx.client.rootDir, fileName)
|
|
1170
1170
|
// it is a bit of a hack. On windows the path will look like '.src\something\something'
|
|
1171
1171
|
// but for imports it must be '.src/something/something'
|
|
@@ -1192,7 +1192,7 @@ async function prepareEntrypoint(ctx, filesList) {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
1194
|
const content = await fs__namespace$2.readFile(path__namespace.resolve(ctx["sdk-react"].templatesDir, `${ctx["sdk-react"].outputOptions.componentsEntryPointFilename}.template`), "utf8");
|
|
1195
|
-
await fs__namespace$2.writeFile(path__namespace.resolve(ctx.client.
|
|
1195
|
+
await fs__namespace$2.writeFile(path__namespace.resolve(ctx.client.buildDir, ctx["sdk-react"].outputOptions.componentsEntryPointFilename), content
|
|
1196
1196
|
.replace(IMPORT_REPLACE_TOKEN, imports)
|
|
1197
1197
|
.replace(ERROR_FALLBACK_COMPONENT_IMPORT_TOKEN, errorBoundaryImport)
|
|
1198
1198
|
.replace(ERROR_FALLBACK_COMPONENT_TOKEN, errorFallbackComponent)
|
|
@@ -1207,7 +1207,7 @@ var build = async (ctx) => {
|
|
|
1207
1207
|
};
|
|
1208
1208
|
|
|
1209
1209
|
var cleanup = async (ctx) => {
|
|
1210
|
-
await fs.rm(path.resolve(ctx.client.
|
|
1210
|
+
await fs.rm(path.resolve(ctx.client.buildDir, ctx["sdk-react"].outputOptions.componentsEntryPointFilename));
|
|
1211
1211
|
};
|
|
1212
1212
|
|
|
1213
1213
|
var index = () => {
|