babel-preset-expo
Advanced tools
Comparing version 12.0.0-preview.3 to 12.0.0-preview.4
@@ -10,4 +10,4 @@ "use strict"; | ||
const { types: t } = api; | ||
const isAnyServerEnvironment = api.caller(common_1.getIsReactServer) || api.caller(common_1.getIsServer); | ||
const forbiddenPackages = isAnyServerEnvironment | ||
const isReactServer = api.caller(common_1.getIsReactServer); | ||
const forbiddenPackages = isReactServer | ||
? FORBIDDEN_REACT_SERVER_IMPORTS | ||
@@ -18,3 +18,3 @@ : FORBIDDEN_CLIENT_IMPORTS; | ||
if (source === forbiddenImport) { | ||
if (isAnyServerEnvironment) { | ||
if (isReactServer) { | ||
throw path.buildCodeFrameError(`Importing '${forbiddenImport}' module is not allowed in a React server bundle. Add the "use client" directive to this file or one of the parent modules to allow importing this module.`); | ||
@@ -21,0 +21,0 @@ } |
{ | ||
"name": "babel-preset-expo", | ||
"version": "12.0.0-preview.3", | ||
"version": "12.0.0-preview.4", | ||
"description": "The Babel preset for Expo projects", | ||
@@ -73,3 +73,3 @@ "main": "build/index.js", | ||
}, | ||
"gitHead": "d5b7ec4949eb461634b2f02a1a0ff1df2a0e2a21" | ||
"gitHead": "1f7a56b5a5bcef23ac6e55b16db53077f6a4065c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124498