Skip to content

Commit b51e89d

Browse files
Merge pull request #144 from opencomponents/esm-dev-ctx
pass development context if exists to esm renderer
2 parents 0ae062a + b473576 commit b51e89d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oc-client-browser",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"description": "OC browser client",
55
"main": "index.js",
66
"types": "index.d.ts",

src/oc-client.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,10 @@ export function createOc(oc) {
457457
};
458458

459459
const { mount } = await import(data.component.src);
460-
mount(data.element, data.component.props);
460+
let context = {};
461+
if (data.component.development)
462+
context.development = data.component.development;
463+
mount(data.element, data.component.props, context);
461464
callback(null);
462465
} catch (error) {
463466
console.error("Error rendering ESM component", error);

0 commit comments

Comments
 (0)