@shopify/react-async
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -10,2 +10,8 @@ # Changelog | ||
## 1.2.1 - 2019-02-26 | ||
### Fixed | ||
- Fixed an issue where Webpack would complain about a dynamic `require` statement ([#533](https://github.com/Shopify/quilt/pull/533)) | ||
## 1.2.0 - 2019-02-25 | ||
@@ -12,0 +18,0 @@ |
@@ -88,2 +88,8 @@ "use strict"; | ||
} | ||
// Webpack does not like seeing an explicit require(someVariable) in code | ||
// because that is a dynamic require that it can’t resolve. This code | ||
// obfuscates `require()` for the purpose of fooling Webpack, which is fine | ||
// because we only want to use the `require()` in cases where Webpack | ||
// is not the module bundler. | ||
var nodeRequire = typeof require === 'function' ? require : undefined; | ||
// If we have an ID, we try to first use Webpack’s internal stuff | ||
@@ -108,5 +114,5 @@ // to resolve the module. If those don’t exist, we know we aren’t | ||
} | ||
else if (typeof require === 'function') { | ||
else if (typeof nodeRequire === 'function') { | ||
try { | ||
return normalize(require(id)); | ||
return normalize(nodeRequire(id)); | ||
} | ||
@@ -113,0 +119,0 @@ catch (_b) { |
{ | ||
"name": "@shopify/react-async", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Tools for creating powerful, asynchronously-loaded React components.", |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
40133
614