Skip to content

Commit

Permalink
ncc inlining optimizations (vercel#18752)
Browse files Browse the repository at this point in the history
This adds ncc inlining optimizations for the following dependencies:

* cacache
* schema-utils
* find-cache-dir
* mkdirp
* neo-async
* web-vitals

The slight increase in output in the reports here is due to the variation of the bundled version of web-vitals.

In addition, this moves ast-types to be a devDependencies entry instead of in dependencies as it was before vercel#14746 as I could not see any production usage (ping @prateekbh). Happy to separate that out into a separate PR if preferred too.
  • Loading branch information
guybedford authored and jamesgeorge007 committed Nov 5, 2020
1 parent 5721c31 commit 27dc2f1
Show file tree
Hide file tree
Showing 26 changed files with 360 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/next/client/performance-relayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getTTFB,
Metric,
ReportHandler,
} from 'web-vitals'
} from 'next/dist/compiled/web-vitals'

const initialHref = location.href
let isRegistered = false
Expand Down
2 changes: 1 addition & 1 deletion packages/next/compiled/babel-loader/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/compiled/cacache/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/compiled/cacache/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"cacache","main":"index.js","author":{"name":"Kat Marchán","email":"kzm@sykosomatic.org","twitter":"maybekatz"},"license":"ISC"}
2 changes: 1 addition & 1 deletion packages/next/compiled/cache-loader/cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/next/compiled/file-loader/cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions packages/next/compiled/find-cache-dir/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions packages/next/compiled/find-cache-dir/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/next/compiled/find-cache-dir/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"find-cache-dir","main":"index.js","license":"MIT"}
21 changes: 21 additions & 0 deletions packages/next/compiled/mkdirp/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright 2010 James Halliday (mail@substack.net)

This project is free software released under the MIT/X11 license:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
1 change: 1 addition & 0 deletions packages/next/compiled/mkdirp/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/next/compiled/mkdirp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"mkdirp","main":"index.js","author":"James Halliday <mail@substack.net> (http://substack.net)","license":"MIT"}
22 changes: 22 additions & 0 deletions packages/next/compiled/neo-async/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2014-2018 Suguru Motegi
Based on Async.js, Copyright Caolan McMahon

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions packages/next/compiled/neo-async/async.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/compiled/neo-async/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"neo-async","main":"async.js","license":"MIT"}
2 changes: 1 addition & 1 deletion packages/next/compiled/postcss-loader/cjs.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions packages/next/compiled/schema-utils/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright JS Foundation and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions packages/next/compiled/schema-utils/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/compiled/schema-utils/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"schema-utils","main":"index.js","author":"webpack Contrib (https://github.com/webpack-contrib)","license":"MIT"}
2 changes: 1 addition & 1 deletion packages/next/compiled/terser-webpack-plugin/cjs.js

Large diffs are not rendered by default.

Loading

0 comments on commit 27dc2f1

Please sign in to comment.