gatsby-link
Advanced tools
Comparing version 1.0.0-alpha11-alpha.3b0066c5 to 1.0.0-alpha11-alpha.3e341373
10
index.js
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _react = require('react'); | ||
@@ -13,2 +15,7 @@ | ||
var linkPrefix = ''; | ||
if (__PREFIX_LINKS__) { | ||
linkPrefix = __LINK_PREFIX__; | ||
} | ||
// Use createClass instead of ES6 class as Babel spews out a ton of code | ||
@@ -52,3 +59,4 @@ // for polyfilling classes which there's no reason to pay for this. | ||
render: function render() { | ||
return _react2.default.createElement(_Link2.default, this.props); | ||
var to = linkPrefix + this.props.to; | ||
return _react2.default.createElement(_Link2.default, _extends({}, this.props, { to: to })); | ||
} | ||
@@ -55,0 +63,0 @@ }); |
{ | ||
"name": "gatsby-link", | ||
"version": "1.0.0-alpha11-alpha.3b0066c5", | ||
"version": "1.0.0-alpha11-alpha.3e341373", | ||
"description": "An enhanced Link component for Gatsby sites with support for resource prefetching", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
4529
5
46
0
37