@embeddable.com/sdk-react 3.10.7-next.1 → 3.10.7-next.3
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 -3
- package/lib/index.esm.js.map +1 -1
- package/lib/utils/EntrypointModifier.d.ts +1 -1
- package/package.json +6 -5
- package/lib/index.js +0 -1215
- package/lib/index.js.map +0 -1
package/lib/index.esm.js
CHANGED
|
@@ -912,10 +912,10 @@ const styledComponentsEntrypointModifier = {
|
|
|
912
912
|
getImports() {
|
|
913
913
|
return "import {StyleSheetManager} from 'styled-components'";
|
|
914
914
|
},
|
|
915
|
-
needToModify(ctx) {
|
|
915
|
+
async needToModify(ctx) {
|
|
916
916
|
var _a;
|
|
917
917
|
const packageJsonFilePath = path.resolve(ctx.client.rootDir, "package.json");
|
|
918
|
-
const packageJson =
|
|
918
|
+
const packageJson = await import(packageJsonFilePath);
|
|
919
919
|
return !!((_a = packageJson.dependencies) === null || _a === undefined ? undefined : _a["styled-components"]);
|
|
920
920
|
},
|
|
921
921
|
};
|
|
@@ -1151,7 +1151,7 @@ async function prepareEntrypoint(ctx, filesList) {
|
|
|
1151
1151
|
let additionalContentBegin = [];
|
|
1152
1152
|
let additionalContentEnd = [];
|
|
1153
1153
|
for (const entrypointModifier of entrypointModifiers) {
|
|
1154
|
-
if (entrypointModifier.needToModify(ctx)) {
|
|
1154
|
+
if (await entrypointModifier.needToModify(ctx)) {
|
|
1155
1155
|
additionalContentImport.push(entrypointModifier.getImports(ctx));
|
|
1156
1156
|
additionalContentBegin.push(entrypointModifier.getContentBegin(ctx));
|
|
1157
1157
|
additionalContentEnd.unshift(entrypointModifier.getContentEnd(ctx));
|
|
@@ -1168,6 +1168,7 @@ async function prepareEntrypoint(ctx, filesList) {
|
|
|
1168
1168
|
}
|
|
1169
1169
|
|
|
1170
1170
|
var build = async (ctx) => {
|
|
1171
|
+
const __dirname = import.meta.dirname;
|
|
1171
1172
|
createContext(path$1.resolve(__dirname, ".."), ctx);
|
|
1172
1173
|
return generate(ctx);
|
|
1173
1174
|
};
|