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

Simplify with-noscript example #9094

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

HaNdTriX
Copy link
Contributor

Changelog

  • Removed react-lazyload
  • Removed images
  • Removed ReactDOMServer from Client bundle
  • Removed next.config.js
  • Removed public/static dir

Notes

CommonJS vs ESM: In the future we might be able to use top level await in order to import only on the server (e.g.: await import(“react-dom/server”)). Until then we need to mix CommonJS and ESM in favor of messing with the webpack config.

@HaNdTriX HaNdTriX requested review from lfades and Timer as code owners October 16, 2019 10:03
## Changelog

- Removed react-lazyload
- Removed images
- Removed ReactDOMServer from Client
- Removed next.config.js

## Notes

**CommonJS vs ESM:** In the future we might be able to use top level `await` in order to import only on the server (e.g.: `await import(“react-dom/server”)`)

Until then we need to mix CommonJS and ESM in favor of messing with the webpack config.
@HaNdTriX HaNdTriX force-pushed the examples/with-noscripts branch from 0f10bae to a08cdac Compare October 16, 2019 10:05
@ijjk
Copy link
Member

ijjk commented Oct 16, 2019

Stats from current PR

Default Server Mode
General
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
buildDuration 15.4s 15.3s -106ms
nodeModulesSize 48.5 MB 48.5 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
main-HASH.js 18.9 kB 18.9 kB
main-HASH.js gzip 6.79 kB 6.79 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..2641f57f9.js 14.9 kB 14.9 kB
16b1a7225520..57f9.js gzip 5.38 kB 5.38 kB
4952ddcd88e7..0fb1924cf.js 21.7 kB 21.7 kB
4952ddcd88e7..24cf.js gzip 7.77 kB 7.77 kB
de003c3a9d30..aab6ec1a2.js 28.6 kB 28.6 kB
de003c3a9d30..c1a2.js gzip 10.8 kB 10.8 kB
framework.5b..dbaff70d3.js 125 kB 125 kB
framework.5b..70d3.js gzip 39.4 kB 39.4 kB
Overall change 211 kB 211 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
main-HASH.module.js 17.2 kB 17.2 kB
main-HASH.module.js gzip 6.52 kB 6.52 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..3e.module.js 10.8 kB 10.8 kB
16b1a7225520..dule.js gzip 4.05 kB 4.05 kB
de003c3a9d30..e6.module.js 34.8 kB 34.8 kB
de003c3a9d30..dule.js gzip 12.9 kB 12.9 kB
framework.5b..d3.module.js 125 kB 125 kB
framework.5b..dule.js gzip 39.4 kB 39.4 kB
Overall change 190 kB 190 kB
Client Pages
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_app.js 1.63 kB 1.63 kB
_app.js gzip 786 B 786 B
_error.js 12.2 kB 12.2 kB
_error.js gzip 4.78 kB 4.78 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.79 kB 4.79 kB
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.5 kB 3.5 kB
routerDirect.js 411 B 411 B
routerDirect.js gzip 283 B 283 B
withRouter.js 421 B 421 B
withRouter.js gzip 282 B 282 B
Overall change 35.9 kB 35.9 kB
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 754 B 754 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.59 kB 8.59 kB
hooks.module.js 1.52 kB 1.52 kB
hooks.module.js gzip 794 B 794 B
index.module.js 294 B 294 B
index.module.js gzip 223 B 223 B
link.module.js 8.53 kB 8.53 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 396 B 396 B
routerDirect..dule.js gzip 283 B 283 B
withRouter.module.js 407 B 407 B
withRouter.m..dule.js gzip 281 B 281 B
Overall change 35.9 kB 35.9 kB
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 199 B 199 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 209 B 209 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
index.html 3.5 kB 3.5 kB
index.html gzip 944 B 944 B
link.html 4.03 kB 4.03 kB
link.html gzip 1.02 kB 1.02 kB
withRouter.html 4.03 kB 4.03 kB
withRouter.html gzip 1.01 kB 1.01 kB
Overall change 11.6 kB 11.6 kB

Serverless Mode
General
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
buildDuration 15.6s 15.9s ⚠️ +236ms
nodeModulesSize 48.5 MB 48.5 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
main-HASH.js 18.9 kB 18.9 kB
main-HASH.js gzip 6.79 kB 6.79 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..2641f57f9.js 14.9 kB 14.9 kB
16b1a7225520..57f9.js gzip 5.38 kB 5.38 kB
4952ddcd88e7..0fb1924cf.js 21.7 kB 21.7 kB
4952ddcd88e7..24cf.js gzip 7.77 kB 7.77 kB
de003c3a9d30..aab6ec1a2.js 28.6 kB 28.6 kB
de003c3a9d30..c1a2.js gzip 10.8 kB 10.8 kB
framework.5b..dbaff70d3.js 125 kB 125 kB
framework.5b..70d3.js gzip 39.4 kB 39.4 kB
Overall change 211 kB 211 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
main-HASH.module.js 17.2 kB 17.2 kB
main-HASH.module.js gzip 6.52 kB 6.52 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..3e.module.js 10.8 kB 10.8 kB
16b1a7225520..dule.js gzip 4.05 kB 4.05 kB
de003c3a9d30..e6.module.js 34.8 kB 34.8 kB
de003c3a9d30..dule.js gzip 12.9 kB 12.9 kB
framework.5b..d3.module.js 125 kB 125 kB
framework.5b..dule.js gzip 39.4 kB 39.4 kB
Overall change 190 kB 190 kB
Client Pages
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_app.js 1.63 kB 1.63 kB
_app.js gzip 786 B 786 B
_error.js 12.2 kB 12.2 kB
_error.js gzip 4.78 kB 4.78 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.79 kB 4.79 kB
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.5 kB 3.5 kB
routerDirect.js 411 B 411 B
routerDirect.js gzip 283 B 283 B
withRouter.js 421 B 421 B
withRouter.js gzip 282 B 282 B
Overall change 35.9 kB 35.9 kB
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 754 B 754 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.59 kB 8.59 kB
hooks.module.js 1.52 kB 1.52 kB
hooks.module.js gzip 794 B 794 B
index.module.js 294 B 294 B
index.module.js gzip 223 B 223 B
link.module.js 8.53 kB 8.53 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 396 B 396 B
routerDirect..dule.js gzip 283 B 283 B
withRouter.module.js 407 B 407 B
withRouter.m..dule.js gzip 281 B 281 B
Overall change 35.9 kB 35.9 kB
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 199 B 199 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 209 B 209 B
Overall change 495 B 495 B
Serverless bundles
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_error.js 230 kB 230 kB
_error.js gzip 61.5 kB 61.5 kB
hooks.html 3.64 kB 3.64 kB
hooks.html gzip 974 B 974 B
index.js 231 kB 231 kB
index.js gzip 61.8 kB 61.8 kB
link.js 263 kB 263 kB
link.js gzip 70.6 kB 70.6 kB
routerDirect.js 256 kB 256 kB
routerDirect.js gzip 68.6 kB 68.6 kB
withRouter.js 256 kB 256 kB
withRouter.js gzip 68.7 kB 68.7 kB
Overall change 1.24 MB 1.24 MB

Commit: 0f10bae

@ijjk
Copy link
Member

ijjk commented Oct 16, 2019

Stats from current PR

Default Server Mode
General
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
buildDuration 14.5s 14.7s ⚠️ +209ms
nodeModulesSize 48.5 MB 48.5 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
main-HASH.js 18.9 kB 18.9 kB
main-HASH.js gzip 6.79 kB 6.79 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..2641f57f9.js 14.9 kB 14.9 kB
16b1a7225520..57f9.js gzip 5.38 kB 5.38 kB
4952ddcd88e7..0fb1924cf.js 21.7 kB 21.7 kB
4952ddcd88e7..24cf.js gzip 7.77 kB 7.77 kB
de003c3a9d30..aab6ec1a2.js 28.6 kB 28.6 kB
de003c3a9d30..c1a2.js gzip 10.8 kB 10.8 kB
framework.5b..dbaff70d3.js 125 kB 125 kB
framework.5b..70d3.js gzip 39.4 kB 39.4 kB
Overall change 211 kB 211 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
main-HASH.module.js 17.2 kB 17.2 kB
main-HASH.module.js gzip 6.52 kB 6.52 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..3e.module.js 10.8 kB 10.8 kB
16b1a7225520..dule.js gzip 4.05 kB 4.05 kB
de003c3a9d30..e6.module.js 34.8 kB 34.8 kB
de003c3a9d30..dule.js gzip 12.9 kB 12.9 kB
framework.5b..d3.module.js 125 kB 125 kB
framework.5b..dule.js gzip 39.4 kB 39.4 kB
Overall change 190 kB 190 kB
Client Pages
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_app.js 1.63 kB 1.63 kB
_app.js gzip 786 B 786 B
_error.js 12.2 kB 12.2 kB
_error.js gzip 4.78 kB 4.78 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.79 kB 4.79 kB
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.5 kB 3.5 kB
routerDirect.js 411 B 411 B
routerDirect.js gzip 283 B 283 B
withRouter.js 421 B 421 B
withRouter.js gzip 282 B 282 B
Overall change 35.9 kB 35.9 kB
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 754 B 754 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.59 kB 8.59 kB
hooks.module.js 1.52 kB 1.52 kB
hooks.module.js gzip 794 B 794 B
index.module.js 294 B 294 B
index.module.js gzip 223 B 223 B
link.module.js 8.53 kB 8.53 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 396 B 396 B
routerDirect..dule.js gzip 283 B 283 B
withRouter.module.js 407 B 407 B
withRouter.m..dule.js gzip 281 B 281 B
Overall change 35.9 kB 35.9 kB
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 199 B 199 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 209 B 209 B
Overall change 495 B 495 B
Rendered Page Sizes
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
index.html 3.5 kB 3.5 kB
index.html gzip 944 B 944 B
link.html 4.03 kB 4.03 kB
link.html gzip 1.02 kB 1.02 kB
withRouter.html 4.03 kB 4.03 kB
withRouter.html gzip 1.01 kB 1.01 kB
Overall change 11.6 kB 11.6 kB

Serverless Mode
General
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
buildDuration 15.7s 15.4s -343ms
nodeModulesSize 48.5 MB 48.5 MB
Client Bundles (main, webpack, commons)
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
main-HASH.js 18.9 kB 18.9 kB
main-HASH.js gzip 6.79 kB 6.79 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b1a7225520..2641f57f9.js 14.9 kB 14.9 kB
16b1a7225520..57f9.js gzip 5.38 kB 5.38 kB
4952ddcd88e7..0fb1924cf.js 21.7 kB 21.7 kB
4952ddcd88e7..24cf.js gzip 7.77 kB 7.77 kB
de003c3a9d30..aab6ec1a2.js 28.6 kB 28.6 kB
de003c3a9d30..c1a2.js gzip 10.8 kB 10.8 kB
framework.5b..dbaff70d3.js 125 kB 125 kB
framework.5b..70d3.js gzip 39.4 kB 39.4 kB
Overall change 211 kB 211 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
main-HASH.module.js 17.2 kB 17.2 kB
main-HASH.module.js gzip 6.52 kB 6.52 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
16b1a7225520..3e.module.js 10.8 kB 10.8 kB
16b1a7225520..dule.js gzip 4.05 kB 4.05 kB
de003c3a9d30..e6.module.js 34.8 kB 34.8 kB
de003c3a9d30..dule.js gzip 12.9 kB 12.9 kB
framework.5b..d3.module.js 125 kB 125 kB
framework.5b..dule.js gzip 39.4 kB 39.4 kB
Overall change 190 kB 190 kB
Client Pages
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_app.js 1.63 kB 1.63 kB
_app.js gzip 786 B 786 B
_error.js 12.2 kB 12.2 kB
_error.js gzip 4.78 kB 4.78 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.79 kB 4.79 kB
index.js 318 B 318 B
index.js gzip 222 B 222 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.5 kB 3.5 kB
routerDirect.js 411 B 411 B
routerDirect.js gzip 283 B 283 B
withRouter.js 421 B 421 B
withRouter.js gzip 282 B 282 B
Overall change 35.9 kB 35.9 kB
Client Pages Modern
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_app.module.js 1.54 kB 1.54 kB
_app.module.js gzip 754 B 754 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.59 kB 8.59 kB
hooks.module.js 1.52 kB 1.52 kB
hooks.module.js gzip 794 B 794 B
index.module.js 294 B 294 B
index.module.js gzip 223 B 223 B
link.module.js 8.53 kB 8.53 kB
link.module.js gzip 3.68 kB 3.68 kB
routerDirect.module.js 396 B 396 B
routerDirect..dule.js gzip 283 B 283 B
withRouter.module.js 407 B 407 B
withRouter.m..dule.js gzip 281 B 281 B
Overall change 35.9 kB 35.9 kB
Client Build Manifests
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_buildManifest.js 244 B 244 B
_buildManifest.js gzip 199 B 199 B
_buildManifest.module.js 251 B 251 B
_buildManife..dule.js gzip 209 B 209 B
Overall change 495 B 495 B
Serverless bundles
zeit/next.js canary HaNdTriX/next.js examples/with-noscripts Change
_error.js 230 kB 230 kB
_error.js gzip 61.5 kB 61.5 kB
hooks.html 3.64 kB 3.64 kB
hooks.html gzip 974 B 974 B
index.js 231 kB 231 kB
index.js gzip 61.8 kB 61.8 kB
link.js 263 kB 263 kB
link.js gzip 70.6 kB 70.6 kB
routerDirect.js 256 kB 256 kB
routerDirect.js gzip 68.6 kB 68.6 kB
withRouter.js 256 kB 256 kB
withRouter.js gzip 68.7 kB 68.7 kB
Overall change 1.24 MB 1.24 MB

Commit: a08cdac

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.

3 participants