@builder.io/sdk-react-nextjs 0.5.2 → 0.5.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.
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.2";
1
+ export declare const SDK_VERSION = "0.5.3-0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.5.2";
1
+ export const SDK_VERSION = "0.5.3-0";
@@ -2,7 +2,13 @@ import { logger } from '../../helpers/logger.js';
2
2
  import { isBrowser } from '../is-browser.js';
3
3
  import { isEditing } from '../is-editing.js';
4
4
  import { isNonNodeServer } from '../is-non-node-server.js';
5
- import { runInNonNode } from './non-node-runtime.js';
5
+ /**
6
+ * We need to lazy-load this module so it doesn't leak into the browser, as it is massive and not needed there.
7
+ */
8
+ let runInNonNode;
9
+ if (isNonNodeServer()) {
10
+ import('./non-node-runtime.js').then(theModule => runInNonNode = theModule.runInNonNode);
11
+ }
6
12
  export function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression = true }) {
7
13
  if (code === '') {
8
14
  logger.warn('Skipping evaluation of empty code block.');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react-nextjs",
3
3
  "description": "Builder.io SDK for React",
4
- "version": "0.5.2",
4
+ "version": "0.5.3-0",
5
5
  "files": [
6
6
  "dist"
7
7
  ],