Unverified Commit 8f7f1018 authored by Guy Bedford's avatar Guy Bedford Committed by GitHub

ncc inlining optimizations (#18752)

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 https://github.com/vercel/next.js/pull/14746 as I could not see any production usage (ping @prateekbh). Happy to separate that out into a separate PR if preferred too.
parent b9bf6863
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
getTTFB, getTTFB,
Metric, Metric,
ReportHandler, ReportHandler,
} from 'web-vitals' } from 'next/dist/compiled/web-vitals'
const initialHref = location.href const initialHref = location.href
let isRegistered = false let isRegistered = false
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{"name":"cacache","main":"index.js","author":{"name":"Kat Marchán","email":"kzm@sykosomatic.org","twitter":"maybekatz"},"license":"ISC"}
This diff is collapsed.
module.exports=function(e,t){"use strict";var i={};function __webpack_require__(t){if(i[t]){return i[t].exports}var r=i[t]={i:t,l:false,exports:{}};e[t].call(r.exports,r,r.exports,__webpack_require__);r.l=true;return r.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(704)}return startup()}({134:function(e){e.exports=require("schema-utils")},622:function(e){e.exports=require("path")},647:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=loader;t.raw=void 0;var r=_interopRequireDefault(i(622));var o=_interopRequireDefault(i(710));var a=_interopRequireDefault(i(134));var n=_interopRequireDefault(i(838));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function loader(e){const t=o.default.getOptions(this);(0,a.default)(n.default,t,{name:"File Loader",baseDataPath:"options"});const i=t.context||this.rootContext;const s=o.default.interpolateName(this,t.name||"[contenthash].[ext]",{context:i,content:e,regExp:t.regExp});let u=s;if(t.outputPath){if(typeof t.outputPath==="function"){u=t.outputPath(s,this.resourcePath,i)}else{u=r.default.posix.join(t.outputPath,s)}}let p=`__webpack_public_path__ + ${JSON.stringify(u)}`;if(t.publicPath){if(typeof t.publicPath==="function"){p=t.publicPath(s,this.resourcePath,i)}else{p=`${t.publicPath.endsWith("/")?t.publicPath:`${t.publicPath}/`}${s}`}p=JSON.stringify(p)}if(t.postTransformPublicPath){p=t.postTransformPublicPath(p)}if(typeof t.emitFile==="undefined"||t.emitFile){this.emitFile(u,e)}const c=typeof t.esModule!=="undefined"?t.esModule:true;return`${c?"export default":"module.exports ="} ${p};`}const s=true;t.raw=s},704:function(e,t,i){"use strict";const r=i(647);e.exports=r.default;e.exports.raw=r.raw},710:function(e){e.exports=require("loader-utils")},838:function(e){e.exports={additionalProperties:true,properties:{name:{description:"The filename template for the target file(s) (https://github.com/webpack-contrib/file-loader#name).",anyOf:[{type:"string"},{instanceof:"Function"}]},outputPath:{description:"A filesystem path where the target file(s) will be placed (https://github.com/webpack-contrib/file-loader#outputpath).",anyOf:[{type:"string"},{instanceof:"Function"}]},publicPath:{description:"A custom public path for the target file(s) (https://github.com/webpack-contrib/file-loader#publicpath).",anyOf:[{type:"string"},{instanceof:"Function"}]},postTransformPublicPath:{description:"A custom transformation function for post-processing the publicPath (https://github.com/webpack-contrib/file-loader#posttransformpublicpath).",instanceof:"Function"},context:{description:"A custom file context (https://github.com/webpack-contrib/file-loader#context).",type:"string"},emitFile:{description:"Enables/Disables emit files (https://github.com/webpack-contrib/file-loader#emitfile).",type:"boolean"},regExp:{description:"A Regular Expression to one or many parts of the target file path. The capture groups can be reused in the name property using [N] placeholder (https://github.com/webpack-contrib/file-loader#regexp).",anyOf:[{type:"string"},{instanceof:"RegExp"}]},esModule:{description:"By default, file-loader generates JS modules that use the ES modules syntax.",type:"boolean"}},type:"object"}}}); module.exports=function(e,t){"use strict";var i={};function __webpack_require__(t){if(i[t]){return i[t].exports}var r=i[t]={i:t,l:false,exports:{}};e[t].call(r.exports,r,r.exports,__webpack_require__);r.l=true;return r.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(704)}return startup()}({225:function(e){e.exports=require("next/dist/compiled/schema-utils")},622:function(e){e.exports=require("path")},647:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=loader;t.raw=void 0;var r=_interopRequireDefault(i(622));var o=_interopRequireDefault(i(710));var a=_interopRequireDefault(i(225));var n=_interopRequireDefault(i(838));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function loader(e){const t=o.default.getOptions(this);(0,a.default)(n.default,t,{name:"File Loader",baseDataPath:"options"});const i=t.context||this.rootContext;const s=o.default.interpolateName(this,t.name||"[contenthash].[ext]",{context:i,content:e,regExp:t.regExp});let u=s;if(t.outputPath){if(typeof t.outputPath==="function"){u=t.outputPath(s,this.resourcePath,i)}else{u=r.default.posix.join(t.outputPath,s)}}let p=`__webpack_public_path__ + ${JSON.stringify(u)}`;if(t.publicPath){if(typeof t.publicPath==="function"){p=t.publicPath(s,this.resourcePath,i)}else{p=`${t.publicPath.endsWith("/")?t.publicPath:`${t.publicPath}/`}${s}`}p=JSON.stringify(p)}if(t.postTransformPublicPath){p=t.postTransformPublicPath(p)}if(typeof t.emitFile==="undefined"||t.emitFile){this.emitFile(u,e)}const c=typeof t.esModule!=="undefined"?t.esModule:true;return`${c?"export default":"module.exports ="} ${p};`}const s=true;t.raw=s},704:function(e,t,i){"use strict";const r=i(647);e.exports=r.default;e.exports.raw=r.raw},710:function(e){e.exports=require("loader-utils")},838:function(e){e.exports={additionalProperties:true,properties:{name:{description:"The filename template for the target file(s) (https://github.com/webpack-contrib/file-loader#name).",anyOf:[{type:"string"},{instanceof:"Function"}]},outputPath:{description:"A filesystem path where the target file(s) will be placed (https://github.com/webpack-contrib/file-loader#outputpath).",anyOf:[{type:"string"},{instanceof:"Function"}]},publicPath:{description:"A custom public path for the target file(s) (https://github.com/webpack-contrib/file-loader#publicpath).",anyOf:[{type:"string"},{instanceof:"Function"}]},postTransformPublicPath:{description:"A custom transformation function for post-processing the publicPath (https://github.com/webpack-contrib/file-loader#posttransformpublicpath).",instanceof:"Function"},context:{description:"A custom file context (https://github.com/webpack-contrib/file-loader#context).",type:"string"},emitFile:{description:"Enables/Disables emit files (https://github.com/webpack-contrib/file-loader#emitfile).",type:"boolean"},regExp:{description:"A Regular Expression to one or many parts of the target file path. The capture groups can be reused in the name property using [N] placeholder (https://github.com/webpack-contrib/file-loader#regexp).",anyOf:[{type:"string"},{instanceof:"RegExp"}]},esModule:{description:"By default, file-loader generates JS modules that use the ES modules syntax.",type:"boolean"}},type:"object"}}});
\ No newline at end of file \ No newline at end of file
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.
module.exports=function(r,t){"use strict";var e={};function __webpack_require__(t){if(e[t]){return e[t].exports}var n=e[t]={i:t,l:false,exports:{}};r[t].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(145)}return startup()}({145:function(r,t,e){"use strict";const n=e(622);const o=e(747);const s=e(645);const c=e(474);const i=e(938);const{env:u,cwd:a}=process;const d=r=>{try{o.accessSync(r,o.constants.W_OK);return true}catch(r){return false}};function useDirectory(r,t){if(t.create){i.sync(r)}if(t.thunk){return(...t)=>n.join(r,...t)}return r}function getNodeModuleDirectory(r){const t=n.join(r,"node_modules");if(!d(t)&&(o.existsSync(t)||!d(n.join(r)))){return}return t}r.exports=((r={})=>{if(u.CACHE_DIR&&!["true","false","1","0"].includes(u.CACHE_DIR)){return useDirectory(n.join(u.CACHE_DIR,"find-cache-dir"),r)}let{cwd:t=a()}=r;if(r.files){t=s(t,r.files)}t=c.sync(t);if(!t){return}const e=getNodeModuleDirectory(t);if(!e){return undefined}return useDirectory(n.join(t,"node_modules",".cache",r.name),r)})},442:function(r){r.exports=require("next/dist/compiled/find-up")},474:function(r,t,e){"use strict";const n=e(622);const o=e(442);const s=async r=>{const t=await o("package.json",{cwd:r});return t&&n.dirname(t)};r.exports=s;r.exports.default=s;r.exports.sync=(r=>{const t=o.sync("package.json",{cwd:r});return t&&n.dirname(t)})},519:function(r){r.exports=require("next/dist/compiled/semver")},622:function(r){r.exports=require("path")},645:function(r,t,e){var n=e(622);r.exports=function(r,t){if(t){var e=t.map(function(t){return n.resolve(r,t)})}else{var e=r}var o=e.slice(1).reduce(function(r,t){if(!t.match(/^([A-Za-z]:)?\/|\\/)){throw new Error("relative path without a basedir")}var e=t.split(/\/+|\\+/);for(var n=0;r[n]===e[n]&&n<Math.min(r.length,e.length);n++);return r.slice(0,n)},e[0].split(/\/+|\\+/));return o.length>1?o.join("/"):"/"}},669:function(r){r.exports=require("util")},747:function(r){r.exports=require("fs")},938:function(r,t,e){"use strict";const n=e(747);const o=e(622);const{promisify:s}=e(669);const c=e(519);const i=c.satisfies(process.version,">=10.12.0");const u=r=>{if(process.platform==="win32"){const t=/[<>:"|?*]/.test(r.replace(o.parse(r).root,""));if(t){const t=new Error(`Path contains invalid characters: ${r}`);t.code="EINVAL";throw t}}};const a=r=>{const t={mode:511&~process.umask(),fs:n};return{...t,...r}};const d=r=>{const t=new Error(`operation not permitted, mkdir '${r}'`);t.code="EPERM";t.errno=-4048;t.path=r;t.syscall="mkdir";return t};const f=async(r,t)=>{u(r);t=a(t);const e=s(t.fs.mkdir);const c=s(t.fs.stat);if(i&&t.fs.mkdir===n.mkdir){const n=o.resolve(r);await e(n,{mode:t.mode,recursive:true});return n}const f=async r=>{try{await e(r,t.mode);return r}catch(t){if(t.code==="EPERM"){throw t}if(t.code==="ENOENT"){if(o.dirname(r)===r){throw d(r)}if(t.message.includes("null bytes")){throw t}await f(o.dirname(r));return f(r)}try{const e=await c(r);if(!e.isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw t}return r}};return f(o.resolve(r))};r.exports=f;r.exports.sync=((r,t)=>{u(r);t=a(t);if(i&&t.fs.mkdirSync===n.mkdirSync){const e=o.resolve(r);n.mkdirSync(e,{mode:t.mode,recursive:true});return e}const e=r=>{try{t.fs.mkdirSync(r,t.mode)}catch(n){if(n.code==="EPERM"){throw n}if(n.code==="ENOENT"){if(o.dirname(r)===r){throw d(r)}if(n.message.includes("null bytes")){throw n}e(o.dirname(r));return e(r)}try{if(!t.fs.statSync(r).isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw n}}return r};return e(o.resolve(r))})}});
\ No newline at end of file
{"name":"find-cache-dir","main":"index.js","license":"MIT"}
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.
module.exports=function(r,e){"use strict";var i={};function __webpack_require__(e){if(i[e]){return i[e].exports}var t=i[e]={i:e,l:false,exports:{}};r[e].call(t.exports,t,t.exports,__webpack_require__);t.l=true;return t.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(626)}return startup()}({622:function(r){r.exports=require("path")},626:function(r,e,i){var t=i(622);var n=i(747);var u=parseInt("0777",8);r.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(r,e,i,o){if(typeof e==="function"){i=e;e={}}else if(!e||typeof e!=="object"){e={mode:e}}var c=e.mode;var s=e.fs||n;if(c===undefined){c=u&~process.umask()}if(!o)o=null;var a=i||function(){};r=t.resolve(r);s.mkdir(r,c,function(i){if(!i){o=o||r;return a(null,o)}switch(i.code){case"ENOENT":mkdirP(t.dirname(r),e,function(i,t){if(i)a(i,t);else mkdirP(r,e,a,t)});break;default:s.stat(r,function(r,e){if(r||!e.isDirectory())a(i,o);else a(null,o)});break}})}mkdirP.sync=function sync(r,e,i){if(!e||typeof e!=="object"){e={mode:e}}var o=e.mode;var c=e.fs||n;if(o===undefined){o=u&~process.umask()}if(!i)i=null;r=t.resolve(r);try{c.mkdirSync(r,o);i=i||r}catch(n){switch(n.code){case"ENOENT":i=sync(t.dirname(r),e,i);sync(r,e,i);break;default:var s;try{s=c.statSync(r)}catch(r){throw n}if(!s.isDirectory())throw n;break}}return i}},747:function(r){r.exports=require("fs")}});
\ No newline at end of file
{"name":"mkdirp","main":"index.js","author":"James Halliday <mail@substack.net> (http://substack.net)","license":"MIT"}
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.
This diff is collapsed.
{"name":"neo-async","main":"async.js","license":"MIT"}
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.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"name":"schema-utils","main":"index.js","author":"webpack Contrib (https://github.com/webpack-contrib)","license":"MIT"}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
{"name":"web-vitals","main":"web-vitals.es5.umd.min.js","author":{"name":"Philip Walton","email":"philip@philipwalton.com","url":"http://philipwalton.com"},"license":"Apache-2.0"}
module.exports=function(t,e){"use strict";var n={};function __webpack_require__(e){if(n[e]){return n[e].exports}var i=n[e]={i:e,l:false,exports:{}};t[e].call(i.exports,i,i.exports,__webpack_require__);i.l=true;return i.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(231)}return startup()}({231:function(t,e){!function(t,n){true?n(e):undefined}(this,function(t){"use strict";var e,n,i=function(){return"".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)},r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return{name:t,value:e,delta:0,entries:[],id:i(),isFinal:!1}},a=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver(function(t){return t.getEntries().map(e)});return n.observe({type:t,buffered:!0}),n}}catch(t){}},o=!1,u=!1,s=function(t){o=!t.persisted},c=function(){addEventListener("pagehide",s),addEventListener("beforeunload",function(){})},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(c(),u=!0),addEventListener("visibilitychange",function(e){var n=e.timeStamp;"hidden"===document.visibilityState&&t({timeStamp:n,isUnloading:o})},{capture:!0,once:e})},f=function(t,e,n,i){var r;return function(){n&&e.isFinal&&n.disconnect(),e.value>=0&&(i||e.isFinal||"hidden"===document.visibilityState)&&(e.delta=e.value-(r||0),(e.delta||e.isFinal||void 0===r)&&(t(e),r=e.value))}},l=function(){return void 0===e&&(e="hidden"===document.visibilityState?0:1/0,p(function(t){var n=t.timeStamp;return e=n},!0)),{get timeStamp(){return e}}},d=function(){return n||(n=new Promise(function(t){return["scroll","keydown","pointerdown"].map(function(e){addEventListener(e,t,{once:!0,passive:!0,capture:!0})})})),n};t.getCLS=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=r("CLS",0),o=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),e())},u=a("layout-shift",o);u&&(e=f(t,i,u,n),p(function(t){var n=t.isUnloading;u.takeRecords().map(o),n&&(i.isFinal=!0),e()}))},t.getFCP=function(t){var e,n=r("FCP"),i=l(),o=a("paint",function(t){"first-contentful-paint"===t.name&&t.startTime<i.timeStamp&&(n.value=t.startTime,n.isFinal=!0,n.entries.push(t),e())});o&&(e=f(t,n,o))},t.getFID=function(t){var e=r("FID"),n=l(),i=function(t){t.startTime<n.timeStamp&&(e.value=t.processingStart-t.startTime,e.entries.push(t),e.isFinal=!0,u())},o=a("first-input",i),u=f(t,e,o);o?p(function(){o.takeRecords().map(i),o.disconnect()},!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay(function(t,i){i.timeStamp<n.timeStamp&&(e.value=t,e.isFinal=!0,e.entries=[{entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+t}],u())})},t.getLCP=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=r("LCP"),o=l(),u=function(t){var n=t.startTime;n<o.timeStamp?(i.value=n,i.entries.push(t)):i.isFinal=!0,e()},s=a("largest-contentful-paint",u);if(s){e=f(t,i,s,n);var c=function(){i.isFinal||(s.takeRecords().map(u),i.isFinal=!0,e())};d().then(c),p(c,!0)}},t.getTTFB=function(t){var e,n=r("TTFB");e=function(){try{var e=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,e={entryType:"navigation",startTime:0};for(var n in t)"navigationStart"!==n&&"toJSON"!==n&&(e[n]=Math.max(t[n]-t.navigationStart,0));return e}();n.value=n.delta=e.responseStart,n.entries=[e],n.isFinal=!0,t(n)}catch(t){}},"complete"===document.readyState?setTimeout(e,0):addEventListener("pageshow",e)},Object.defineProperty(t,"__esModule",{value:!0})})}});
\ No newline at end of file
...@@ -87,7 +87,6 @@ ...@@ -87,7 +87,6 @@
"babel-plugin-transform-react-remove-prop-types": "0.4.24", "babel-plugin-transform-react-remove-prop-types": "0.4.24",
"browserslist": "4.13.0", "browserslist": "4.13.0",
"buffer": "5.6.0", "buffer": "5.6.0",
"cacache": "15.0.5",
"caniuse-lite": "^1.0.30001113", "caniuse-lite": "^1.0.30001113",
"chokidar": "3.4.2", "chokidar": "3.4.2",
"crypto-browserify": "3.12.0", "crypto-browserify": "3.12.0",
...@@ -96,9 +95,7 @@ ...@@ -96,9 +95,7 @@
"find-cache-dir": "3.3.1", "find-cache-dir": "3.3.1",
"jest-worker": "24.9.0", "jest-worker": "24.9.0",
"loader-utils": "2.0.0", "loader-utils": "2.0.0",
"mkdirp": "0.5.3",
"native-url": "0.3.4", "native-url": "0.3.4",
"neo-async": "2.6.1",
"node-html-parser": "^1.2.19", "node-html-parser": "^1.2.19",
"path-browserify": "1.0.1", "path-browserify": "1.0.1",
"pnp-webpack-plugin": "1.6.4", "pnp-webpack-plugin": "1.6.4",
...@@ -116,7 +113,6 @@ ...@@ -116,7 +113,6 @@
"use-subscription": "1.5.0", "use-subscription": "1.5.0",
"vm-browserify": "1.1.2", "vm-browserify": "1.1.2",
"watchpack": "2.0.0-beta.13", "watchpack": "2.0.0-beta.13",
"web-vitals": "0.2.4",
"webpack": "4.44.1", "webpack": "4.44.1",
"webpack-sources": "1.4.3" "webpack-sources": "1.4.3"
}, },
...@@ -167,10 +163,12 @@ ...@@ -167,10 +163,12 @@
"@zeit/ncc": "0.22.0", "@zeit/ncc": "0.22.0",
"amphtml-validator": "1.0.33", "amphtml-validator": "1.0.33",
"arg": "4.1.0", "arg": "4.1.0",
"ast-types": "0.13.2",
"async-retry": "1.2.3", "async-retry": "1.2.3",
"async-sema": "3.0.0", "async-sema": "3.0.0",
"babel-loader": "8.1.0", "babel-loader": "8.1.0",
"babel-plugin-dynamic-import-node": "2.3.3", "babel-plugin-dynamic-import-node": "2.3.3",
"cacache": "15.0.5",
"cache-loader": "4.1.0", "cache-loader": "4.1.0",
"chalk": "2.4.2", "chalk": "2.4.2",
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540", "ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
...@@ -184,6 +182,7 @@ ...@@ -184,6 +182,7 @@
"escape-string-regexp": "2.0.0", "escape-string-regexp": "2.0.0",
"etag": "1.8.1", "etag": "1.8.1",
"file-loader": "6.0.0", "file-loader": "6.0.0",
"find-cache-dir": "3.3.1",
"find-up": "4.1.0", "find-up": "4.1.0",
"fresh": "0.5.2", "fresh": "0.5.2",
"gzip-size": "5.1.1", "gzip-size": "5.1.1",
...@@ -195,7 +194,9 @@ ...@@ -195,7 +194,9 @@
"jsonwebtoken": "8.5.1", "jsonwebtoken": "8.5.1",
"lodash.curry": "4.1.1", "lodash.curry": "4.1.1",
"lru-cache": "5.1.1", "lru-cache": "5.1.1",
"mkdirp": "0.5.3",
"nanoid": "2.0.3", "nanoid": "2.0.3",
"neo-async": "2.6.1",
"node-fetch": "2.6.1", "node-fetch": "2.6.1",
"ora": "4.0.4", "ora": "4.0.4",
"path-to-regexp": "6.1.0", "path-to-regexp": "6.1.0",
...@@ -217,7 +218,8 @@ ...@@ -217,7 +218,8 @@
"thread-loader": "2.1.3", "thread-loader": "2.1.3",
"typescript": "3.8.3", "typescript": "3.8.3",
"unfetch": "4.1.0", "unfetch": "4.1.0",
"unistore": "3.4.1" "unistore": "3.4.1",
"web-vitals": "0.2.4"
}, },
"engines": { "engines": {
"node": ">=10.13.0" "node": ">=10.13.0"
......
...@@ -38,21 +38,12 @@ const externals = { ...@@ -38,21 +38,12 @@ const externals = {
'webpack/lib/cache/getLazyHashedEtag': 'webpack/lib/cache/getLazyHashedEtag', 'webpack/lib/cache/getLazyHashedEtag': 'webpack/lib/cache/getLazyHashedEtag',
'webpack/lib/RequestShortener': 'webpack/lib/RequestShortener', 'webpack/lib/RequestShortener': 'webpack/lib/RequestShortener',
chokidar: 'chokidar', chokidar: 'chokidar',
// dependents: babel-loader, async-retry, cache-loader, terser-webpack-plugin
'find-cache-dir': 'find-cache-dir',
// dependents: thread-loader // dependents: thread-loader
'loader-runner': 'loader-runner', 'loader-runner': 'loader-runner',
// dependents: thread-loader, babel-loader // dependents: thread-loader, babel-loader
'loader-utils': 'loader-utils', 'loader-utils': 'loader-utils',
// dependents: babel-loader
mkdirp: 'mkdirp',
// dependents: thread-loader, cache-loader
'neo-async': 'neo-async',
// dependents: cache-loader, style-loader, file-loader
'schema-utils': 'schema-utils',
// dependents: terser-webpack-plugin // dependents: terser-webpack-plugin
'jest-worker': 'jest-worker', 'jest-worker': 'jest-worker',
cacache: 'cacache',
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
externals['amphtml-validator'] = 'next/dist/compiled/amphtml-validator' externals['amphtml-validator'] = 'next/dist/compiled/amphtml-validator'
...@@ -101,6 +92,14 @@ export async function ncc_babel_loader(task, opts) { ...@@ -101,6 +92,14 @@ export async function ncc_babel_loader(task, opts) {
.target('compiled/babel-loader') .target('compiled/babel-loader')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
externals['cacache'] = 'next/dist/compiled/cacache'
export async function ncc_cacache(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('cacache')))
.ncc({ packageName: 'cacache' })
.target('compiled/cacache')
}
// eslint-disable-next-line camelcase
externals['cache-loader'] = 'next/dist/compiled/cache-loader' externals['cache-loader'] = 'next/dist/compiled/cache-loader'
export async function ncc_cache_loader(task, opts) { export async function ncc_cache_loader(task, opts) {
await task await task
...@@ -201,6 +200,14 @@ export async function ncc_file_loader(task, opts) { ...@@ -201,6 +200,14 @@ export async function ncc_file_loader(task, opts) {
.target('compiled/file-loader') .target('compiled/file-loader')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
externals['find-cache-dir'] = 'next/dist/compiled/find-cache-dir'
export async function ncc_find_cache_dir(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('find-cache-dir')))
.ncc({ packageName: 'find-cache-dir', externals })
.target('compiled/find-cache-dir')
}
// eslint-disable-next-line camelcase
externals['find-up'] = 'next/dist/compiled/find-up' externals['find-up'] = 'next/dist/compiled/find-up'
export async function ncc_find_up(task, opts) { export async function ncc_find_up(task, opts) {
await task await task
...@@ -297,6 +304,14 @@ export async function ncc_lru_cache(task, opts) { ...@@ -297,6 +304,14 @@ export async function ncc_lru_cache(task, opts) {
.target('compiled/lru-cache') .target('compiled/lru-cache')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
externals['mkdirp'] = 'next/dist/compiled/mkdirp'
export async function ncc_mkdirp(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('mkdirp')))
.ncc({ packageName: 'mkdirp', externals })
.target('compiled/mkdirp')
}
// eslint-disable-next-line camelcase
externals['nanoid'] = 'next/dist/compiled/nanoid' externals['nanoid'] = 'next/dist/compiled/nanoid'
export async function ncc_nanoid(task, opts) { export async function ncc_nanoid(task, opts) {
await task await task
...@@ -305,6 +320,14 @@ export async function ncc_nanoid(task, opts) { ...@@ -305,6 +320,14 @@ export async function ncc_nanoid(task, opts) {
.target('compiled/nanoid') .target('compiled/nanoid')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
externals['neo-async'] = 'next/dist/compiled/neo-async'
export async function ncc_neo_async(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('neo-async')))
.ncc({ packageName: 'neo-async', externals })
.target('compiled/neo-async')
}
// eslint-disable-next-line camelcase
externals['node-fetch'] = 'next/dist/compiled/node-fetch' externals['node-fetch'] = 'next/dist/compiled/node-fetch'
export async function ncc_node_fetch(task, opts) { export async function ncc_node_fetch(task, opts) {
await task await task
...@@ -376,6 +399,17 @@ export async function ncc_resolve(task, opts) { ...@@ -376,6 +399,17 @@ export async function ncc_resolve(task, opts) {
.target('compiled/resolve') .target('compiled/resolve')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
externals['schema-utils'] = 'next/dist/compiled/schema-utils'
export async function ncc_schema_utils(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('schema-utils')))
.ncc({
packageName: 'schema-utils',
externals,
})
.target('compiled/schema-utils')
}
// eslint-disable-next-line camelcase
externals['send'] = 'next/dist/compiled/send' externals['send'] = 'next/dist/compiled/send'
export async function ncc_send(task, opts) { export async function ncc_send(task, opts) {
await task await task
...@@ -441,6 +475,14 @@ export async function ncc_unistore(task, opts) { ...@@ -441,6 +475,14 @@ export async function ncc_unistore(task, opts) {
.ncc({ packageName: 'unistore', externals }) .ncc({ packageName: 'unistore', externals })
.target('compiled/unistore') .target('compiled/unistore')
} }
// eslint-disable-next-line camelcase
externals['web-vitals'] = 'next/dist/compiled/web-vitals'
export async function ncc_web_vitals(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('web-vitals')))
.ncc({ packageName: 'web-vitals', externals })
.target('compiled/web-vitals')
}
externals['terser-webpack-plugin'] = 'next/dist/compiled/terser-webpack-plugin' externals['terser-webpack-plugin'] = 'next/dist/compiled/terser-webpack-plugin'
export async function ncc_terser_webpack_plugin(task, opts) { export async function ncc_terser_webpack_plugin(task, opts) {
...@@ -495,6 +537,7 @@ export async function ncc(task) { ...@@ -495,6 +537,7 @@ export async function ncc(task) {
'ncc_async_retry', 'ncc_async_retry',
'ncc_async_sema', 'ncc_async_sema',
'ncc_babel_loader', 'ncc_babel_loader',
'ncc_cacache',
'ncc_cache_loader', 'ncc_cache_loader',
'ncc_chalk', 'ncc_chalk',
'ncc_ci_info', 'ncc_ci_info',
...@@ -507,6 +550,7 @@ export async function ncc(task) { ...@@ -507,6 +550,7 @@ export async function ncc(task) {
'ncc_escape_string_regexp', 'ncc_escape_string_regexp',
'ncc_etag', 'ncc_etag',
'ncc_file_loader', 'ncc_file_loader',
'ncc_find_cache_dir',
'ncc_find_up', 'ncc_find_up',
'ncc_fresh', 'ncc_fresh',
'ncc_gzip_size', 'ncc_gzip_size',
...@@ -519,7 +563,9 @@ export async function ncc(task) { ...@@ -519,7 +563,9 @@ export async function ncc(task) {
'ncc_jsonwebtoken', 'ncc_jsonwebtoken',
'ncc_lodash_curry', 'ncc_lodash_curry',
'ncc_lru_cache', 'ncc_lru_cache',
'ncc_mkdirp',
'ncc_nanoid', 'ncc_nanoid',
'ncc_neo_async',
'ncc_node_fetch', 'ncc_node_fetch',
'ncc_ora', 'ncc_ora',
'ncc_postcss_flexbugs_fixes', 'ncc_postcss_flexbugs_fixes',
...@@ -528,6 +574,7 @@ export async function ncc(task) { ...@@ -528,6 +574,7 @@ export async function ncc(task) {
'ncc_raw_body', 'ncc_raw_body',
'ncc_recast', 'ncc_recast',
'ncc_resolve', 'ncc_resolve',
'ncc_schema_utils',
'ncc_send', 'ncc_send',
'ncc_source_map', 'ncc_source_map',
'ncc_string_hash', 'ncc_string_hash',
...@@ -536,6 +583,7 @@ export async function ncc(task) { ...@@ -536,6 +583,7 @@ export async function ncc(task) {
'ncc_text_table', 'ncc_text_table',
'ncc_thread_loader', 'ncc_thread_loader',
'ncc_unistore', 'ncc_unistore',
'ncc_web_vitals',
'ncc_terser_webpack_plugin', 'ncc_terser_webpack_plugin',
'ncc_comment_json', 'ncc_comment_json',
'ncc_semver', 'ncc_semver',
......
...@@ -197,6 +197,10 @@ declare module 'next/dist/compiled/unistore' { ...@@ -197,6 +197,10 @@ declare module 'next/dist/compiled/unistore' {
import m from 'unistore' import m from 'unistore'
export = m export = m
} }
declare module 'next/dist/compiled/web-vitals' {
import m from 'web-vitals'
export = m
}
declare module 'next/dist/compiled/terser-webpack-plugin' declare module 'next/dist/compiled/terser-webpack-plugin'
declare module 'next/dist/compiled/comment-json' { declare module 'next/dist/compiled/comment-json' {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment