-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper error message for missing href @ <Link> component #13962
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
buildDuration | 12.9s | 12.8s | -119ms |
nodeModulesSize | 64.9 MB | 64.9 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.247 | 2.208 | -0.04 |
/ avg req/sec | 1112.49 | 1132.15 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.403 | 1.451 | |
/error-in-render avg req/sec | 1782.12 | 1722.51 | -59.61 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..ec24.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.05 kB | 2.13 kB | |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.29 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.6 kB | |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.41 kB |
Client Build Manifests
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_buildManifest.js gzip | 171 B | 171 B | ✓ |
_buildManife..dule.js gzip | 180 B | 180 B | ✓ |
Overall change | 351 B | 351 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
index.html gzip | 901 B | 901 B | ✓ |
link.html gzip | 906 B | 906 B | ✓ |
withRouter.html gzip | 894 B | 894 B | ✓ |
Overall change | 2.7 kB | 2.7 kB | ✓ |
Diffs
Diff for link.js
@@ -395,6 +395,12 @@
parsedHref = _this$formatUrls2.href,
parsedAs = _this$formatUrls2.as;
+ if (parsedHref == null) {
+ throw new Error(
+ "When using <Link> you should provide href attribute. https://err.sh/next.js/link-missing-href"
+ );
+ }
+
var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
return [
resolvedHref,
Diff for link.module.js
@@ -250,6 +250,13 @@
this.props.href,
this.props.as
);
+
+ if (parsedHref == null) {
+ throw new Error(
+ "When using <Link> you should provide href attribute. https://err.sh/next.js/link-missing-href"
+ );
+ }
+
var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
return [
resolvedHref,
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
buildDuration | 14.1s | 13.7s | -395ms |
nodeModulesSize | 64.9 MB | 64.9 MB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..ec24.js gzip | 10.5 kB | 10.5 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.9 kB | 56.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.92 kB | 6.92 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.4 kB | 52.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.05 kB | 2.13 kB | |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.29 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.6 kB | |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.41 kB |
Client Build Manifests
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_buildManifest.js gzip | 171 B | 171 B | ✓ |
_buildManife..dule.js gzip | 180 B | 180 B | ✓ |
Overall change | 351 B | 351 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_error.js | 874 kB | 874 kB | ✓ |
404.html | 4.13 kB | 4.13 kB | ✓ |
hooks.html | 3.71 kB | 3.71 kB | ✓ |
index.js | 875 kB | 875 kB | ✓ |
link.js | 913 kB | 913 kB | |
routerDirect.js | 905 kB | 905 kB | ✓ |
withRouter.js | 905 kB | 905 kB | ✓ |
Overall change | 4.48 MB | 4.48 MB |
@Timer tests have been added, this is ready for review. |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
buildDuration | 11.7s | 11.9s | |
nodeModulesSize | 64.9 MB | 64.9 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.045 | 2.138 | |
/ avg req/sec | 1222.69 | 1169.16 | -53.53 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.329 | 1.328 | 0 |
/error-in-render avg req/sec | 1881.16 | 1882.41 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..f367.js gzip | 10.9 kB | 10.9 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57.2 kB | 57.2 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 7.27 kB | 7.27 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.7 kB | 52.7 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.05 kB | 2.13 kB | |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.29 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.6 kB | |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.41 kB |
Client Build Manifests
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_buildManifest.js gzip | 171 B | 171 B | ✓ |
_buildManife..dule.js gzip | 180 B | 180 B | ✓ |
Overall change | 351 B | 351 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
index.html gzip | 896 B | 896 B | ✓ |
link.html gzip | 902 B | 902 B | ✓ |
withRouter.html gzip | 889 B | 889 B | ✓ |
Overall change | 2.69 kB | 2.69 kB | ✓ |
Diffs
Diff for link.js
@@ -395,6 +395,12 @@
parsedHref = _this$formatUrls2.href,
parsedAs = _this$formatUrls2.as;
+ if (parsedHref == null) {
+ throw new Error(
+ "When using <Link> you should provide href attribute. https://err.sh/next.js/link-missing-href"
+ );
+ }
+
var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
return [
resolvedHref,
Diff for link.module.js
@@ -250,6 +250,13 @@
this.props.href,
this.props.as
);
+
+ if (parsedHref == null) {
+ throw new Error(
+ "When using <Link> you should provide href attribute. https://err.sh/next.js/link-missing-href"
+ );
+ }
+
var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
return [
resolvedHref,
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
buildDuration | 12.9s | 12.7s | -204ms |
nodeModulesSize | 64.9 MB | 64.9 MB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..f367.js gzip | 10.9 kB | 10.9 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57.2 kB | 57.2 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 7.27 kB | 7.27 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.7 kB | 52.7 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.05 kB | 2.13 kB | |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.29 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.6 kB | |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.41 kB |
Client Build Manifests
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_buildManifest.js gzip | 171 B | 171 B | ✓ |
_buildManife..dule.js gzip | 180 B | 180 B | ✓ |
Overall change | 351 B | 351 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_error.js | 875 kB | 875 kB | ✓ |
404.html | 4.13 kB | 4.13 kB | ✓ |
hooks.html | 3.71 kB | 3.71 kB | ✓ |
index.js | 875 kB | 875 kB | ✓ |
link.js | 915 kB | 915 kB | |
routerDirect.js | 907 kB | 907 kB | ✓ |
withRouter.js | 907 kB | 907 kB | ✓ |
Overall change | 4.49 MB | 4.49 MB |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
buildDuration | 17s | 17.2s | |
nodeModulesSize | 64.9 MB | 64.9 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.828 | 2.732 | -0.1 |
/ avg req/sec | 884.04 | 915.02 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.983 | 1.955 | -0.03 |
/error-in-render avg req/sec | 1260.98 | 1278.95 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..f367.js gzip | 10.9 kB | 10.9 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57.2 kB | 57.2 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 7.27 kB | 7.27 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.7 kB | 52.7 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.05 kB | 2.13 kB | |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.29 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.6 kB | |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.41 kB |
Client Build Manifests
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_buildManifest.js gzip | 171 B | 171 B | ✓ |
_buildManife..dule.js gzip | 180 B | 180 B | ✓ |
Overall change | 351 B | 351 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
index.html gzip | 896 B | 896 B | ✓ |
link.html gzip | 902 B | 902 B | ✓ |
withRouter.html gzip | 889 B | 889 B | ✓ |
Overall change | 2.69 kB | 2.69 kB | ✓ |
Diffs
Diff for link.js
@@ -395,6 +395,12 @@
parsedHref = _this$formatUrls2.href,
parsedAs = _this$formatUrls2.as;
+ if (parsedHref == null) {
+ throw new Error(
+ "When using <Link> you should provide href attribute. https://err.sh/next.js/link-missing-href"
+ );
+ }
+
var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
return [
resolvedHref,
Diff for link.module.js
@@ -250,6 +250,13 @@
this.props.href,
this.props.as
);
+
+ if (parsedHref == null) {
+ throw new Error(
+ "When using <Link> you should provide href attribute. https://err.sh/next.js/link-missing-href"
+ );
+ }
+
var resolvedHref = (0, _url.resolve)(pathname, parsedHref);
return [
resolvedHref,
Serverless Mode (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
buildDuration | 14.3s | 14.4s | |
nodeModulesSize | 64.9 MB | 64.9 MB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.js gzip | 6.49 kB | 6.49 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..f367.js gzip | 10.9 kB | 10.9 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57.2 kB | 57.2 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 7.27 kB | 7.27 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.7 kB | 52.7 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error.js gzip | 3.25 kB | 3.25 kB | ✓ |
hooks.js gzip | 881 B | 881 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.05 kB | 2.13 kB | |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 8.22 kB | 8.29 kB |
Client Pages Modern Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_app.module.js gzip | 604 B | 604 B | ✓ |
_error.module.js gzip | 2.04 kB | 2.04 kB | ✓ |
hooks.module.js gzip | 383 B | 383 B | ✓ |
index.module.js gzip | 223 B | 223 B | ✓ |
link.module.js gzip | 1.52 kB | 1.6 kB | |
routerDirect..dule.js gzip | 281 B | 281 B | ✓ |
withRouter.m..dule.js gzip | 278 B | 278 B | ✓ |
Overall change | 5.33 kB | 5.41 kB |
Client Build Manifests
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_buildManifest.js gzip | 171 B | 171 B | ✓ |
_buildManife..dule.js gzip | 180 B | 180 B | ✓ |
Overall change | 351 B | 351 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | TodorTotev/next.js proper-link-error-message | Change | |
---|---|---|---|
_error.js | 875 kB | 875 kB | ✓ |
404.html | 4.13 kB | 4.13 kB | ✓ |
hooks.html | 3.71 kB | 3.71 kB | ✓ |
index.js | 875 kB | 875 kB | ✓ |
link.js | 915 kB | 915 kB | |
routerDirect.js | 907 kB | 907 kB | ✓ |
withRouter.js | 907 kB | 907 kB | ✓ |
Overall change | 4.49 MB | 4.49 MB |
timneutkens
reviewed
Jul 28, 2020
@@ -135,6 +135,11 @@ class Link extends Component<LinkProps> { | |||
this.props.href, | |||
this.props.as | |||
) | |||
if (parsedHref == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be wrapped in if(typeof process.env.NODE_ENV !== 'production')
👍
kodiakhq bot
pushed a commit
that referenced
this pull request
Aug 18, 2020
This PR replaces `prop-types-exact` (only used in this location) with manual property checking. Right now, malformed properties sent to `<Link>` are silently handled and only emit a warning in the console. This leads to confusing/unexpected errors because we try to read a value that is undefined. To fix this, we'll now throw a proper error when `<Link>` is misused. **This still isn't optimal, however, because we don't have a component stack trace we can give the user**. We're not going to be able to give the user actionable instructions until React 16.14 at a minimum. --- Fixes #13951 Fixes #16107 Closes #13962
m-lautenbach
pushed a commit
to m-lautenbach/next.js
that referenced
this pull request
Aug 20, 2020
This PR replaces `prop-types-exact` (only used in this location) with manual property checking. Right now, malformed properties sent to `<Link>` are silently handled and only emit a warning in the console. This leads to confusing/unexpected errors because we try to read a value that is undefined. To fix this, we'll now throw a proper error when `<Link>` is misused. **This still isn't optimal, however, because we don't have a component stack trace we can give the user**. We're not going to be able to give the user actionable instructions until React 16.14 at a minimum. --- Fixes vercel#13951 Fixes vercel#16107 Closes vercel#13962
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes 13951
@Timer , @timneutkens I will add the tests tomorrow.