@builder.io/react 2.0.10-0 → 2.0.10-2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/react",
3
- "version": "2.0.9",
3
+ "version": "2.0.10-1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/builder-react.cjs.js",
@@ -25,7 +25,7 @@ var noop = function () { return null; };
25
25
  * 2. Client -> typeof require === 'function' does not work because of overoptimization by the compiler
26
26
  * 3. Cloudflare edge -> only globalThis.require works
27
27
  */
28
- if (typeof globalThis.require === 'function' || sdk_1.Builder.isServer) {
28
+ if (typeof globalThis.require === 'function' || sdk_1.Builder.isServer && (typeof require === 'function')) {
29
29
  exports.safeDynamicRequire = eval('require');
30
30
  }
31
31
  exports.safeDynamicRequire !== null && exports.safeDynamicRequire !== void 0 ? exports.safeDynamicRequire : (exports.safeDynamicRequire = noop);
@@ -1 +1 @@
1
- {"version":3,"file":"safe-dynamic-require.js","sourceRoot":"","sources":["../../../../src/functions/safe-dynamic-require.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,uCAA0C;AAE1C,IAAM,IAAI,GAAG,cAAM,OAAA,IAAI,EAAJ,CAAI,CAAC;AAKxB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,UAAU,IAAI,aAAO,CAAC,QAAQ,EAAE;IAChE,0BAAkB,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;CACtC;AAED,0BAAkB,aAAlB,0BAAkB,cAAlB,0BAAkB,IAAlB,0BAAkB,GAAK,IAAW,EAAC"}
1
+ {"version":3,"file":"safe-dynamic-require.js","sourceRoot":"","sources":["../../../../src/functions/safe-dynamic-require.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,uCAA0C;AAE1C,IAAM,IAAI,GAAG,cAAM,OAAA,IAAI,EAAJ,CAAI,CAAC;AAKxB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,UAAU,IAAI,aAAO,CAAC,QAAQ,IAAI,CAAC,OAAO,OAAO,KAAK,UAAU,CAAC,EAAE;IACnG,0BAAkB,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;CACtC;AAED,0BAAkB,aAAlB,0BAAkB,cAAlB,0BAAkB,IAAlB,0BAAkB,GAAK,IAAW,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/react",
3
- "version": "2.0.10-0",
3
+ "version": "2.0.10-2",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/builder-react.cjs.js",
@@ -29,7 +29,7 @@ export let safeDynamicRequire: typeof require;
29
29
  * 2. Client -> typeof require === 'function' does not work because of overoptimization by the compiler
30
30
  * 3. Cloudflare edge -> only globalThis.require works
31
31
  */
32
- if (typeof globalThis.require === 'function' || Builder.isServer) {
32
+ if (typeof globalThis.require === 'function' || Builder.isServer && (typeof require === 'function')) {
33
33
  safeDynamicRequire = eval('require');
34
34
  }
35
35