@embeddable.com/sdk-core 3.13.6-next.0 → 3.13.6-next.1
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 +2 -1
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/generate.ts +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -460,9 +460,10 @@ async function injectCSS(ctx, pluginName) {
|
|
|
460
460
|
await fs.writeFile(path.resolve(ctx.client.componentDir, "style.css"), content.replace(STYLE_IMPORTS_TOKEN, cssFilesImportsStr));
|
|
461
461
|
}
|
|
462
462
|
async function injectBundleRender(ctx, pluginName) {
|
|
463
|
+
var _a;
|
|
463
464
|
const importStr = `import render from '../${ctx[pluginName].outputOptions.buildName}/${ctx[pluginName].outputOptions.fileName}';`;
|
|
464
465
|
let content = await fs.readFile(path.resolve(ctx.core.templatesDir, "component.tsx.template"), "utf8");
|
|
465
|
-
if (!!ctx.dev) {
|
|
466
|
+
if (!!((_a = ctx.dev) === null || _a === undefined ? undefined : _a.watch)) {
|
|
466
467
|
content = content.replace(COMPONENT_TAG_TOKEN, "embeddable-component");
|
|
467
468
|
}
|
|
468
469
|
await fs.writeFile(path.resolve(ctx.client.componentDir, "component.tsx"), content.replace(RENDER_IMPORT_TOKEN, importStr));
|