@umijs/runtime
Advanced tools
Comparing version 3.0.0-beta.27 to 3.0.0-beta.28
@@ -732,12 +732,11 @@ export { Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, Switch, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter } from 'react-router-dom'; | ||
}; // Support for direct import(), | ||
// eg: dynamic(import('../hello-world')) | ||
// eg: dynamic(() => import('../hello-world')) | ||
if (typeof opts.then === 'function') { | ||
loadableOptions.loader = function () { | ||
return opts; | ||
}; // Support for having first argument being options, | ||
if (typeof opts === 'function') { | ||
loadableOptions.loader = opts; // Support for having first argument being options, | ||
// eg: dynamic({loader: import('../hello-world')}) | ||
} else if (_typeof(opts) === 'object') { | ||
loadableOptions = _objectSpread2({}, loadableOptions, {}, opts); | ||
} else { | ||
throw new Error("Unexpect arguments ".concat(opts)); | ||
} // Support for passing options, | ||
@@ -744,0 +743,0 @@ // eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>}) |
@@ -737,12 +737,11 @@ 'use strict'; | ||
}; // Support for direct import(), | ||
// eg: dynamic(import('../hello-world')) | ||
// eg: dynamic(() => import('../hello-world')) | ||
if (typeof opts.then === 'function') { | ||
loadableOptions.loader = function () { | ||
return opts; | ||
}; // Support for having first argument being options, | ||
if (typeof opts === 'function') { | ||
loadableOptions.loader = opts; // Support for having first argument being options, | ||
// eg: dynamic({loader: import('../hello-world')}) | ||
} else if (_typeof(opts) === 'object') { | ||
loadableOptions = _objectSpread2({}, loadableOptions, {}, opts); | ||
} else { | ||
throw new Error("Unexpect arguments ".concat(opts)); | ||
} // Support for passing options, | ||
@@ -749,0 +748,0 @@ // eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>}) |
{ | ||
"name": "@umijs/runtime", | ||
"version": "3.0.0-beta.27", | ||
"version": "3.0.0-beta.28", | ||
"description": "@umijs/runtime", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
67131
23
2252
0