-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Add [with-storybook-typescript] example #14398
Conversation
Stats from current PRDefault Server Mode (Decrease detected ✓)General
Page Load Tests Overall decrease
|
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.306 | 2.229 | -0.08 |
/ avg req/sec | 1084.36 | 1121.55 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.423 | 1.472 | |
/error-in-render avg req/sec | 1756.73 | 1698.15 | -58.58 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.js gzip | 6.51 kB | 6.51 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..75a9.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 | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.6 kB | 5.6 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..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 | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Build Manifests
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_buildManifest.js gzip | 267 B | 267 B | ✓ |
_buildManife..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 539 B | 539 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
index.html gzip | 955 B | 955 B | ✓ |
link.html gzip | 961 B | 961 B | ✓ |
withRouter.html gzip | 948 B | 948 B | ✓ |
Overall change | 2.86 kB | 2.86 kB | ✓ |
Serverless Mode
General
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
buildDuration | 13.9s | 13.9s | |
nodeModulesSize | 67 MB | 67 MB | ✓ |
Client Bundles (main, webpack, commons)
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.js gzip | 6.51 kB | 6.51 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..75a9.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 | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.6 kB | 5.6 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..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 | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Build Manifests
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_buildManifest.js gzip | 267 B | 267 B | ✓ |
_buildManife..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 539 B | 539 B | ✓ |
Serverless bundles
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_error.js | 875 kB | 875 kB | ✓ |
404.html | 4.17 kB | 4.17 kB | ✓ |
hooks.html | 3.79 kB | 3.79 kB | ✓ |
index.js | 875 kB | 875 kB | ✓ |
link.js | 914 kB | 914 kB | ✓ |
routerDirect.js | 906 kB | 906 kB | ✓ |
withRouter.js | 906 kB | 906 kB | ✓ |
Overall change | 4.48 MB | 4.48 MB | ✓ |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
buildDuration | 10.9s | 11s | |
nodeModulesSize | 67 MB | 67 MB | ✓ |
Page Load Tests Overall increase ✓
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.867 | 1.791 | -0.08 |
/ avg req/sec | 1338.83 | 1395.67 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.17 | 1.132 | -0.04 |
/error-in-render avg req/sec | 2136.37 | 2209.19 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.js gzip | 6.51 kB | 6.51 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..75a9.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 | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.6 kB | 5.6 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..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 | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Build Manifests
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_buildManifest.js gzip | 267 B | 267 B | ✓ |
_buildManife..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 539 B | 539 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
index.html gzip | 955 B | 955 B | ✓ |
link.html gzip | 961 B | 961 B | ✓ |
withRouter.html gzip | 948 B | 948 B | ✓ |
Overall change | 2.86 kB | 2.86 kB | ✓ |
Serverless Mode
General
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
buildDuration | 11.6s | 11.6s | |
nodeModulesSize | 67 MB | 67 MB | ✓ |
Client Bundles (main, webpack, commons)
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.js gzip | 6.51 kB | 6.51 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..75a9.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 | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.6 kB | 5.6 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..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 | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Build Manifests
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_buildManifest.js gzip | 267 B | 267 B | ✓ |
_buildManife..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 539 B | 539 B | ✓ |
Serverless bundles
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_error.js | 875 kB | 875 kB | ✓ |
404.html | 4.17 kB | 4.17 kB | ✓ |
hooks.html | 3.79 kB | 3.79 kB | ✓ |
index.js | 875 kB | 875 kB | ✓ |
link.js | 914 kB | 914 kB | ✓ |
routerDirect.js | 906 kB | 906 kB | ✓ |
withRouter.js | 906 kB | 906 kB | ✓ |
Overall change | 4.48 MB | 4.48 MB | ✓ |
"fork-ts-checker-webpack-plugin": "5.0.4", | ||
"ts-loader": "7.0.5", |
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.
Why are these 2 packages added?
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.
It was required by @storybook/preset-typescript (https://github.com/storybookjs/presets/tree/master/packages/preset-typescript#installation)
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.
Everything looks good, thank you!
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
buildDuration | 12.3s | 12.5s | |
nodeModulesSize | 67.2 MB | 67.2 MB | ✓ |
Page Load Tests Overall increase ✓
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.035 | 2.069 | |
/ avg req/sec | 1228.77 | 1208.41 | -20.36 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.386 | 1.225 | -0.16 |
/error-in-render avg req/sec | 1803.82 | 2041.2 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.js gzip | 6.5 kB | 6.5 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..834a.js gzip | 10.7 kB | 10.7 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57.1 kB | 57.1 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.59 kB | 5.59 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..dule.js gzip | 7.07 kB | 7.07 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.5 kB | 52.5 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Build Manifests
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_buildManifest.js gzip | 267 B | 267 B | ✓ |
_buildManife..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 539 B | 539 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
index.html gzip | 956 B | 956 B | ✓ |
link.html gzip | 960 B | 960 B | ✓ |
withRouter.html gzip | 947 B | 947 B | ✓ |
Overall change | 2.86 kB | 2.86 kB | ✓ |
Serverless Mode
General
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
buildDuration | 13.4s | 14.2s | |
nodeModulesSize | 67.2 MB | 67.2 MB | ✓ |
Client Bundles (main, webpack, commons)
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.js gzip | 6.5 kB | 6.5 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..834a.js gzip | 10.7 kB | 10.7 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 57.1 kB | 57.1 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
main-HASH.module.js gzip | 5.59 kB | 5.59 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
19b7e98f51cc..dule.js gzip | 7.07 kB | 7.07 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 52.5 kB | 52.5 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Build Manifests
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_buildManifest.js gzip | 267 B | 267 B | ✓ |
_buildManife..dule.js gzip | 272 B | 272 B | ✓ |
Overall change | 539 B | 539 B | ✓ |
Serverless bundles
vercel/next.js canary | zxzl/next.js with-storybook-typescript | Change | |
---|---|---|---|
_error.js | 875 kB | 875 kB | ✓ |
404.html | 4.17 kB | 4.17 kB | ✓ |
hooks.html | 3.79 kB | 3.79 kB | ✓ |
index.js | 876 kB | 876 kB | ✓ |
link.js | 916 kB | 916 kB | ✓ |
routerDirect.js | 908 kB | 908 kB | ✓ |
withRouter.js | 908 kB | 908 kB | ✓ |
Overall change | 4.49 MB | 4.49 MB | ✓ |
Basically this PR adds Next.js 's default TypeScript setting and integrates [@storybook/preset-typescript](https://github.com/storybookjs/presets/tree/master/packages/preset-typescript) into original [with-storybook](https://github.com/vercel/next.js/tree/canary/examples/with-storybook) example. However, I thought it may save time for someone who are planning to use storybook with next.js and TypeScript :)
Basically this PR adds Next.js 's default TypeScript setting and integrates @storybook/preset-typescript into original with-storybook example.
However, I thought it may save time for someone who are planning to use storybook with next.js and TypeScript :)