Skip to content
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

Feature: Add transparent JSX optimization #8350

Merged
merged 10 commits into from
Aug 15, 2019

Conversation

developit
Copy link
Contributor

@developit developit commented Aug 13, 2019

This retains the existing React auto-import behavior (via the same plugin), but changes the JSX pragma to use hoisted __jsx() function that avoids the overhead of repeated Object(_react.default.createElement)() calls.

@developit
Copy link
Contributor Author

Update: babel-plugin-react-require duplicates the React import, not sure why given it has logic to detect this. Since the JSX plugin added here already adds React to any file with JSX if not already defined, we can consolidate.

@ijjk
Copy link
Member

ijjk commented Aug 13, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 25.5s 25.7s ⚠️ +222ms
nodeModulesSize 41.2 MB 41.5 MB ⚠️ +363 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.87 kB 4.87 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.31 kB 4.31 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 175 kB 175 kB
commons.HASH.module.js gzip 57.1 kB 57.1 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Fetched pages
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
link 2.81 kB 2.81 kB
link gzip 845 B 845 B
index 2.76 kB 2.76 kB
index gzip 838 B 839 B ⚠️ +1 B
withRouter 2.82 kB 2.82 kB
withRouter gzip 833 B 831 B -2 B
Overall change

Diffs

Diff for link.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = function () {
Diff for withRouter.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = function () {
Diff for link.module.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.module.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = () => ({});
Diff for withRouter.module.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = () => ({});

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 27.7s 27.9s ⚠️ +241ms
nodeModulesSize 41.2 MB 41.5 MB ⚠️ +363 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.87 kB 4.87 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.31 kB 4.31 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 175 kB 175 kB
commons.HASH.module.js gzip 57.1 kB 57.1 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_error.js 247 kB 247 kB
_error.js gzip 66.2 kB 66.2 kB -2 B
index.js 247 kB 247 kB
index.js gzip 66.5 kB 66.5 kB
link.js 255 kB 255 kB -29 B
link.js gzip 68.7 kB 68.7 kB ⚠️ +7 B
routerDirect.js 248 kB 248 kB ⚠️ +19 B
routerDirect.js gzip 66.4 kB 66.4 kB ⚠️ +10 B
withRouter.js 248 kB 248 kB ⚠️ +19 B
withRouter.js gzip 66.5 kB 66.5 kB ⚠️ +12 B
Overall change ⚠️ +9 B

@ijjk
Copy link
Member

ijjk commented Aug 14, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 23.4s 23.7s ⚠️ +289ms
nodeModulesSize 41.2 MB 41.2 MB ⚠️ +4.6 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.87 kB 4.87 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.31 kB 4.31 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 175 kB 175 kB
commons.HASH.module.js gzip 57.1 kB 57.1 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Fetched pages
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
link 2.81 kB 2.81 kB
link gzip 846 B 847 B ⚠️ +1 B
index 2.76 kB 2.76 kB
index gzip 839 B 837 B -2 B
withRouter 2.82 kB 2.82 kB
withRouter gzip 835 B 832 B -3 B
Overall change

Diffs

Diff for link.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = function () {
Diff for withRouter.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = function () {
Diff for link.module.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.module.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = () => ({});
Diff for withRouter.module.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = () => ({});

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 25.9s 25.5s -381ms
nodeModulesSize 41.2 MB 41.2 MB ⚠️ +4.6 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.87 kB 4.87 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.31 kB 4.31 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 175 kB 175 kB
commons.HASH.module.js gzip 57.1 kB 57.1 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 292 B ⚠️ +2 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 292 B ⚠️ +1 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 291 B ⚠️ +3 B
Overall change -18 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_error.js 247 kB 247 kB
_error.js gzip 66.2 kB 66.2 kB ⚠️ +4 B
index.js 247 kB 247 kB
index.js gzip 66.5 kB 66.5 kB ⚠️ +3 B
link.js 255 kB 255 kB -29 B
link.js gzip 68.7 kB 68.7 kB ⚠️ +11 B
routerDirect.js 248 kB 248 kB ⚠️ +19 B
routerDirect.js gzip 66.4 kB 66.4 kB ⚠️ +14 B
withRouter.js 248 kB 248 kB ⚠️ +19 B
withRouter.js gzip 66.5 kB 66.6 kB ⚠️ +16 B
Overall change ⚠️ +9 B

@developit
Copy link
Contributor Author

Actual tests are passing, failures are from canary.

@ijjk
Copy link
Member

ijjk commented Aug 15, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 24.8s 24.4s -447ms
nodeModulesSize 41.3 MB 41.3 MB ⚠️ +4.81 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.86 kB 4.86 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Fetched pages
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
link 2.81 kB 2.81 kB
link gzip 848 B 848 B
index 2.76 kB 2.76 kB
index gzip 839 B 839 B
withRouter 2.82 kB 2.82 kB
withRouter gzip 836 B 834 B -2 B
Overall change

Diffs

Diff for link.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = function () {
Diff for withRouter.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = function () {
Diff for link.module.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.module.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = () => ({});
Diff for withRouter.module.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = () => ({});

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 25.2s 25.5s ⚠️ +275ms
nodeModulesSize 41.3 MB 41.3 MB ⚠️ +4.81 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.86 kB 4.86 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_error.js 247 kB 247 kB
_error.js gzip 66.2 kB 66.2 kB
index.js 247 kB 247 kB
index.js gzip 66.6 kB 66.6 kB
link.js 255 kB 255 kB -29 B
link.js gzip 68.7 kB 68.7 kB ⚠️ +9 B
routerDirect.js 248 kB 248 kB ⚠️ +19 B
routerDirect.js gzip 66.5 kB 66.5 kB ⚠️ +12 B
withRouter.js 248 kB 248 kB ⚠️ +19 B
withRouter.js gzip 66.6 kB 66.6 kB ⚠️ +12 B
Overall change ⚠️ +9 B

@Timer Timer added this to the 9.0.4 milestone Aug 15, 2019
Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great.

@Timer Timer marked this pull request as ready for review August 15, 2019 14:54
Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop babel-plugin-react-require from package.json!

@ijjk
Copy link
Member

ijjk commented Aug 15, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 24.1s 24.2s ⚠️ +105ms
nodeModulesSize 41.3 MB 41.2 MB -3.54 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.86 kB 4.86 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Fetched pages
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
link 2.81 kB 2.81 kB
link gzip 846 B 848 B ⚠️ +2 B
index 2.76 kB 2.76 kB
index gzip 840 B 843 B ⚠️ +3 B
withRouter 2.82 kB 2.82 kB
withRouter gzip 835 B 838 B ⚠️ +3 B
Overall change

Diffs

Diff for link.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = function () {
Diff for withRouter.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = function () {
Diff for link.module.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.module.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = () => ({});
Diff for withRouter.module.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = () => ({});

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 25.9s 26s ⚠️ +192ms
nodeModulesSize 41.3 MB 41.2 MB -3.54 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.86 kB 4.86 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_error.js 247 kB 247 kB
_error.js gzip 66.2 kB 66.3 kB ⚠️ +1 B
index.js 247 kB 247 kB
index.js gzip 66.6 kB 66.6 kB
link.js 255 kB 255 kB -29 B
link.js gzip 68.7 kB 68.7 kB ⚠️ +9 B
routerDirect.js 248 kB 248 kB ⚠️ +19 B
routerDirect.js gzip 66.5 kB 66.5 kB ⚠️ +12 B
withRouter.js 248 kB 248 kB ⚠️ +19 B
withRouter.js gzip 66.6 kB 66.6 kB ⚠️ +13 B
Overall change ⚠️ +9 B

@ijjk
Copy link
Member

ijjk commented Aug 15, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 23.8s 24.4s ⚠️ +557ms
nodeModulesSize 41.3 MB 41.2 MB -3.95 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.86 kB 4.86 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 286 B 290 B ⚠️ +4 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -1 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Fetched pages
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
link 2.81 kB 2.81 kB
link gzip 846 B 848 B ⚠️ +2 B
index 2.76 kB 2.76 kB
index gzip 837 B 842 B ⚠️ +5 B
withRouter 2.82 kB 2.82 kB
withRouter gzip 834 B 837 B ⚠️ +3 B
Overall change

Diffs

Diff for link.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = function () {
Diff for withRouter.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = function () {
Diff for link.module.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.module.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = () => ({});
Diff for withRouter.module.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = () => ({});

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 28.3s 25.6s -2.7s
nodeModulesSize 41.3 MB 41.2 MB -3.95 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.86 kB 4.86 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_error.js 247 kB 247 kB
_error.js gzip 66.3 kB 66.3 kB
index.js 247 kB 247 kB
index.js gzip 66.6 kB 66.6 kB -1 B
link.js 255 kB 255 kB -29 B
link.js gzip 68.7 kB 68.7 kB ⚠️ +9 B
routerDirect.js 248 kB 248 kB ⚠️ +19 B
routerDirect.js gzip 66.5 kB 66.5 kB ⚠️ +12 B
withRouter.js 248 kB 248 kB ⚠️ +19 B
withRouter.js gzip 66.6 kB 66.6 kB ⚠️ +13 B
Overall change ⚠️ +9 B

@ijjk
Copy link
Member

ijjk commented Aug 15, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 23.8s 22.7s -1.1s
nodeModulesSize 41.3 MB 41.2 MB -3.95 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.87 kB 4.87 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Fetched pages
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
link 2.8 kB 2.8 kB
link gzip 848 B 848 B
index 2.75 kB 2.75 kB
index gzip 840 B 840 B
withRouter 2.81 kB 2.81 kB
withRouter gzip 837 B 837 B
Overall change

Diffs

Diff for link.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = function () {
Diff for withRouter.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = function () {
Diff for link.module.js
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.module.js
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = () => ({});
Diff for withRouter.module.js
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = () => ({});

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 24.2s 23.9s -262ms
nodeModulesSize 41.3 MB 41.2 MB -3.95 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.87 kB 4.87 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 286 B 290 B ⚠️ +4 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -1 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_error.js 247 kB 247 kB
_error.js gzip 66.3 kB 66.2 kB -2 B
index.js 247 kB 247 kB
index.js gzip 66.6 kB 66.6 kB -2 B
link.js 255 kB 255 kB -29 B
link.js gzip 68.7 kB 68.7 kB ⚠️ +7 B
routerDirect.js 248 kB 248 kB ⚠️ +19 B
routerDirect.js gzip 66.5 kB 66.5 kB ⚠️ +9 B
withRouter.js 248 kB 248 kB ⚠️ +19 B
withRouter.js gzip 66.6 kB 66.6 kB ⚠️ +13 B
Overall change ⚠️ +9 B

@Timer
Copy link
Member

Timer commented Aug 15, 2019

Tests are failing because of CommonJS incompatibility. We can land this once that's resolved!

@developit
Copy link
Contributor Author

@Timer apologies for the delay, should be fixed now.

@ijjk
Copy link
Member

ijjk commented Aug 15, 2019

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 23.4s 23.9s ⚠️ +497ms
nodeModulesSize 41.3 MB 41.2 MB -2.96 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.87 kB 4.87 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Fetched pages
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
link 2.8 kB 2.8 kB
link gzip 848 B 849 B ⚠️ +1 B
index 2.75 kB 2.75 kB
index gzip 842 B 841 B -1 B
withRouter 2.81 kB 2.81 kB
withRouter gzip 837 B 838 B ⚠️ +1 B
Overall change

Diffs

Diff for main-HASH.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
Diff for main-HASH.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
 
 /***/ "+oT+":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _app.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
 
 /***/ "B5Ud":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _error.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
 
 /***/ "+iuc":
 /***/ (function(module, exports, __webpack_require__) {
Diff for index.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
 
 /***/ "RNiq":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for link.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
 
 /***/ "LtRI":
 /***/ (function(module, exports, __webpack_require__) {
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = function () {
Diff for withRouter.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
 
 /***/ "0Hlz":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = function () {
Diff for _app.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
 
 /***/ "+oT+":
 /***/ (function(module, exports, __webpack_require__) {
Diff for _error.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
 
 /***/ "+iuc":
 /***/ (function(module, exports, __webpack_require__) {
Diff for index.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
 
 /***/ "RNiq":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
Diff for link.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
 
 /***/ "/h46":
 /***/ (function(module, exports, __webpack_require__) {
@@ -26,10 +26,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YFqc");
 /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function aLink(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "A Link page!"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
+  return __jsx("div", null, __jsx("h3", null, "A Link page!"), __jsx(next_link__WEBPACK_IMPORTED_MODULE_1___default.a, {
     href: "/"
   }, "Go to /"));
 }
Diff for routerDirect.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
 
 /***/ "LtRI":
 /***/ (function(module, exports, __webpack_require__) {
@@ -23,12 +23,13 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 /* eslint-disable-next-line */
 
 
 function routerDirect(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I import the router directly");
+  return __jsx("div", null, "I import the router directly");
 }
 
 routerDirect.getInitialProps = () => ({});
Diff for withRouter.module.js
@@ -1,4 +1,4 @@
-(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
+(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
 
 /***/ "0Hlz":
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -10,10 +10,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOHt");
 /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_1__);
 
+var __jsx = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement;
 
 
 function useWithRouter(props) {
-  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "I use withRouter");
+  return __jsx("div", null, "I use withRouter");
 }
 
 useWithRouter.getInitialProps = () => ({});

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
buildDuration 24.6s 24.6s ⚠️ +9ms
nodeModulesSize 41.3 MB 41.2 MB -2.96 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.js 13.8 kB 13.8 kB
main-HASH.js gzip 4.87 kB 4.87 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
commons.HASH.js 194 kB 194 kB
commons.HASH.js gzip 63.1 kB 63.1 kB
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
main-HASH.module.js 11.4 kB 11.4 kB
main-HASH.module.js gzip 4.3 kB 4.3 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
commons.HASH.module.js 176 kB 176 kB
commons.HASH.module.js gzip 57.2 kB 57.2 kB
Overall change
Client Pages Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.js 1.9 kB 1.9 kB
_app.js gzip 905 B 905 B
_error.js 8.02 kB 8.02 kB
_error.js gzip 3.12 kB 3.12 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 4.07 kB 4.04 kB -28 B
link.js gzip 1.79 kB 1.79 kB -1 B
routerDirect.js 423 B 429 B ⚠️ +6 B
routerDirect.js gzip 290 B 293 B ⚠️ +3 B
withRouter.js 435 B 439 B ⚠️ +4 B
withRouter.js gzip 287 B 290 B ⚠️ +3 B
Overall change -18 B
Client Pages Modern Overall decrease ✓
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_app.module.js 1.79 kB 1.79 kB
_app.module.js gzip 865 B 865 B
_error.module.js 5.82 kB 5.82 kB
_error.module.js gzip 2.33 kB 2.33 kB
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 3.78 kB 3.75 kB -28 B
link.module.js gzip 1.7 kB 1.7 kB -2 B
routerDirect.module.js 411 B 417 B ⚠️ +6 B
routerDirect.module.js gzip 291 B 293 B ⚠️ +2 B
withRouter.module.js 423 B 427 B ⚠️ +4 B
withRouter.module.js gzip 288 B 292 B ⚠️ +4 B
Overall change -18 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary developit/next.js jsx-namespace-optimization Change
_error.js 247 kB 247 kB
_error.js gzip 66.2 kB 66.2 kB ⚠️ +2 B
index.js 247 kB 247 kB
index.js gzip 66.6 kB 66.6 kB ⚠️ +1 B
link.js 255 kB 255 kB -29 B
link.js gzip 68.7 kB 68.7 kB ⚠️ +9 B
routerDirect.js 248 kB 248 kB ⚠️ +19 B
routerDirect.js gzip 66.5 kB 66.5 kB ⚠️ +13 B
withRouter.js 248 kB 248 kB ⚠️ +19 B
withRouter.js gzip 66.6 kB 66.6 kB ⚠️ +15 B
Overall change ⚠️ +9 B

@Timer Timer merged commit cfd6080 into vercel:canary Aug 15, 2019
@cranberyxl
Copy link

When using next.js with typescript and importing react import * as React from 'react'; I'm getting double React imports. Any advice? I'm looking into how some other plugins detect it to see if there is a workaround.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants