diff --git a/.github/actions/next-stats-action/Dockerfile b/.github/actions/next-stats-action/Dockerfile index bf86727921a9b..f533f918d9d27 100644 --- a/.github/actions/next-stats-action/Dockerfile +++ b/.github/actions/next-stats-action/Dockerfile @@ -1,8 +1,8 @@ -FROM node:10-buster +FROM node:14-buster LABEL com.github.actions.name="Next.js PR Stats" LABEL com.github.actions.description="Compares stats of a PR with the main branch" -LABEL repository="https://github.com/zeit/next-stats-action" +LABEL repository="https://github.com/vercel/next-stats-action" COPY . /next-stats diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 51e71ed0af9f9..9ec49756c9ed2 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -156,15 +156,15 @@ jobs: steps: - run: exit 0 - testFutureDependencies: - name: Webpack 5 (Basic, Production, Acceptance) + testLegacyWebpack: + name: Webpack 4 (Basic, Production, Acceptance) runs-on: ubuntu-latest needs: build env: NEXT_TELEMETRY_DISABLED: 1 NEXT_TEST_JOB: 1 HEADLESS: true - NEXT_PRIVATE_TEST_WEBPACK5_MODE: 1 + NEXT_PRIVATE_TEST_WEBPACK4_MODE: 1 steps: - uses: actions/cache@v2 @@ -174,43 +174,9 @@ jobs: path: ./* key: ${{ github.sha }} - - run: xvfb-run node run-tests.js test/integration/{fallback-modules,link-ref,production,basic,async-modules,font-optimization,ssr-ctx}/test/index.test.js test/acceptance/*.test.js + - run: xvfb-run node run-tests.js test/integration/{basic,fallback-modules,link-ref,production,async-modules,font-optimization,ssr-ctx}/test/index.test.js test/acceptance/*.test.js if: ${{needs.build.outputs.docsChange != 'docs only change'}} - testLegacyReact: - name: React 16 + Webpack 4 (Basic, Production, Acceptance) - runs-on: ubuntu-latest - env: - NEXT_TELEMETRY_DISABLED: 1 - NEXT_TEST_JOB: 1 - HEADLESS: true - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 25 - - - run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change') - id: docs-change - - - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} - - - run: cat package.json | jq '.resolutions.react = "^16.14.0"' > package.json.tmp && mv package.json.tmp package.json - if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} - - - run: cat package.json | jq '.resolutions."react-dom" = "^16.14.0"' > package.json.tmp && mv package.json.tmp package.json - if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} - - - run: yarn install --check-files - if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} - - - run: yarn list react react-dom - if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} - - - run: xvfb-run node run-tests.js test/integration/{link-ref,production,basic,async-modules,font-optimization,ssr-ctx,worker-loader}/test/index.test.js test/acceptance/*.test.js - if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} - testFirefox: name: Test Firefox (production) runs-on: ubuntu-latest diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 57857e0a62e33..b6f279038aefb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -117,13 +117,13 @@ stages: vmImage: 'windows-2019' strategy: matrix: - node-10-1: + nodejs-1: group: 1/4 - node-10-2: + nodejs-2: group: 2/4 - node-10-3: + nodejs-3: group: 3/4 - node-10-4: + nodejs-4: group: 4/4 steps: - checkout: none diff --git a/bench/capture-trace.js b/bench/capture-trace.js index 52ef690bff76b..d7419745c3a0e 100644 --- a/bench/capture-trace.js +++ b/bench/capture-trace.js @@ -1,5 +1,5 @@ -const http = require('http') -const fs = require('fs') +import { createServer } from 'http' +import { writeFileSync } from 'fs' const PORT = 9411 const HOST = '0.0.0.0' @@ -53,11 +53,11 @@ const main = () => { process.on('SIGINT', () => { console.log(`\nSaving to ${outFile}...`) - fs.writeFileSync(outFile, JSON.stringify(traces, null, 2)) + writeFileSync(outFile, JSON.stringify(traces, null, 2)) process.exit() }) - const server = http.createServer(onRequest) + const server = createServer(onRequest) server.listen(PORT, HOST, onReady) } diff --git a/bench/package.json b/bench/package.json index eb3c593c98f8c..d311332afdefa 100644 --- a/bench/package.json +++ b/bench/package.json @@ -8,7 +8,7 @@ "bench:recursive-copy": "node recursive-copy/run" }, "dependencies": { - "fs-extra": "7.0.1", - "recursive-copy": "2.0.10" + "fs-extra": "10.0.0", + "recursive-copy": "2.0.11" } } diff --git a/bench/readdir/glob.js b/bench/readdir/glob.js index 1c409ad384ba5..170f4fb050eb5 100644 --- a/bench/readdir/glob.js +++ b/bench/readdir/glob.js @@ -1,6 +1,7 @@ -const { join } = require('path') -const { promisify } = require('util') -const globMod = require('glob') +import { join } from 'path' +import { promisify } from 'util' +import globMod from 'glob' + const glob = promisify(globMod) const resolveDataDir = join(__dirname, 'fixtures', '**/*') diff --git a/bench/readdir/recursive-readdir.js b/bench/readdir/recursive-readdir.js index 871256707ddb6..2167f30336553 100644 --- a/bench/readdir/recursive-readdir.js +++ b/bench/readdir/recursive-readdir.js @@ -1,5 +1,5 @@ -const { join } = require('path') -const { recursiveReadDir } = require('next/dist/lib/recursive-readdir') +import { join } from 'path' +import { recursiveReadDir } from 'next/dist/lib/recursive-readdir' const resolveDataDir = join(__dirname, 'fixtures') async function test() { diff --git a/bench/recursive-copy/run.js b/bench/recursive-copy/run.js index c4bad36c88df3..ab12258004724 100644 --- a/bench/recursive-copy/run.js +++ b/bench/recursive-copy/run.js @@ -1,18 +1,14 @@ -const { join } = require('path') -const fs = require('fs-extra') - -const recursiveCopyNpm = require('recursive-copy') - -const { - recursiveCopy: recursiveCopyCustom, -} = require('next/dist/lib/recursive-copy') +import { join } from 'path' +import { ensureDir, outputFile, remove } from 'fs-extra' +import recursiveCopyNpm from 'recursive-copy' +import { recursiveCopy as recursiveCopyCustom } from 'next/dist/lib/recursive-copy' const fixturesDir = join(__dirname, 'fixtures') const srcDir = join(fixturesDir, 'src') const destDir = join(fixturesDir, 'dest') const createSrcFolder = async () => { - await fs.ensureDir(srcDir) + await ensureDir(srcDir) const files = new Array(100) .fill(undefined) @@ -20,7 +16,7 @@ const createSrcFolder = async () => { join(srcDir, `folder${i % 5}`, `folder${i + (1 % 5)}`, `file${i}`) ) - await Promise.all(files.map((file) => fs.outputFile(file, 'hello'))) + await Promise.all(files.map((file) => outputFile(file, 'hello'))) } async function run(fn) { @@ -38,7 +34,7 @@ async function run(fn) { for (let i = 0; i < 10; i++) { const t = await test() - await fs.remove(destDir) + await remove(destDir) ts.push(t) } @@ -57,7 +53,7 @@ async function main() { console.log('test recursive-copy custom implementation') await run(recursiveCopyCustom) - await fs.remove(fixturesDir) + await remove(fixturesDir) } main() diff --git a/bench/recursive-delete/recursive-delete.js b/bench/recursive-delete/recursive-delete.js index 8989739c9039f..e23ed3e6f26a6 100644 --- a/bench/recursive-delete/recursive-delete.js +++ b/bench/recursive-delete/recursive-delete.js @@ -1,5 +1,5 @@ -const { join } = require('path') -const { recursiveDelete } = require('next/dist/lib/recursive-delete') +import { join } from 'path' +import { recursiveDelete } from 'next/dist/lib/recursive-delete' const resolveDataDir = join(__dirname, `fixtures-${process.argv[2]}`) async function test() { diff --git a/bench/recursive-delete/rimraf.js b/bench/recursive-delete/rimraf.js index 2b5d50457a13c..827cdaae77484 100644 --- a/bench/recursive-delete/rimraf.js +++ b/bench/recursive-delete/rimraf.js @@ -1,8 +1,9 @@ -const { join } = require('path') -const { promisify } = require('util') -const rimrafMod = require('rimraf') -const resolveDataDir = join(__dirname, `fixtures-${process.argv[2]}`, '**/*') +import { join } from 'path' +import { promisify } from 'util' +import rimrafMod from 'rimraf' + const rimraf = promisify(rimrafMod) +const resolveDataDir = join(__dirname, `fixtures-${process.argv[2]}`, '**/*') async function test() { const time = process.hrtime() diff --git a/docs/api-reference/cli.md b/docs/api-reference/cli.md index bd9959252349e..ab91148fb834a 100644 --- a/docs/api-reference/cli.md +++ b/docs/api-reference/cli.md @@ -21,7 +21,7 @@ Usage $ next Available commands - build, start, export, dev, telemetry + build, start, export, dev, lint, telemetry Options --version, -v Version number @@ -84,6 +84,16 @@ The application will start at `http://localhost:3000` by default. The default po npx next start -p 4000 ``` +## Lint + +`next lint` runs ESLint for all files in the `pages` directory and provides a guided setup to install any required dependencies if ESLint is not already configured in your application. + +You can also run ESLint on other directories with the `--dir` flag: + +```bash +next lint --dir components +``` + ## Telemetry Next.js collects **completely anonymous** telemetry data about general usage. diff --git a/docs/api-reference/create-next-app.md b/docs/api-reference/create-next-app.md index 24f4255df576c..273bd9d8c236e 100644 --- a/docs/api-reference/create-next-app.md +++ b/docs/api-reference/create-next-app.md @@ -19,6 +19,7 @@ yarn create next-app - **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. - **--example-path [path-to-example]** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar` - **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend to run `yarn create next-app` +- **--typescript or --ts** - Creates the default template with TypeScript instead of JavaScript. ### Why use Create Next App? diff --git a/docs/basic-features/eslint.md b/docs/basic-features/eslint.md new file mode 100644 index 0000000000000..040bb5fb95758 --- /dev/null +++ b/docs/basic-features/eslint.md @@ -0,0 +1,121 @@ +--- +description: Next.js provides an integrated ESLint experience by default. These conformance rules help you use Next.js in the optimal way. +--- + +# ESLint + +Since version **11.0.0**, Next.js provides an integrated [ESLint](https://eslint.org/) experience out of the box. To get started, run `next lint`: + +```bash +next lint +``` + +If you don't already have ESLint configured in your application, you will be guided through the installation of the required packages. + +```bash +next lint + +# You'll see instructions like these: +# +# Please install eslint and eslint-config-next by running: +# +# yarn add --dev eslint eslint-config-next +# +# ... +``` + +If no ESLint configuration is present, Next.js will create an `.eslintrc` file in the root of your project and automatically configure it with the base configuration: + +```js +{ + "extends": "next" +} +``` + +You can now run `next lint` every time you want to run ESLint to catch errors. + +> The default base configuration (`"extends": "next"`) can be updated at any time and will only be included if no ESLint configuration is present. + +We recommend using an appropriate [integration](https://eslint.org/docs/user-guide/integrations#editors) to view warnings and errors directly in your code editor during development. + +## Linting During Builds + +Once ESLint has been set up, it will automatically run during every build (`next build`). Errors will fail the build, while warnings will not. + +If you do not want ESLint to run as a build step, it can be disabled using the `--no-lint` flag: + +```bash +next build --no-lint +``` + +**This is not recommended** unless you have configured ESLint to run in a separate part of your workflow (for example, in CI or a pre-commit hook). + +## Linting Custom Directories + +By default, Next.js will only run ESLint for all files in the `pages/` directory. However, you can specify other custom directories to run by using the `--dir` flag in `next lint`: + +```bash +next lint --dir components --dir lib +``` + +## ESLint Plugin + +Next.js provides an ESLint plugin, [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next), making it easier to catch common issues and problems in a Next.js application. The full set of rules can be found in the [package repository](https://github.com/vercel/next.js/tree/master/packages/eslint-plugin-next/lib/rules). + +## Base Configuration + +The Next.js base ESLint configuration is automatically generated when `next lint` is run for the first time: + +```js +{ + "extends": "next" +} +``` + +This configuration extends recommended rule sets from various ESLint plugins: + +- [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react) +- [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) +- [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) + +You can see the full details of the shareable configuration in the [`eslint-config-next`](https://www.npmjs.com/package/eslint-config-next) package. + +## Disabling Rules + +If you would like to modify any rules provided by the supported plugins (`react`, `react-hooks`, `next`), you can directly modify them using the `rules` property in your `.eslintrc`: + +```js +{ + "extends": "next", + "rules": { + "react/no-unescaped-entities": "off", + "@next/next/no-page-custom-font": "error", + } +} +``` + +> **Note**: If you need to also include a separate, custom ESLint configuration, it is highly recommended that `eslint-config-next` is extended last after other configurations. For example: +> +> ``` +> { +> "extends": ["eslint:recommended", "next"] +> } +> ``` +> +> The `next` configuration already handles setting default values for the `parser`, `plugins` and `settings` properties. +> There is no need to manually re-declare any of these properties unless you need a different configuration for your use case. +> If you include any other shareable configurations, you will need to make sure that these properties are not overwritten or modified. + +### Core Web Vitals + +A stricter `next/core-web-vitals` rule set can also be added in `.eslintrc`: + +``` +{ + "extends": ["next", "next/core-web-vitals"] +} +``` + +`next/core-web-vitals` updates `eslint-plugin-next` to error on a number of rules that are warnings by default if they affect [Core Web Vitals](https://web.dev/vitals/). + +> Both `next` and `next/core-web-vitals` entry points are automatically included for new applications built with [Create Next App](/docs/api-reference/create-next-app.md). diff --git a/docs/basic-features/typescript.md b/docs/basic-features/typescript.md index c4c67789ac173..51116dd6259c3 100644 --- a/docs/basic-features/typescript.md +++ b/docs/basic-features/typescript.md @@ -149,4 +149,4 @@ module.exports = nextConfig Since `v10.2.1` Next.js supports [incremental type checking](https://www.typescriptlang.org/tsconfig#incremental) when enabled in your `tsconfig.json`, this can help speed up type checking in larger applications. -It is highly recommended to be on at least `v4.3.0-beta` of TypeScript to experience the best performance when leveraging this feature. +It is highly recommended to be on at least `v4.3.2` of TypeScript to experience the [best performance](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/#lazier-incremental) when leveraging this feature. diff --git a/docs/getting-started.md b/docs/getting-started.md index 9c7d752b89959..14f8a870151c3 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -55,7 +55,8 @@ Open `package.json` and add the following `scripts`: "scripts": { "dev": "next dev", "build": "next build", - "start": "next start" + "start": "next start", + "lint": "next lint" } ``` @@ -64,6 +65,7 @@ These scripts refer to the different stages of developing an application: - `dev` - Runs [`next dev`](/docs/api-reference/cli.md#development) which starts Next.js in development mode - `build` - Runs [`next build`](/docs/api-reference/cli.md#build) which builds the application for production usage - `start` - Runs [`next start`](/docs/api-reference/cli.md#production) which starts a Next.js production server +- `lint` - Runs [`next lint`](/docs/api-reference/cli.md#lint) which sets up Next.js' built-in ESLint configuration Next.js is built around the concept of [pages](/docs/basic-features/pages.md). A page is a [React Component](https://reactjs.org/docs/components-and-props.html) exported from a `.js`, `.jsx`, `.ts`, or `.tsx` file in the `pages` directory. diff --git a/docs/manifest.json b/docs/manifest.json index 9d5cd74aa1c40..ceefa4ceca61c 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -37,6 +37,10 @@ "title": "Fast Refresh", "path": "/docs/basic-features/fast-refresh.md" }, + { + "title": "ESLint", + "path": "/docs/basic-features/eslint.md" + }, { "title": "TypeScript", "path": "/docs/basic-features/typescript.md" diff --git a/docs/upgrading.md b/docs/upgrading.md index cc13023fc81c2..dc8e955b8d2be 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -4,6 +4,54 @@ description: Learn how to upgrade Next.js. # Upgrade Guide +## Upgrading from version 10 to 11 + +## Upgrade React version to latest + +Most applications already use the latest version of React, with Next.js 11 the minimum React version has been updated to 17.0.2. + +To upgrade you can run the following command: + +``` +npm install react@latest react-dom@latest +``` + +Or using `yarn`: + +``` +yarn add react@latest react-dom@latest +``` + +### Remove `super.componentDidCatch()` from `pages/_app.js` + +The `next/app` component's `componentDidCatch` has been deprecated since Next.js 9 as it's no longer needed and has since been a no-op, in Next.js 11 it has been removed. + +If your `pages/_app.js` has a custom `componentDidCatch` method you can remove `super.componentDidCatch` as it is no longer needed. + +### Remove `Container` from `pages/_app.js` + +This export has been deprecated since Next.js 9 as it's no longer needed and has since been a no-op with a warning during development. In Next.js 11 it has been removed. + +If your `pages/_app.js` imports `Container` from `next/app` you can remove `Container` as it has been removed. Learn more in [the documentation](https://nextjs.org/docs/messages/app-container-deprecated). + +### Remove `props.url` usage from page components + +This property has been deprecated since Next.js 4 and has since shown a warning during development. With the introduction of `getStaticProps` / `getServerSideProps` these methods already disallowed usage of `props.url`. In Next.js 11 it has been removed completely. + +You can learn more in [the documentation](https://nextjs.org/docs/messages/url-deprecated). + +### Remove `unsized` property on `next/image` + +The `unsized` property on `next/image` was deprecated in Next.js 10.0.1. You can use `layout="fill"` instead. In Next.js 11 `unsized` was removed. + +### Remove `modules` property on `next/dynamic` + +The `modules` and `render` option for `next/dynamic` have been deprecated since Next.js 9.5 showing a warning that it has been deprecated. This was done in order to make `next/dynamic` close to `React.lazy` in API surface. In Next.js 11 the `modules` and `render` options have been removed. + +This option hasn't been mentioned in the documentation since Next.js 8 so it's less likely that your application is using it. + +If you application does use `modules` and `render` you can refer to [the documentation](https://nextjs.org/docs/messages/next-dynamic-modules). + ## React 16 to 17 React 17 introduced a new [JSX Transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) that brings a long-time Next.js feature to the wider React ecosystem: Not having to `import React from 'react'` when using JSX. When using React 17 Next.js will automatically use the new transform. This transform does not make the `React` variable global, which was an unintended side-effect of the previous Next.js implementation. A [codemod is available](/docs/advanced-features/codemods.md#add-missing-react-import) to automatically fix cases where you accidentally used `React` without importing it. diff --git a/errors/future-webpack5-moved-to-webpack5.md b/errors/future-webpack5-moved-to-webpack5.md new file mode 100644 index 0000000000000..fb9479c9cc88b --- /dev/null +++ b/errors/future-webpack5-moved-to-webpack5.md @@ -0,0 +1,33 @@ +# `future.webpack5` has been moved to `webpack5` + +#### Why This Error Occurred + +The `future.webpack5` option has been moved to `webpack5` in `next.config.js`. + +#### Possible Ways to Fix It + +If you had the value `true` you can removed the option as webpack 5 is now the default for all Next.js apps unless opted out. + +If you had he value `false` you can update `next.config.js`: + +Change `future.webpack5` to `webpack5`. + +Current `next.config.js`: + +```js +// next.config.js +module.exports = { + future: { + webpack5: false, + }, +} +``` + +Updated `next.config.js`: + +```js +// next.config.js +module.exports = { + webpack5: false, +} +``` diff --git a/errors/link-multiple-children.md b/errors/link-multiple-children.md new file mode 100644 index 0000000000000..54476589c6900 --- /dev/null +++ b/errors/link-multiple-children.md @@ -0,0 +1,36 @@ +# Multiple children were passed to + +#### Why This Error Occurred + +In your application code multiple children were passed to `next/link` but only one child is supported: + +For example: + +```js +import Link from 'next/link' + +export default function Home() { + return ( + + To About + Second To About + + ) +} +``` + +#### Possible Ways to Fix It + +Make sure only one child is used when using ``: + +```js +import Link from 'next/link' + +export default function Home() { + return ( + + To About + + ) +} +``` diff --git a/errors/no-document-import-in-page.md b/errors/no-document-import-in-page.md index 79195504d6ee5..8abbf7ceb3d0b 100644 --- a/errors/no-document-import-in-page.md +++ b/errors/no-document-import-in-page.md @@ -2,11 +2,11 @@ ### Why This Error Occurred -`next/document` was imported in a page outside of `pages/_document.js`. This can cause unexpected issues in your application. +`next/document` was imported in a page outside of `pages/_document.js` (or `pages/_document.tsx` if you are using TypeScript). This can cause unexpected issues in your application. ### Possible Ways to Fix It -Only import and use `next/document` within `pages/_document.js` to override the default `Document` component: +Only import and use `next/document` within `pages/_document.js` (or `pages/_document.tsx`) to override the default `Document` component: ```jsx // pages/_document.js diff --git a/errors/webpack5.md b/errors/webpack5.md index 97bab43d9b93d..b8c994c549e3a 100644 --- a/errors/webpack5.md +++ b/errors/webpack5.md @@ -2,17 +2,17 @@ #### Why This Message Occurred -Next.js will soon adopt webpack 5 as the default for compilation. We've spent a lot of effort into ensuring the transition from webpack 4 to 5 will be as smooth as possible. For example Next.js now comes with both webpack 4 and 5 allowing you to adopt webpack 5 by adding a flag to your `next.config.js`: +Next.js has adopted webpack 5 as the default for compilation. We've spent a lot of effort into ensuring the transition from webpack 4 to 5 will be as smooth as possible. For example Next.js now comes with both webpack 4 and 5 allowing you to adopt webpack 5 by adding a flag to your `next.config.js`: ```js module.exports = { - future: { - webpack5: true, - }, + // Webpack 5 is enabled by default + // You can still use webpack 4 while upgrading to the latest version of Next.js by adding the "webpack5: false" flag + webpack5: false, } ``` -Adopting webpack 5 in your application has many benefits, notably: +Using webpack 5 in your application has many benefits, notably: - Improved Disk Caching: `next build` is significantly faster on subsequent builds - Improved Fast Refresh: Fast Refresh work is prioritized @@ -22,11 +22,13 @@ Adopting webpack 5 in your application has many benefits, notably: - Support for web workers using `new Worker(new URL("worker.js", import.meta.url))` - Support for `exports`/`imports` field in `package.json` -In upcoming releases we'll gradually roll out webpack 5 to applications that are compatible with webpack 5: +In the past releases we have gradually rolled out webpack 5 to Next.js applications: -- In the next minor version we'll automatically opt-in applications without custom webpack configuration in `next.config.js` -- In the next minor version we'll automatically opt-in applications that do not have a `next.config.js` -- In the next major version we'll enable webpack 5 by default. You'll still be able to opt-out and use webpack 4 to help with backwards compatibility +- In Next.js 10.2 we automatically opted-in applications without custom webpack configuration in `next.config.js` +- In Next.js 10.2 we automatically opted-in applications that do not have a `next.config.js` +- In Next.js 11 webpack 5 was enabled by default for all applications. You can still opt-out and use webpack 4 to help with backwards compatibility using `webpack5: false` in `next.config.js` + +In the next major version webpack 4 support will be removed. #### Custom webpack configuration diff --git a/examples/with-chakra-ui-typescript/tsconfig.json b/examples/with-chakra-ui-typescript/tsconfig.json index c65399cb28e5d..93a83a407c40c 100644 --- a/examples/with-chakra-ui-typescript/tsconfig.json +++ b/examples/with-chakra-ui-typescript/tsconfig.json @@ -1,23 +1,19 @@ { "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, - "alwaysStrict": true, - "esModuleInterop": true, + "skipLibCheck": true, + "strict": false, "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "jsx": "preserve", - "lib": ["dom", "es2017"], + "noEmit": true, + "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "esnext" + "isolatedModules": true, + "jsx": "preserve" }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.tsx"] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/examples/with-docker/.gitignore b/examples/with-docker/.gitignore index 1437c53f70bc2..10d8c913baeaa 100644 --- a/examples/with-docker/.gitignore +++ b/examples/with-docker/.gitignore @@ -32,3 +32,7 @@ yarn-error.log* # vercel .vercel + +# lock files +yarn.lock +package-lock.json diff --git a/examples/with-docker/Dockerfile b/examples/with-docker/Dockerfile index 50a055be99d7a..9e7933393292a 100644 --- a/examples/with-docker/Dockerfile +++ b/examples/with-docker/Dockerfile @@ -1,5 +1,5 @@ # Install dependencies only when needed -FROM node:alpine AS deps +FROM node:14-alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. RUN apk add --no-cache libc6-compat WORKDIR /app @@ -7,14 +7,14 @@ COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile # Rebuild the source code only when needed -FROM node:alpine AS builder +FROM node:14-alpine AS builder WORKDIR /app COPY . . COPY --from=deps /app/node_modules ./node_modules RUN yarn build # Production image, copy all the files and run next -FROM node:alpine AS runner +FROM node:14-alpine AS runner WORKDIR /app ENV NODE_ENV production diff --git a/examples/with-docker/README.md b/examples/with-docker/README.md index d7e3a46025323..cfb64979d62b2 100644 --- a/examples/with-docker/README.md +++ b/examples/with-docker/README.md @@ -34,6 +34,10 @@ The `start` script in `package.json` has been modified to accept a `PORT` enviro - You will be prompted for [region](https://cloud.google.com/run/docs/quickstarts/build-and-deploy#follow-cloud-run): select the region of your choice, for example `us-central1`. - You will be prompted to **allow unauthenticated invocations**: respond `y`. +Or click the button below, authorize the script, and select the project and region when prompted: + +[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run/?git_repo=https://github.com/vercel/next.js.git&dir=examples/with-docker) + ## Running Locally First, run the development server: diff --git a/examples/with-docker/app.json b/examples/with-docker/app.json new file mode 100644 index 0000000000000..5f394f2daed37 --- /dev/null +++ b/examples/with-docker/app.json @@ -0,0 +1,10 @@ +{ + "name": "nextjs", + "options": { + "allow-unauthenticated": true, + "memory": "256Mi", + "cpu": "1", + "port": 3000, + "http2": false + } +} diff --git a/examples/with-docker/pages/index.js b/examples/with-docker/pages/index.js index 5787b11aa7f1a..16d683b56c084 100644 --- a/examples/with-docker/pages/index.js +++ b/examples/with-docker/pages/index.js @@ -11,7 +11,7 @@ export default function Home() {

- Welcome to Next.js! + Welcome to Next.js on Docker!

diff --git a/examples/with-electron-typescript/electron-src/index.ts b/examples/with-electron-typescript/electron-src/index.ts index 016b71bad754b..424360a4f19fb 100644 --- a/examples/with-electron-typescript/electron-src/index.ts +++ b/examples/with-electron-typescript/electron-src/index.ts @@ -16,6 +16,7 @@ app.on('ready', async () => { height: 600, webPreferences: { nodeIntegration: false, + contextIsolation: false, preload: join(__dirname, 'preload.js'), }, }) diff --git a/examples/with-electron-typescript/package.json b/examples/with-electron-typescript/package.json index b1e78dd9aff4e..990bbbc8e7b56 100644 --- a/examples/with-electron-typescript/package.json +++ b/examples/with-electron-typescript/package.json @@ -24,7 +24,7 @@ "@types/node": "^14.14.6", "@types/react": "^16.9.9", "@types/react-dom": "^16.9.9", - "electron": "^10.1.5", + "electron": "^13", "electron-builder": "^22.9.1", "next": "latest", "rimraf": "^3.0.0", diff --git a/examples/with-electron-typescript/renderer/tsconfig.json b/examples/with-electron-typescript/renderer/tsconfig.json index 9b8f772ccaffa..93a83a407c40c 100644 --- a/examples/with-electron-typescript/renderer/tsconfig.json +++ b/examples/with-electron-typescript/renderer/tsconfig.json @@ -1,23 +1,19 @@ { "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, - "alwaysStrict": true, - "esModuleInterop": true, + "skipLibCheck": true, + "strict": false, "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "jsx": "preserve", - "lib": ["dom", "es2017"], + "noEmit": true, + "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "esnext" + "isolatedModules": true, + "jsx": "preserve" }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.tsx", "**/*.js"] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/examples/with-grommet/package.json b/examples/with-grommet/package.json index 6bd89d922ce28..a2de0ae7516d4 100644 --- a/examples/with-grommet/package.json +++ b/examples/with-grommet/package.json @@ -11,7 +11,7 @@ "next": "latest", "react": "^16.7.0", "react-dom": "^16.7.0", - "styled-components": "^4.0.0" + "styled-components": "^5.3.0" }, "devDependencies": { "babel-plugin-styled-components": "^1.8.0" diff --git a/examples/with-mdx-remote/README.md b/examples/with-mdx-remote/README.md index 45d57da1ea461..8c08583dfb38e 100644 --- a/examples/with-mdx-remote/README.md +++ b/examples/with-mdx-remote/README.md @@ -34,10 +34,12 @@ For example, here's how you can change `getStaticProps` to pass a list of compon ```js import dynamic from 'next/dynamic' +import Test from '../components/test' const SomeHeavyComponent = dynamic(() => import('SomeHeavyComponent')) -// ... +const defaultComponents = { Test } + export function SomePage({ mdxSource, componentNames }) { const components = { ...defaultComponents, @@ -46,10 +48,17 @@ export function SomePage({ mdxSource, componentNames }) { : null, } - return + return } export async function getStaticProps() { + const source = `--- + title: Conditional custom components + --- + + Some **mdx** text, with a default component and a Heavy component + ` + const { content, data } = matter(source) const componentNames = [ diff --git a/examples/with-mobx-state-tree-typescript/package.json b/examples/with-mobx-state-tree-typescript/package.json index 6ebad5b982801..e0bc01e256b2f 100644 --- a/examples/with-mobx-state-tree-typescript/package.json +++ b/examples/with-mobx-state-tree-typescript/package.json @@ -17,6 +17,7 @@ "typescript": "^3.0.1" }, "devDependencies": { + "@babel/core": "7.14.3", "@babel/plugin-proposal-decorators": "^7.3.0", "@types/node": "^14.0.23", "@types/react": "^16.4.12" diff --git a/examples/with-next-sitemap/package.json b/examples/with-next-sitemap/package.json index 3eabaec079718..a31447348f9d4 100644 --- a/examples/with-next-sitemap/package.json +++ b/examples/with-next-sitemap/package.json @@ -16,6 +16,7 @@ "devDependencies": { "@types/node": "14.6.0", "@types/react": "^16.9.45", - "next-sitemap": "latest" + "next-sitemap": "latest", + "typescript": "^4.3.2" } } diff --git a/examples/with-orbit-components/package.json b/examples/with-orbit-components/package.json index 5896bd0f6e723..abe5532dc77e1 100644 --- a/examples/with-orbit-components/package.json +++ b/examples/with-orbit-components/package.json @@ -11,7 +11,7 @@ "next": "latest", "react": "^16.7.0", "react-dom": "^16.7.0", - "styled-components": "^4.0.0" + "styled-components": "^5.3.0" }, "devDependencies": { "@kiwicom/babel-plugin-orbit-components": "latest", diff --git a/examples/with-react-md-typescript/tsconfig.json b/examples/with-react-md-typescript/tsconfig.json index c65399cb28e5d..93a83a407c40c 100644 --- a/examples/with-react-md-typescript/tsconfig.json +++ b/examples/with-react-md-typescript/tsconfig.json @@ -1,23 +1,19 @@ { "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, - "alwaysStrict": true, - "esModuleInterop": true, + "skipLibCheck": true, + "strict": false, "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "jsx": "preserve", - "lib": ["dom", "es2017"], + "noEmit": true, + "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "esnext" + "isolatedModules": true, + "jsx": "preserve" }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.tsx"] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/examples/with-react-relay-network-modern/.babelrc b/examples/with-react-relay-network-modern/.babelrc deleted file mode 100644 index f2926a3cc64c6..0000000000000 --- a/examples/with-react-relay-network-modern/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": ["next/babel"], - "plugins": [["relay", { "artifactDirectory": "__generated__" }]] -} diff --git a/examples/with-react-relay-network-modern/.env b/examples/with-react-relay-network-modern/.env deleted file mode 100644 index d54ff189f6c02..0000000000000 --- a/examples/with-react-relay-network-modern/.env +++ /dev/null @@ -1 +0,0 @@ -NEXT_PUBLIC_RELAY_ENDPOINT=https://nextjs-graphql-with-prisma-relay.vercel.app/api diff --git a/examples/with-react-relay-network-modern/.gitignore b/examples/with-react-relay-network-modern/.gitignore deleted file mode 100644 index c86f6fff985cc..0000000000000 --- a/examples/with-react-relay-network-modern/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env.local -.env.development.local -.env.test.local -.env.production.local - -# vercel -.vercel - -# relay -__generated__/ -schema/schema.graphql diff --git a/examples/with-react-relay-network-modern/.graphqlconfig b/examples/with-react-relay-network-modern/.graphqlconfig deleted file mode 100644 index f973e3a39dead..0000000000000 --- a/examples/with-react-relay-network-modern/.graphqlconfig +++ /dev/null @@ -1,8 +0,0 @@ -{ - "schemaPath": "schema/schema.graphql", - "extensions": { - "endpoints": { - "dev": "https://nextjs-graphql-with-prisma-relay.vercel.app/api" - } - } -} \ No newline at end of file diff --git a/examples/with-react-relay-network-modern/README.md b/examples/with-react-relay-network-modern/README.md deleted file mode 100644 index 7684104bb8e8b..0000000000000 --- a/examples/with-react-relay-network-modern/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Relay Modern Example - -[Relay Modern](https://relay.dev/) is a new version of Relay designed from the ground up to be easier to use, more extensible and, most of all, able to improve performance on mobile devices. Relay Modern accomplishes this with static queries and ahead-of-time code generation. - -This example relies on [Prisma + Nexus](https://github.com/prisma-labs/nextjs-graphql-api-examples) for its GraphQL backend. - -## Deploy your own - -Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-react-relay-network-modern&project-name=with-react-relay-network-modern&repository-name=with-react-relay-network-modern) - -## How to use - -Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: - -```bash -npx create-next-app --example with-react-relay-network-modern with-react-relay-network-modern-app -# or -yarn create next-app --example with-react-relay-network-modern with-react-relay-network-modern-app -``` - -Download schema introspection data from configured Relay endpoint - -```bash -npm run schema -# or -yarn schema -``` - -Run Relay ahead-of-time compilation (should be re-run after any edits to components that query data with Relay) - -```bash -npm run relay -# or -yarn relay -``` - -Run the project - -```bash -npm run dev -# or -yarn dev -``` - -Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-relay-network-modern/components/BlogPostPreview.js b/examples/with-react-relay-network-modern/components/BlogPostPreview.js deleted file mode 100644 index dd1619dbb195e..0000000000000 --- a/examples/with-react-relay-network-modern/components/BlogPostPreview.js +++ /dev/null @@ -1,14 +0,0 @@ -import { createFragmentContainer, graphql } from 'react-relay' - -const BlogPostPreview = ({ post }) => { - return

{post.title}
-} - -export default createFragmentContainer(BlogPostPreview, { - post: graphql` - fragment BlogPostPreview_post on BlogPost { - id - title - } - `, -}) diff --git a/examples/with-react-relay-network-modern/components/BlogPosts.js b/examples/with-react-relay-network-modern/components/BlogPosts.js deleted file mode 100644 index bcd3ca2944aeb..0000000000000 --- a/examples/with-react-relay-network-modern/components/BlogPosts.js +++ /dev/null @@ -1,26 +0,0 @@ -import { createFragmentContainer, graphql } from 'react-relay' -import BlogPostPreview from './BlogPostPreview' - -const BlogPosts = ({ viewer }) => ( -
-

Blog posts

- {viewer.allBlogPosts?.edges.map(({ node }) => ( - - ))} -
-) - -export default createFragmentContainer(BlogPosts, { - viewer: graphql` - fragment BlogPosts_viewer on Viewer { - allBlogPosts(first: 10, orderBy: { createdAt: desc }) { - edges { - node { - ...BlogPostPreview_post - id - } - } - } - } - `, -}) diff --git a/examples/with-react-relay-network-modern/lib/createEnvironment/client.js b/examples/with-react-relay-network-modern/lib/createEnvironment/client.js deleted file mode 100644 index ae31eaa715d19..0000000000000 --- a/examples/with-react-relay-network-modern/lib/createEnvironment/client.js +++ /dev/null @@ -1,36 +0,0 @@ -import { - RelayNetworkLayer, - cacheMiddleware, - urlMiddleware, -} from 'react-relay-network-modern/node8' -import RelaySSR from 'react-relay-network-modern-ssr/node8/client' -import { Environment, RecordSource, Store } from 'relay-runtime' - -const source = new RecordSource() -const store = new Store(source) - -let storeEnvironment = null - -export default { - createEnvironment: (relayData) => { - if (storeEnvironment) return storeEnvironment - - storeEnvironment = new Environment({ - store, - network: new RelayNetworkLayer([ - cacheMiddleware({ - size: 100, - ttl: 60 * 1000, - }), - new RelaySSR(relayData).getMiddleware({ - lookup: false, - }), - urlMiddleware({ - url: (req) => process.env.NEXT_PUBLIC_RELAY_ENDPOINT, - }), - ]), - }) - - return storeEnvironment - }, -} diff --git a/examples/with-react-relay-network-modern/lib/createEnvironment/index.js b/examples/with-react-relay-network-modern/lib/createEnvironment/index.js deleted file mode 100644 index 217178c8ade2c..0000000000000 --- a/examples/with-react-relay-network-modern/lib/createEnvironment/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export const { initEnvironment, createEnvironment } = (typeof window === -'undefined' - ? require('./server') - : require('./client') -).default diff --git a/examples/with-react-relay-network-modern/lib/createEnvironment/server.js b/examples/with-react-relay-network-modern/lib/createEnvironment/server.js deleted file mode 100644 index 72f162996826b..0000000000000 --- a/examples/with-react-relay-network-modern/lib/createEnvironment/server.js +++ /dev/null @@ -1,36 +0,0 @@ -import { - RelayNetworkLayer, - urlMiddleware, -} from 'react-relay-network-modern/node8' -import RelaySSR from 'react-relay-network-modern-ssr/node8/server' -import { Network, Environment, RecordSource, Store } from 'relay-runtime' - -export default { - initEnvironment: () => { - const source = new RecordSource() - const store = new Store(source) - const relaySSR = new RelaySSR() - - return { - relaySSR, - environment: new Environment({ - store, - network: new RelayNetworkLayer([ - urlMiddleware({ - url: (req) => process.env.NEXT_PUBLIC_RELAY_ENDPOINT, - }), - relaySSR.getMiddleware(), - ]), - }), - } - }, - createEnvironment: (relayData) => { - const source = new RecordSource() - const store = new Store(source) - - return new Environment({ - store, - network: Network.create(() => relayData?.[0][1] || Promise.resolve()), - }) - }, -} diff --git a/examples/with-react-relay-network-modern/package.json b/examples/with-react-relay-network-modern/package.json deleted file mode 100644 index 32695eafc3236..0000000000000 --- a/examples/with-react-relay-network-modern/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "with-react-relay-network-modern", - "version": "3.0.3", - "description": "Example of Next.js with Relay Modern and react-relay-network-modern", - "scripts": { - "dev": "next", - "build": "next build", - "start": "next start", - "relay": "relay-compiler --src ./ --exclude '**/.next/**' '**/node_modules/**' '**/test/**' '**/__generated__/**' --exclude '**/schema/**' --schema ./schema/schema.graphql --artifactDirectory __generated__", - "schema": "graphql get-schema -e dev" - }, - "author": "", - "license": "MIT", - "dependencies": { - "graphql": "^14.6.0", - "next": "latest", - "react": "^16.13.0", - "react-dom": "^16.13.0", - "react-relay": "^9.0.0", - "react-relay-network-modern": "^4.5.0", - "react-relay-network-modern-ssr": "^1.4.0", - "relay-hooks": "3.5.2" - }, - "devDependencies": { - "babel-plugin-relay": "^9.0.0", - "graphql-cli": "^3.0.11", - "relay-compiler": "^9.0.0" - } -} diff --git a/examples/with-react-relay-network-modern/pages/_app.js b/examples/with-react-relay-network-modern/pages/_app.js deleted file mode 100644 index 5709ef97a1fc6..0000000000000 --- a/examples/with-react-relay-network-modern/pages/_app.js +++ /dev/null @@ -1,13 +0,0 @@ -import { RelayEnvironmentProvider } from 'relay-hooks' - -import { createEnvironment } from '../lib/createEnvironment' - -export default function App({ Component, pageProps }) { - return ( - - - - ) -} diff --git a/examples/with-react-relay-network-modern/pages/index.js b/examples/with-react-relay-network-modern/pages/index.js deleted file mode 100644 index 917e329c70e13..0000000000000 --- a/examples/with-react-relay-network-modern/pages/index.js +++ /dev/null @@ -1,39 +0,0 @@ -import { graphql, fetchQuery } from 'react-relay' -import { useQuery } from 'relay-hooks' - -import { initEnvironment } from '../lib/createEnvironment' -import BlogPosts from '../components/BlogPosts' - -const query = graphql` - query pages_indexQuery { - viewer { - ...BlogPosts_viewer - } - } -` - -const Index = ({ environment }) => { - const { error, props } = useQuery(query) - - if (error) return
{error.message}
- - if (!props) return
Loading
- - return -} - -export async function getStaticProps() { - const { environment, relaySSR } = initEnvironment() - - await fetchQuery(environment, query) - - const relayData = (await relaySSR.getCache())?.[0] - - return { - props: { - relayData: !relayData ? null : [[relayData[0], relayData[1].json]], - }, - } -} - -export default Index diff --git a/examples/with-rebass/package.json b/examples/with-rebass/package.json index 5913c76505507..aa1b3ba2b09b8 100644 --- a/examples/with-rebass/package.json +++ b/examples/with-rebass/package.json @@ -6,14 +6,16 @@ "start": "next start" }, "dependencies": { - "babel-plugin-styled-components": "^1.1.7", - "babel-plugin-transform-object-assign": "^6.22.0", - "babel-plugin-transform-object-set-prototype-of-to-assign": "^6.22.0", "next": "latest", "react": "^16.7.0", "react-dom": "^16.7.0", "rebass": "^4.0.7", - "styled-components": "^2.1.1" + "styled-components": "^5.3.0" + }, + "devDependencies": { + "babel-plugin-styled-components": "^1.1.7", + "babel-plugin-transform-object-assign": "^6.22.0", + "babel-plugin-transform-object-set-prototype-of-to-assign": "^6.22.0" }, "license": "MIT" } diff --git a/examples/with-redux-toolkit-typescript/tsconfig.json b/examples/with-redux-toolkit-typescript/tsconfig.json index c65399cb28e5d..93a83a407c40c 100644 --- a/examples/with-redux-toolkit-typescript/tsconfig.json +++ b/examples/with-redux-toolkit-typescript/tsconfig.json @@ -1,23 +1,19 @@ { "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, - "alwaysStrict": true, - "esModuleInterop": true, + "skipLibCheck": true, + "strict": false, "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "jsx": "preserve", - "lib": ["dom", "es2017"], + "noEmit": true, + "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "esnext" + "isolatedModules": true, + "jsx": "preserve" }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.tsx"] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/examples/with-storybook-experimental/.storybook/main.js b/examples/with-storybook-experimental/.storybook/main.js new file mode 100644 index 0000000000000..09f1fc1501a3b --- /dev/null +++ b/examples/with-storybook-experimental/.storybook/main.js @@ -0,0 +1,14 @@ +module.exports = { + stories: [ + '../stories/**/*.stories.mdx', + '../stories/**/*.stories.@(js|jsx|ts|tsx)', + ], + addons: [ + '@storybook/addon-links', + '@storybook/addon-essentials', + '@next/plugin-storybook', + ], + core: { + builder: 'webpack5', + }, +} diff --git a/examples/with-storybook-experimental/.storybook/preview.js b/examples/with-storybook-experimental/.storybook/preview.js new file mode 100644 index 0000000000000..750f637c04cf5 --- /dev/null +++ b/examples/with-storybook-experimental/.storybook/preview.js @@ -0,0 +1,9 @@ +export const parameters = { + actions: { argTypesRegex: '^on[A-Z].*' }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, +} diff --git a/examples/with-storybook-experimental/README.md b/examples/with-storybook-experimental/README.md new file mode 100644 index 0000000000000..b6983397a0eb9 --- /dev/null +++ b/examples/with-storybook-experimental/README.md @@ -0,0 +1,100 @@ +# Example app with Storybook + +This example shows a default set up of Storybook that includes the same build features as Next (built-in CSS support, module path aliases...). + +/!\ This example includes experimental features. Use `with-storybook` for a simpler but safer example. + +## Webpack 5/4 + +Main version uses Webpack 5, but doesn't work. + +Use branch "with-webpack-4" for a version that works (but uses Webpack 4). + +## Local development of @next/plugin-storybook + +For development purpose, please use the latest version of `@next/plugin-storybook` from Next.js canary branch (clone Next, yarn, yarn dev). +Then link it **using yalc**. `yarn link` will cause issues with Webpack version, while Yalc simulates a local NPM registry and is closer to real install. + +```sh +# In next.js +cd packages/next-plugin-storybook +yalc publish +cd packages/next +yalc publish +# NOTE: you might also need to link packages/next the same way, in case you have unexpected errors +``` + +```sh +# In this repository +yalc link @next/plugin-storybook +yalc link next +``` + +And do this again on every local update of next-plugin-storybook. + +Then, you need to make sure you are using the version of Webpack bundled by Next + +```sh +# in this repo +cp node_modules/webpack/lib/index.js node_modules/webpack/lib/index.js.backup +cp ./.yalc/next/dist/compiled/webpack/bundle5.js node_modules/webpack/lib/index.js +``` + +## TODO + +We add example usage of Next.js core feature one at a time, and check if the `@next/plugin-storybook` supports them correctly when we run Storybook. For instance, path aliases, styled JSX, CSS modules... +If not, we must improve `@next/plugin-storybook` with relevant fixes. + +### Finish update to Webpack 5 + +This is mostly on Storybook side, Webpack 5 update is not completely stable (see https://github.com/storybookjs/storybook/issues/14044). +Currently we need resolutions to have only one version of Webpack and it doesn't seem to be enough. + +### Stabilizing @next/plugin-storybook + +See main issue here: https://github.com/vercel/next.js/issues/19345 +See absolute import issue here: https://github.com/storybookjs/storybook/issues/11639 + +### Supporting CSS modules + +They don't work out-of-the box, but they can be supported by adding relevant package in `@next/plugin-storybook` (https://github.com/vercel/next.js/issues/19345#issuecomment-758563228). + +--- + +## TypeScript + +As of v6.0, Storybook has built-in TypeScript support, so no configuration is needed. If you want to customize the default configuration, refer to the [TypeScript docs](https://storybook.js.org/docs/react/configure/typescript). + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-storybook&project-name=with-storybook&repository-name=with-storybook) + +## How to use + +Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: + +```bash +npx create-next-app --example with-storybook with-storybook-app +# or +yarn create next-app --example with-storybook with-storybook-app +``` + +### Run Storybook + +```bash +npm run storybook +# or +yarn storybook +``` + +### Build Static Storybook + +```bash +npm run build-storybook +# or +yarn build-storybook +``` + +You can use [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) to deploy Storybook. Specify `storybook-static` as the output directory. diff --git a/examples/with-storybook-experimental/components/pathAliasToLibHello.js b/examples/with-storybook-experimental/components/pathAliasToLibHello.js new file mode 100644 index 0000000000000..fc8fd56ac6268 --- /dev/null +++ b/examples/with-storybook-experimental/components/pathAliasToLibHello.js @@ -0,0 +1,5 @@ +import helloWorld from '@/hello' + +export default function PathAliasToLibHello() { + return
Value imported from path alias "@/hello": {helloWorld}
+} diff --git a/examples/with-storybook-experimental/jsconfig.json b/examples/with-storybook-experimental/jsconfig.json new file mode 100644 index 0000000000000..8ae13e1a4edf3 --- /dev/null +++ b/examples/with-storybook-experimental/jsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["lib/*"] + } + } +} diff --git a/examples/with-storybook-experimental/lib/hello.js b/examples/with-storybook-experimental/lib/hello.js new file mode 100644 index 0000000000000..c0ec8f5c17d24 --- /dev/null +++ b/examples/with-storybook-experimental/lib/hello.js @@ -0,0 +1 @@ +export default 'Hello world' diff --git a/examples/with-storybook-experimental/package.json b/examples/with-storybook-experimental/package.json new file mode 100644 index 0000000000000..60f8816e75ccc --- /dev/null +++ b/examples/with-storybook-experimental/package.json @@ -0,0 +1,38 @@ +{ + "name": "with-storybook", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start", + "storybook": "start-storybook -p 6006", + "build-storybook": "build-storybook" + }, + "dependencies": { + "next": "latest", + "react": "^16.7.0", + "react-dom": "^16.7.0" + }, + "license": "MIT", + "devDependencies": { + "@babel/core": "^7.14.0", + "@next/plugin-storybook": "^10.2.1-canary.2", + "@storybook/addon-actions": "^6.3.0-alpha.19", + "@storybook/addon-essentials": "^6.3.0-alpha.19", + "@storybook/addon-links": "^6.3.0-alpha.19", + "@storybook/builder-webpack5": "^6.3.0-alpha.19", + "@storybook/react": "^6.2.9", + "babel-loader": "^8.0.5" + }, + "resolutions": { + "css-loader": "^5.0.0", + "dotenv-webpack": "^7.0.0", + "html-webpack-plugin": "^5.0.0", + "style-loader": "^2.0.0", + "terser-webpack-plugin": "^5.0.0", + "webpack": "^5.24.0", + "webpack-dev-middleware": "^4.1.0", + "webpack-virtual-modules": "^0.4.2" + } +} diff --git a/examples/with-storybook-experimental/pages/index.js b/examples/with-storybook-experimental/pages/index.js new file mode 100644 index 0000000000000..aa7559b5503cc --- /dev/null +++ b/examples/with-storybook-experimental/pages/index.js @@ -0,0 +1,10 @@ +import HelloWorld from '../components/pathAliasToLibHello' + +export default function Home() { + return ( +
+

Simple Storybook Example

+ +
+ ) +} diff --git a/examples/with-storybook-experimental/stories/pathAliasInComponent.stories.js b/examples/with-storybook-experimental/stories/pathAliasInComponent.stories.js new file mode 100644 index 0000000000000..32620c5e066de --- /dev/null +++ b/examples/with-storybook-experimental/stories/pathAliasInComponent.stories.js @@ -0,0 +1,7 @@ +import React from 'react' +// Expected: this should build despite HelloWorld using a path alias to hello +import PathAliasToLibHello from '../components/pathAliasToLibHello' + +export default { title: 'Hello World' } + +export const simpleComponent = () => diff --git a/examples/with-storybook-experimental/stories/welcome.stories.js b/examples/with-storybook-experimental/stories/welcome.stories.js new file mode 100644 index 0000000000000..2466b9882ddfc --- /dev/null +++ b/examples/with-storybook-experimental/stories/welcome.stories.js @@ -0,0 +1,7 @@ +import React from 'react' +import { linkTo } from '@storybook/addon-links' +import { Welcome } from '@storybook/react/demo' + +export default { title: 'Welcome' } + +export const toStorybook = () => diff --git a/examples/with-typescript-graphql/tsconfig.json b/examples/with-typescript-graphql/tsconfig.json index c65399cb28e5d..93a83a407c40c 100644 --- a/examples/with-typescript-graphql/tsconfig.json +++ b/examples/with-typescript-graphql/tsconfig.json @@ -1,23 +1,19 @@ { "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, - "alwaysStrict": true, - "esModuleInterop": true, + "skipLibCheck": true, + "strict": false, "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "jsx": "preserve", - "lib": ["dom", "es2017"], + "noEmit": true, + "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "esnext" + "isolatedModules": true, + "jsx": "preserve" }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.tsx"] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/examples/with-typescript-types/tsconfig.json b/examples/with-typescript-types/tsconfig.json index c65399cb28e5d..93a83a407c40c 100644 --- a/examples/with-typescript-types/tsconfig.json +++ b/examples/with-typescript-types/tsconfig.json @@ -1,23 +1,19 @@ { "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, - "alwaysStrict": true, - "esModuleInterop": true, + "skipLibCheck": true, + "strict": false, "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "jsx": "preserve", - "lib": ["dom", "es2017"], + "noEmit": true, + "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "esnext" + "isolatedModules": true, + "jsx": "preserve" }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.tsx"] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/examples/with-typescript/tsconfig.json b/examples/with-typescript/tsconfig.json index c65399cb28e5d..93a83a407c40c 100644 --- a/examples/with-typescript/tsconfig.json +++ b/examples/with-typescript/tsconfig.json @@ -1,23 +1,19 @@ { "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, - "alwaysStrict": true, - "esModuleInterop": true, + "skipLibCheck": true, + "strict": false, "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "jsx": "preserve", - "lib": ["dom", "es2017"], + "noEmit": true, + "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "esnext" + "isolatedModules": true, + "jsx": "preserve" }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.tsx"] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/examples/with-zustand/lib/store.js b/examples/with-zustand/lib/store.js index 49bc825adc535..75d296fa78ffa 100644 --- a/examples/with-zustand/lib/store.js +++ b/examples/with-zustand/lib/store.js @@ -10,7 +10,11 @@ const initialState = { count: 0, } -export const { Provider, useStore } = createContext(initialState) +const zustandContext = createContext() +export const Provider = zustandContext.Provider +// An example of how to get types +/** @type {import('zustand/index').UseStore} */ +export const useStore = zustandContext.useStore export const initializeStore = (preloadedState = {}) => { return create((set, get) => ({ diff --git a/examples/with-zustand/package.json b/examples/with-zustand/package.json index 1440d8d38a974..7397c5e62c877 100644 --- a/examples/with-zustand/package.json +++ b/examples/with-zustand/package.json @@ -10,7 +10,7 @@ "next": "latest", "react": "^16.9.0", "react-dom": "^16.9.0", - "zustand": "3.5.0" + "zustand": "3.5.1" }, "license": "MIT" } diff --git a/lerna.json b/lerna.json index 2b9cd8b70f1f3..2f04e0ba6c120 100644 --- a/lerna.json +++ b/lerna.json @@ -17,5 +17,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "10.2.4-canary.0" + "version": "10.2.4-canary.7" } diff --git a/package.json b/package.json index f18d52d1e1296..b3ac6631f0316 100644 --- a/package.json +++ b/package.json @@ -110,8 +110,8 @@ "prettier": "2.0.5", "pretty-bytes": "5.3.0", "pretty-ms": "7.0.0", - "react": "17.0.1", - "react-dom": "17.0.1", + "react": "17.0.2", + "react-dom": "17.0.2", "react-ssr-prepass": "1.0.8", "release": "6.3.0", "request-promise-core": "1.1.2", @@ -138,6 +138,6 @@ "caniuse-lite": "1.0.30001228" }, "engines": { - "node": ">= 10.13.0" + "node": ">=12.0.0" } } diff --git a/packages/create-next-app/create-app.ts b/packages/create-next-app/create-app.ts index b4b5eaa7f60bf..f2d424a88eda7 100644 --- a/packages/create-next-app/create-app.ts +++ b/packages/create-next-app/create-app.ts @@ -187,6 +187,7 @@ export async function createApp({ dev: 'next dev', build: 'next build', start: 'next start', + lint: 'next lint', }, } /** @@ -207,7 +208,7 @@ export async function createApp({ /** * Default devDependencies. */ - const devDependencies = [] + const devDependencies = ['eslint', 'eslint-config-next'] /** * TypeScript projects will have type definitions and other devDependencies. */ @@ -250,7 +251,8 @@ export async function createApp({ cwd: path.join(__dirname, 'templates', template), rename: (name) => { switch (name) { - case 'gitignore': { + case 'gitignore': + case 'eslintrc': { return '.'.concat(name) } // README.md is ignored by webpack-asset-relocator-loader used by ncc: diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 7566b0570cde9..cbef6431db613 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "keywords": [ "react", "next", @@ -48,6 +48,6 @@ "validate-npm-package-name": "3.0.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=12.0.0" } } diff --git a/packages/create-next-app/templates/default/eslintrc b/packages/create-next-app/templates/default/eslintrc new file mode 100644 index 0000000000000..97a2bb84efb39 --- /dev/null +++ b/packages/create-next-app/templates/default/eslintrc @@ -0,0 +1,3 @@ +{ + "extends": ["next", "next/core-web-vitals"] +} diff --git a/packages/create-next-app/templates/default/next.config.js b/packages/create-next-app/templates/default/next.config.js new file mode 100644 index 0000000000000..0d6071006ab35 --- /dev/null +++ b/packages/create-next-app/templates/default/next.config.js @@ -0,0 +1,3 @@ +module.exports = { + reactStrictMode: true, +} diff --git a/packages/create-next-app/templates/default/pages/api/hello.js b/packages/create-next-app/templates/default/pages/api/hello.js index 9987aff4c39a9..df63de88fa67c 100644 --- a/packages/create-next-app/templates/default/pages/api/hello.js +++ b/packages/create-next-app/templates/default/pages/api/hello.js @@ -1,5 +1,5 @@ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction -export default (req, res) => { +export default function handler(req, res) { res.status(200).json({ name: 'John Doe' }) } diff --git a/packages/create-next-app/templates/typescript/README-template.md b/packages/create-next-app/templates/typescript/README-template.md index b12f3e33e7d5b..384991c969b20 100644 --- a/packages/create-next-app/templates/typescript/README-template.md +++ b/packages/create-next-app/templates/typescript/README-template.md @@ -12,9 +12,9 @@ yarn dev Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.tsx`. The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. diff --git a/packages/create-next-app/templates/typescript/eslintrc b/packages/create-next-app/templates/typescript/eslintrc new file mode 100644 index 0000000000000..97a2bb84efb39 --- /dev/null +++ b/packages/create-next-app/templates/typescript/eslintrc @@ -0,0 +1,3 @@ +{ + "extends": ["next", "next/core-web-vitals"] +} diff --git a/packages/create-next-app/templates/typescript/next.config.js b/packages/create-next-app/templates/typescript/next.config.js new file mode 100644 index 0000000000000..0d6071006ab35 --- /dev/null +++ b/packages/create-next-app/templates/typescript/next.config.js @@ -0,0 +1,3 @@ +module.exports = { + reactStrictMode: true, +} diff --git a/packages/create-next-app/templates/typescript/pages/api/hello.ts b/packages/create-next-app/templates/typescript/pages/api/hello.ts index 3d66af99d6010..f8bcc7e5caed1 100644 --- a/packages/create-next-app/templates/typescript/pages/api/hello.ts +++ b/packages/create-next-app/templates/typescript/pages/api/hello.ts @@ -5,6 +5,9 @@ type Data = { name: string } -export default (req: NextApiRequest, res: NextApiResponse) => { +export default function handler( + req: NextApiRequest, + res: NextApiResponse +) { res.status(200).json({ name: 'John Doe' }) } diff --git a/packages/create-next-app/tsconfig.json b/packages/create-next-app/tsconfig.json index aad5b046673d5..e4edad9e127c7 100644 --- a/packages/create-next-app/tsconfig.json +++ b/packages/create-next-app/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2015", + "target": "es2019", "moduleResolution": "node", "strict": true, "resolveJsonModule": true, diff --git a/packages/eslint-config-next/core-web-vitals.js b/packages/eslint-config-next/core-web-vitals.js new file mode 100644 index 0000000000000..d81198b1893b8 --- /dev/null +++ b/packages/eslint-config-next/core-web-vitals.js @@ -0,0 +1,8 @@ +module.exports = { + extends: ['.'].map(require.resolve), + rules: { + '@next/next/no-sync-scripts': 2, + '@next/next/no-html-link-for-pages': 2, + '@next/next/no-img-element': 2, + }, +} diff --git a/packages/eslint-config-next/index.js b/packages/eslint-config-next/index.js index 8665d56e431c8..2d8c7a9902e4e 100644 --- a/packages/eslint-config-next/index.js +++ b/packages/eslint-config-next/index.js @@ -12,10 +12,18 @@ module.exports = { 'plugin:react-hooks/recommended', 'plugin:@next/next/recommended', ], - plugins: ['import', 'react'], + plugins: ['import', 'react', 'jsx-a11y'], rules: { 'import/no-anonymous-default-export': 'warn', 'react/react-in-jsx-scope': 'off', + 'react/prop-types': 'off', + 'jsx-a11y/alt-text': [ + 'warn', + { + elements: ['img'], + img: ['Image'], + }, + ], }, parser: './parser.js', parserOptions: { diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 6cb76a007f975..ac36fa6ea4bf6 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "description": "ESLint configuration used by NextJS.", "main": "index.js", "license": "MIT", @@ -9,11 +9,12 @@ "directory": "packages/eslint-config-next" }, "dependencies": { - "@next/eslint-plugin-next": "10.2.4-canary.0", + "@next/eslint-plugin-next": "10.2.4-canary.7", "@rushstack/eslint-patch": "^1.0.6", "@typescript-eslint/parser": "^4.20.0", "eslint-import-resolver-node": "^0.3.4", "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-react": "^7.23.1", "eslint-plugin-react-hooks": "^4.2.0" }, diff --git a/packages/eslint-plugin-next/lib/rules/no-document-import-in-page.js b/packages/eslint-plugin-next/lib/rules/no-document-import-in-page.js index f7fa6fdd2e301..bba5b36fdb31a 100644 --- a/packages/eslint-plugin-next/lib/rules/no-document-import-in-page.js +++ b/packages/eslint-plugin-next/lib/rules/no-document-import-in-page.js @@ -16,7 +16,7 @@ module.exports = { } const page = context.getFilename().split('pages')[1] - if (!page || path.parse(page).name === '_document') { + if (!page || path.parse(page).name.startsWith('_document')) { return } diff --git a/packages/eslint-plugin-next/lib/rules/no-head-import-in-document.js b/packages/eslint-plugin-next/lib/rules/no-head-import-in-document.js index 9da89fc59aa1c..4184cc98cba1f 100644 --- a/packages/eslint-plugin-next/lib/rules/no-head-import-in-document.js +++ b/packages/eslint-plugin-next/lib/rules/no-head-import-in-document.js @@ -15,7 +15,7 @@ module.exports = { } const document = context.getFilename().split('pages')[1] - if (!document || path.parse(document).name !== '_document') { + if (!document || !path.parse(document).name.startsWith('_document')) { return } diff --git a/packages/eslint-plugin-next/lib/rules/no-sync-scripts.js b/packages/eslint-plugin-next/lib/rules/no-sync-scripts.js index c4103525dae3c..fb4326c19fb50 100644 --- a/packages/eslint-plugin-next/lib/rules/no-sync-scripts.js +++ b/packages/eslint-plugin-next/lib/rules/no-sync-scripts.js @@ -18,7 +18,7 @@ module.exports = function (context) { context.report({ node, message: - 'Synchronous scripts are forbidden. See: https://nextjs.org/docs/messages/no-sync-scripts.', + 'External synchronous scripts are forbidden. See: https://nextjs.org/docs/messages/no-sync-scripts.', }) } }, diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 13be56e9199a1..e28da01e565bc 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "description": "ESLint plugin for NextJS.", "main": "lib/index.js", "license": "MIT", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 4090a281b7aa6..00db989750077 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index df7a591542a83..b2be4dac21257 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "license": "MIT", "dependencies": { "chalk": "4.1.0", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 708f85bb523f2..de40d07519df5 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index e22b029e53b68..d300e9fa44710 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index a41c2ac4deb8b..91e24d19adee9 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index 389511147dad9..4df884177f1b9 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index a4641cfd09080..2061659752afd 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/bin/next.ts b/packages/next/bin/next.ts index a81a185983e6c..13279f0dda78b 100755 --- a/packages/next/bin/next.ts +++ b/packages/next/bin/next.ts @@ -20,6 +20,7 @@ const commands: { [command: string]: () => Promise } = { start: () => import('../cli/next-start').then((i) => i.nextStart), export: () => import('../cli/next-export').then((i) => i.nextExport), dev: () => import('../cli/next-dev').then((i) => i.nextDev), + lint: () => import('../cli/next-lint').then((i) => i.nextLint), telemetry: () => import('../cli/next-telemetry').then((i) => i.nextTelemetry), } diff --git a/packages/next/build/babel/loader/get-config.ts b/packages/next/build/babel/loader/get-config.ts index 73bdb3df97bcc..22be2e05fb181 100644 --- a/packages/next/build/babel/loader/get-config.ts +++ b/packages/next/build/babel/loader/get-config.ts @@ -156,29 +156,10 @@ function getCustomBabelConfig(configFilePath: string) { return require(configFilePath) } throw new Error( - 'The Next Babel loader does not support MJS or CJS config files.' + 'The Next.js Babel loader does not support .mjs or .cjs config files.' ) } -function getCustomPresets(presets: any[], customConfig: any) { - presets = [...presets, ...customConfig?.presets] - - const hasNextBabelPreset = (customConfig?.presets || []) - .filter((preset: any) => { - return ( - preset === 'next/babel' || - (Array.isArray(preset) && preset[0] === 'next/babel') - ) - }) - .reduce((memo: boolean, presetFound: boolean) => memo || presetFound, false) - - if (!hasNextBabelPreset) { - presets.push('next/babel') - } - - return presets -} - /** * Generate a new, flat Babel config, ready to be handed to Babel-traverse. * This config should have no unresolved overrides, presets, etc. @@ -192,7 +173,6 @@ function getFreshConfig( inputSourceMap?: object | null ) { let { - presets = [], isServer, pagesDir, development, @@ -200,17 +180,15 @@ function getFreshConfig( configFile, } = loaderOptions - let customPlugins = [] + // Ensures webpack invalidates the cache for this loader when the config file changes if (configFile) { - const customConfig = getCustomBabelConfig(configFile) - presets = getCustomPresets(presets, customConfig) - if (customConfig.plugins) { - customPlugins = customConfig.plugins - } - } else { - presets = [...presets, 'next/babel'] + this.addDependency(configFile) } + let customConfig: any = configFile + ? getCustomBabelConfig(configFile) + : undefined + let options = { babelrc: false, cloneInputAst: false, @@ -231,10 +209,28 @@ function getFreshConfig( plugins: [ ...getPlugins(loaderOptions, cacheCharacteristics), - ...customPlugins, + ...(customConfig?.plugins || []), ], - presets, + // target can be provided in babelrc + target: isServer ? undefined : customConfig?.target, + // env can be provided in babelrc + env: customConfig?.env, + + presets: (() => { + // If presets is defined the user will have next/babel in their babelrc + if (customConfig?.presets) { + return customConfig.presets + } + + // If presets is not defined the user will likely have "env" in their babelrc + if (customConfig) { + return undefined + } + + // If no custom config is provided the default is to use next/babel + return ['next/babel'] + })(), overrides: loaderOptions.overrides, @@ -261,6 +257,11 @@ function getFreshConfig( }, } as any + // Babel does strict checks on the config so undefined is not allowed + if (typeof options.target === 'undefined') { + delete options.target + } + Object.defineProperty(options.caller, 'onWarning', { enumerable: false, writable: false, @@ -309,8 +310,8 @@ export default function getConfig( this: NextJsLoaderContext, { source, - loaderOptions, target, + loaderOptions, filename, inputSourceMap, }: { diff --git a/packages/next/build/babel/loader/types.d.ts b/packages/next/build/babel/loader/types.d.ts index 6b5856bb83dbc..200a4780f3bca 100644 --- a/packages/next/build/babel/loader/types.d.ts +++ b/packages/next/build/babel/loader/types.d.ts @@ -11,7 +11,6 @@ export interface NextBabelLoaderOptions { isServer: boolean development: boolean pagesDir: string - presets: any[] sourceMaps?: any[] overrides: any caller: any diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index d9c6a555025d6..e5c44640df2e9 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -119,7 +119,8 @@ export default async function build( dir: string, conf = null, reactProductionProfiling = false, - debugOutput = false + debugOutput = false, + runLint = true ): Promise { const nextBuildSpan = trace('next-build') @@ -212,13 +213,12 @@ export default async function build( typeCheckingSpinner.stopAndPersist() } - if (config.experimental.eslint) { + if (runLint) { await nextBuildSpan .traceChild('verify-and-lint') .traceAsyncFn(async () => { await verifyAndLint( dir, - pagesDir, config.experimental.cpus, config.experimental.workerThreads ) @@ -543,33 +543,25 @@ export default async function build( const webpackBuildStart = process.hrtime() let result: CompilerResult = { warnings: [], errors: [] } - // We run client and server compilation separately when configured for - // memory constraint and for serverless to be able to load manifests - // produced in the client build - if (isLikeServerless || config.experimental.serialWebpackBuild) { - await nextBuildSpan - .traceChild('run-webpack-compiler') - .traceAsyncFn(async () => { - const clientResult = await runCompiler(clientConfig) - // Fail build if clientResult contains errors - if (clientResult.errors.length > 0) { - result = { - warnings: [...clientResult.warnings], - errors: [...clientResult.errors], - } - } else { - const serverResult = await runCompiler(configs[1]) - result = { - warnings: [...clientResult.warnings, ...serverResult.warnings], - errors: [...clientResult.errors, ...serverResult.errors], - } + // We run client and server compilation separately to optimize for memory usage + await nextBuildSpan + .traceChild('run-webpack-compiler') + .traceAsyncFn(async () => { + const clientResult = await runCompiler(clientConfig) + // Fail build if clientResult contains errors + if (clientResult.errors.length > 0) { + result = { + warnings: [...clientResult.warnings], + errors: [...clientResult.errors], } - }) - } else { - result = await nextBuildSpan - .traceChild('run-webpack-compiler') - .traceAsyncFn(() => runCompiler(configs)) - } + } else { + const serverResult = await runCompiler(configs[1]) + result = { + warnings: [...clientResult.warnings, ...serverResult.warnings], + errors: [...clientResult.errors, ...serverResult.errors], + } + } + }) const webpackBuildEnd = process.hrtime(webpackBuildStart) if (buildSpinner) { diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 07c9eb6506092..c1ddc1ce1234e 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -51,6 +51,7 @@ import WebpackConformancePlugin, { ReactSyncScriptsConformanceCheck, } from './webpack/plugins/webpack-conformance-plugin' import { WellKnownErrorsPlugin } from './webpack/plugins/wellknown-errors-plugin' +import { regexLikeCss } from './webpack/config/blocks/css' type ExcludesFalse = (x: T | false) => x is T @@ -260,7 +261,9 @@ export default async function getBaseWebpackConfig( const distDir = path.join(dir, config.distDir) - const babelLoader = config.experimental.turboMode + // Webpack 5 can use the faster babel loader, webpack 5 has built-in caching for loaders + // For webpack 4 the old loader is used as it has external caching + const babelLoader = isWebpack5 ? require.resolve('./babel/loader/index') : 'next-babel-loader' const defaultLoaders = { @@ -833,7 +836,7 @@ export default async function getBaseWebpackConfig( checkWasmTypes: false, nodeEnv: false, splitChunks: isServer - ? isWebpack5 + ? isWebpack5 && !dev ? ({ filename: '[name].js', // allow to split entrypoints @@ -919,6 +922,9 @@ export default async function getBaseWebpackConfig( }, } : {}), + // we must set publicPath to an empty value to override the default of + // auto which doesn't work in IE11 + publicPath: '', path: isServer && isWebpack5 && !dev ? path.join(outputPath, 'chunks') @@ -959,6 +965,7 @@ export default async function getBaseWebpackConfig( 'error-loader', 'next-babel-loader', 'next-client-pages-loader', + 'next-image-loader', 'next-serverless-loader', 'noop-loader', 'next-style-loader', @@ -1007,6 +1014,16 @@ export default async function getBaseWebpackConfig( ] : defaultLoaders.babel, }, + ...(!config.images.disableStaticImages && isWebpack5 + ? [ + { + test: /\.(png|svg|jpg|jpeg|gif|webp|ico|bmp)$/i, + loader: 'next-image-loader', + issuer: { not: regexLikeCss }, + dependency: { not: ['url'] }, + }, + ] + : []), ].filter(Boolean), }, plugins: [ @@ -1081,9 +1098,6 @@ export default async function getBaseWebpackConfig( 'process.env.__NEXT_OPTIMIZE_CSS': JSON.stringify( config.experimental.optimizeCss && !dev ), - 'process.env.__NEXT_SCRIPT_LOADER': JSON.stringify( - !!config.experimental.scriptLoader - ), 'process.env.__NEXT_SCROLL_RESTORATION': JSON.stringify( config.experimental.scrollRestoration ), @@ -1098,7 +1112,6 @@ export default async function getBaseWebpackConfig( domains: config.images.domains, } : {}), - enableBlurryPlaceholder: config.experimental.enableBlurryPlaceholder, }), 'process.env.__NEXT_ROUTER_BASEPATH': JSON.stringify(config.basePath), 'process.env.__NEXT_HAS_REWRITES': JSON.stringify(hasRewrites), diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index 94adc75714faf..b4a60cc021282 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -14,7 +14,7 @@ import { import { getPostCssPlugins } from './plugins' // RegExps for all Style Sheet variants -const regexLikeCss = /\.(css|scss|sass)(\.webpack\[javascript\/auto\])?$/ +export const regexLikeCss = /\.(css|scss|sass)(\.webpack\[javascript\/auto\])?$/ // RegExps for Style Sheets const regexCssGlobal = /(?= imageSize.height + ? { type: 'resize', width: PLACEHOLDER_SIZE } + : { type: 'resize', height: PLACEHOLDER_SIZE } + const resizedImage = await processBuffer( + content, + [resizeOperationOpts], + extension, + 0 + ) + placeholder = `data:image/${extension};base64,${resizedImage.toString( + 'base64' + )}` + } + + const stringifiedData = JSON.stringify({ + src: '/_next' + interpolatedName, + height: imageSize.height, + width: imageSize.width, + placeholder, + }) + + this.emitFile(interpolatedName, content, null) + + return `${'export default '} ${stringifiedData};` +} +export const raw = true +export default nextImageLoader diff --git a/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts b/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts index 043c09ca91b29..a3fff7d54fa99 100644 --- a/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts +++ b/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts @@ -106,7 +106,7 @@ export class FontStylesheetGatheringPlugin { !props.rel || props.rel !== 'stylesheet' || !props.href || - !OPTIMIZED_FONT_PROVIDERS.some((url) => + !OPTIMIZED_FONT_PROVIDERS.some(({ url }) => props.href.startsWith(url) ) ) { diff --git a/packages/next/bundles/package.json b/packages/next/bundles/package.json index fed77d8d11ee4..78423b69b14e7 100644 --- a/packages/next/bundles/package.json +++ b/packages/next/bundles/package.json @@ -1,8 +1,8 @@ { "dependencies": { "schema-utils3": "npm:schema-utils@3.0.0", - "webpack-sources2": "npm:webpack-sources@2.2.0", - "webpack5": "npm:webpack@5" + "webpack-sources2": "npm:webpack-sources@2.3.0", + "webpack5": "npm:webpack@5.38.1" }, "resolutions": { "browserslist": "4.16.6", diff --git a/packages/next/bundles/yarn.lock b/packages/next/bundles/yarn.lock index 2ae38b990014f..597b7f562201a 100644 --- a/packages/next/bundles/yarn.lock +++ b/packages/next/bundles/yarn.lock @@ -243,7 +243,7 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -eslint-scope@^5.1.1: +eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -453,27 +453,26 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -watchpack@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.1.tgz#e99630550fca07df9f90a06056987baa40a689c7" - integrity sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw== +watchpack@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce" + integrity sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" -"webpack-sources2@npm:webpack-sources@2.2.0", webpack-sources@^2.1.1: - name webpack-sources2 - version "2.2.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.2.0.tgz#058926f39e3d443193b6c31547229806ffd02bac" - integrity sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w== +"webpack-sources2@npm:webpack-sources@2.3.0", webpack-sources@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.0.tgz#9ed2de69b25143a4c18847586ad9eccb19278cfa" + integrity sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ== dependencies: source-list-map "^2.0.1" source-map "^0.6.1" -"webpack5@npm:webpack@5": - version "5.37.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.37.0.tgz#2ab00f613faf494504eb2beef278dab7493cc39d" - integrity sha512-yvdhgcI6QkQkDe1hINBAJ1UNevqNGTVaCkD2SSJcB8rcrNNl922RI8i2DXUAuNfANoxwsiXXEA4ZPZI9q2oGLA== +"webpack5@npm:webpack@5.38.1": + version "5.38.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.38.1.tgz#5224c7f24c18e729268d3e3bc97240d6e880258e" + integrity sha512-OqRmYD1OJbHZph6RUMD93GcCZy4Z4wC0ele4FXyYF0J6AxO1vOSuIlU1hkS/lDlR9CDYBz64MZRmdbdnFFoT2g== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.47" @@ -485,7 +484,7 @@ watchpack@^2.0.0: chrome-trace-event "^1.0.2" enhanced-resolve "^5.8.0" es-module-lexer "^0.4.0" - eslint-scope "^5.1.1" + eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" graceful-fs "^4.2.4" @@ -496,8 +495,8 @@ watchpack@^2.0.0: schema-utils "^3.0.0" tapable "^2.1.1" terser-webpack-plugin "^5.1.1" - watchpack "^2.0.0" - webpack-sources "^2.1.1" + watchpack "^2.2.0" + webpack-sources "^2.3.0" yocto-queue@^0.1.0: version "0.1.0" diff --git a/packages/next/cli/next-build.ts b/packages/next/cli/next-build.ts index ad3b78232abcb..c9afca528d5b2 100755 --- a/packages/next/cli/next-build.ts +++ b/packages/next/cli/next-build.ts @@ -13,6 +13,7 @@ const nextBuild: cliCommand = (argv) => { '--help': Boolean, '--profile': Boolean, '--debug': Boolean, + '--no-lint': Boolean, // Aliases '-h': '--help', '-d': '--debug', @@ -41,6 +42,7 @@ const nextBuild: cliCommand = (argv) => { Options --profile Can be used to enable React Production Profiling + --no-lint Disable linting `, 0 ) @@ -48,6 +50,9 @@ const nextBuild: cliCommand = (argv) => { if (args['--profile']) { Log.warn('Profiling is enabled. Note: This may affect performance') } + if (args['--no-lint']) { + Log.warn('Linting is disabled') + } const dir = resolve(args._[0] || '.') // Check if the provided directory exists @@ -93,7 +98,9 @@ const nextBuild: cliCommand = (argv) => { } return preflight() - .then(() => build(dir, null, args['--profile'], args['--debug'])) + .then(() => + build(dir, null, args['--profile'], args['--debug'], !args['--no-lint']) + ) .catch((err) => { console.error('') console.error('> Build error occurred') diff --git a/packages/next/cli/next-lint.ts b/packages/next/cli/next-lint.ts new file mode 100755 index 0000000000000..cc8216c840151 --- /dev/null +++ b/packages/next/cli/next-lint.ts @@ -0,0 +1,76 @@ +#!/usr/bin/env node +import { existsSync } from 'fs' +import arg from 'next/dist/compiled/arg/index.js' +import { resolve, join } from 'path' +import { cliCommand } from '../bin/next' +import { runLintCheck } from '../lib/eslint/runLintCheck' +import { printAndExit } from '../server/lib/utils' + +const nextLint: cliCommand = (argv) => { + const validArgs: arg.Spec = { + // Types + '--help': Boolean, + '--dir': [String], + + // Aliases + '-h': '--help', + '-d': '--dir', + } + + let args: arg.Result + try { + args = arg(validArgs, { argv }) + } catch (error) { + if (error.code === 'ARG_UNKNOWN_OPTION') { + return printAndExit(error.message, 1) + } + throw error + } + if (args['--help']) { + printAndExit( + ` + Description + Run ESLint on every file in specified directories. + If not configured, ESLint will be set up for the first time. + + Usage + $ next lint [options] + + represents the directory of the Next.js application. + If no directory is provided, the current directory will be used. + + Options + -h - list this help + -d - set directory, or directories, to run ESLint (defaults to only 'pages') + `, + 0 + ) + } + + const baseDir = resolve(args._[0] || '.') + + // Check if the provided directory exists + if (!existsSync(baseDir)) { + printAndExit(`> No such directory exists as the project root: ${baseDir}`) + } + + const dirs: string[] = args['--dir'] + const lintDirs = dirs + ? dirs.reduce((res: string[], d: string) => { + const currDir = join(baseDir, d) + if (!existsSync(currDir)) return res + res.push(currDir) + return res + }, []) + : null + + runLintCheck(baseDir, lintDirs) + .then((results) => { + if (results) console.log(results) + }) + .catch((err) => { + printAndExit(err.message) + }) +} + +export { nextLint } diff --git a/packages/next/client/image.tsx b/packages/next/client/image.tsx index eea353be48980..56f3edbabebba 100644 --- a/packages/next/client/image.tsx +++ b/packages/next/client/image.tsx @@ -22,6 +22,7 @@ export type ImageLoaderProps = { src: string width: number quality?: number + isStatic?: boolean } type DefaultImageLoaderProps = ImageLoaderProps & { root: string } @@ -49,11 +50,70 @@ type PlaceholderValue = 'blur' | 'empty' type ImgElementStyle = NonNullable +interface StaticImageData { + src: string + height: number + width: number + placeholder?: string +} + +interface StaticRequire { + default: StaticImageData +} + +type StaticImport = StaticRequire | StaticImageData + +function isStaticRequire( + src: StaticRequire | StaticImageData +): src is StaticRequire { + return (src as StaticRequire).default !== undefined +} + +function isStaticImageData( + src: StaticRequire | StaticImageData +): src is StaticImageData { + return (src as StaticImageData).src !== undefined +} + +function isStaticImport(src: string | StaticImport): src is StaticImport { + return ( + typeof src === 'object' && + (isStaticRequire(src as StaticImport) || + isStaticImageData(src as StaticImport)) + ) +} + +type StringImageProps = { + src: string +} & ( + | { width?: never; height?: never; layout: 'fill' } + | { + width: number | string + height: number | string + layout?: Exclude + } +) & + ( + | { + placeholder?: Exclude + blurDataURL?: never + } + | { placeholder: 'blur'; blurDataURL: string } + ) + +type ObjectImageProps = { + src: StaticImport + width?: number | string + height?: number | string + layout?: LayoutValue + placeholder?: PlaceholderValue + blurDataURL?: never +} + export type ImageProps = Omit< JSX.IntrinsicElements['img'], 'src' | 'srcSet' | 'ref' | 'width' | 'height' | 'loading' | 'style' > & { - src: string loader?: ImageLoader quality?: number | string priority?: boolean @@ -61,27 +121,7 @@ export type ImageProps = Omit< unoptimized?: boolean objectFit?: ImgElementStyle['objectFit'] objectPosition?: ImgElementStyle['objectPosition'] -} & ( - | { - width?: never - height?: never - /** @deprecated Use `layout="fill"` instead */ - unsized: true - } - | { width?: never; height?: never; layout: 'fill' } - | { - width: number | string - height: number | string - layout?: Exclude - } - ) & - ( - | { - placeholder?: Exclude - blurDataURL?: never - } - | { placeholder: 'blur'; blurDataURL: string } - ) +} & (StringImageProps | ObjectImageProps) const { deviceSizes: configDeviceSizes, @@ -89,7 +129,6 @@ const { loader: configLoader, path: configPath, domains: configDomains, - enableBlurryPlaceholder: configEnableBlurryPlaceholder, } = ((process.env.__NEXT_IMAGE_OPTS as any) as ImageConfig) || imageConfigDefault // sort smallest to largest @@ -151,6 +190,7 @@ type GenImgAttrsData = { unoptimized: boolean layout: LayoutValue loader: ImageLoader + isStatic?: boolean width?: number quality?: number sizes?: string @@ -170,6 +210,7 @@ function generateImgAttrs({ quality, sizes, loader, + isStatic, }: GenImgAttrsData): GenImgAttrsResult { if (unoptimized) { return { src, srcSet: undefined, sizes: undefined } @@ -183,7 +224,7 @@ function generateImgAttrs({ srcSet: widths .map( (w, i) => - `${loader({ src, quality, width: w })} ${ + `${loader({ src, quality, isStatic, width: w })} ${ kind === 'w' ? w : i + 1 }${kind}` ) @@ -195,7 +236,7 @@ function generateImgAttrs({ // updated by React. That causes multiple unnecessary requests if `srcSet` // and `sizes` are defined. // This bug cannot be reproduced in Chrome or Firefox. - src: loader({ src, quality, width: widths[last] }), + src: loader({ src, quality, isStatic, width: widths[last] }), } } @@ -228,14 +269,16 @@ function removePlaceholder( placeholder: PlaceholderValue ) { if (placeholder === 'blur' && element) { - if (element.complete) { + if (element.complete && !element.src.startsWith('data:')) { // If the real image fails to load, this will still remove the placeholder. // This is the desired behavior for now, and will be revisited when error // handling is worked on for the image component itself. element.style.backgroundImage = 'none' } else { element.onload = () => { - element.style.backgroundImage = 'none' + if (!element.src.startsWith('data:')) { + element.style.backgroundImage = 'none' + } } } } @@ -260,12 +303,7 @@ export default function Image({ }: ImageProps) { let rest: Partial = all let layout: NonNullable = sizes ? 'responsive' : 'intrinsic' - let unsized = false - if ('unsized' in rest) { - unsized = Boolean(rest.unsized) - // Remove property so it's not spread into image: - delete rest['unsized'] - } else if ('layout' in rest) { + if ('layout' in rest) { // Override default layout if the user specified one: if (rest.layout) layout = rest.layout @@ -273,9 +311,35 @@ export default function Image({ delete rest['layout'] } - if (!configEnableBlurryPlaceholder) { - placeholder = 'empty' + const isStatic = typeof src === 'object' + let staticSrc = '' + if (isStaticImport(src)) { + const staticImageData = isStaticRequire(src) ? src.default : src + + if (!staticImageData.src) { + throw new Error( + `An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify( + staticImageData + )}` + ) + } + if (staticImageData.placeholder) { + blurDataURL = staticImageData.placeholder + } + staticSrc = staticImageData.src + if (!layout || layout !== 'fill') { + height = height || staticImageData.height + width = width || staticImageData.width + if (!staticImageData.height || !staticImageData.width) { + throw new Error( + `An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify( + staticImageData + )}` + ) + } + } } + src = (isStatic ? staticSrc : src) as string if (process.env.NODE_ENV !== 'production') { if (!src) { @@ -304,13 +368,7 @@ export default function Image({ `Image with src "${src}" has both "priority" and "loading='lazy'" properties. Only one should be used.` ) } - if (unsized) { - throw new Error( - `Image with src "${src}" has deprecated "unsized" property, which was removed in favor of the "layout='fill'" property` - ) - } } - let isLazy = !priority && (loading === 'lazy' || typeof loading === 'undefined') if (src && src.startsWith('data:')) { @@ -458,14 +516,10 @@ export default function Image({ quality: qualityInt, sizes, loader, + isStatic, }) } - if (unsized) { - wrapperStyle = undefined - sizerStyle = undefined - imgStyle = undefined - } return (
{sizerStyle ? ( @@ -590,6 +644,7 @@ function cloudinaryLoader({ function defaultLoader({ root, + isStatic, src, width, quality, @@ -637,5 +692,7 @@ function defaultLoader({ } } - return `${root}?url=${encodeURIComponent(src)}&w=${width}&q=${quality || 75}` + return `${root}?url=${encodeURIComponent(src)}&w=${width}&q=${quality || 75}${ + isStatic ? '&s=1' : '' + }` } diff --git a/packages/next/client/index.tsx b/packages/next/client/index.tsx index 948861d1de159..080eae4cbaed6 100644 --- a/packages/next/client/index.tsx +++ b/packages/next/client/index.tsx @@ -141,8 +141,8 @@ if (process.env.__NEXT_I18N_SUPPORT) { } } -if (process.env.__NEXT_SCRIPT_LOADER && data.scriptLoader) { - const { initScriptLoader } = require('./experimental-script') +if (data.scriptLoader) { + const { initScriptLoader } = require('./script') initScriptLoader(data.scriptLoader) } diff --git a/packages/next/client/link.tsx b/packages/next/client/link.tsx index 0aebbf5451c59..57a53f2c07f37 100644 --- a/packages/next/client/link.tsx +++ b/packages/next/client/link.tsx @@ -229,7 +229,21 @@ function Link(props: React.PropsWithChildren) { } // This will return the first child, if multiple are provided it will throw an error - const child: any = Children.only(children) + let child: any + if (process.env.NODE_ENV === 'development') { + try { + child = Children.only(children) + } catch (err) { + throw new Error( + `Multiple children were passed to with \`href\` of \`${props.href}\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` + + (typeof window !== 'undefined' + ? "\nOpen your browser's console to view the Component stack trace." + : '') + ) + } + } else { + child = Children.only(children) + } const childRef: any = child && typeof child === 'object' && child.ref const [setIntersectionRef, isVisible] = useIntersection({ diff --git a/packages/next/client/experimental-script.tsx b/packages/next/client/script.tsx similarity index 98% rename from packages/next/client/experimental-script.tsx rename to packages/next/client/script.tsx index 35ae7adf016c9..992f12a416e2f 100644 --- a/packages/next/client/experimental-script.tsx +++ b/packages/next/client/script.tsx @@ -136,10 +136,6 @@ function Script(props: Props): JSX.Element | null { } }, [props, strategy]) - if (!process.env.__NEXT_SCRIPT_LOADER) { - return null - } - if (strategy === 'beforeInteractive') { if (updateScripts) { scripts.beforeInteractive = (scripts.beforeInteractive || []).concat([ diff --git a/packages/next/compiled/webpack-sources2/index.js b/packages/next/compiled/webpack-sources2/index.js index 3000d2d920d99..2d7c150cd40cd 100644 --- a/packages/next/compiled/webpack-sources2/index.js +++ b/packages/next/compiled/webpack-sources2/index.js @@ -1 +1 @@ -module.exports=function(){var e={233:function(e,t,s){"use strict";const n=s(335).y;const i=s(335).P;class CodeNode{constructor(e){this.generatedCode=e}clone(){return new CodeNode(this.generatedCode)}getGeneratedCode(){return this.generatedCode}getMappings(e){const t=n(this.generatedCode);const s=Array(t+1).join(";");if(t>0){e.unfinishedGeneratedLine=i(this.generatedCode);if(e.unfinishedGeneratedLine>0){return s+"A"}else{return s}}else{const t=e.unfinishedGeneratedLine;e.unfinishedGeneratedLine+=i(this.generatedCode);if(t===0&&e.unfinishedGeneratedLine>0){return"A"}else{return""}}}addGeneratedCode(e){this.generatedCode+=e}mapGeneratedCode(e){const t=e(this.generatedCode);return new CodeNode(t)}getNormalizedNodes(){return[this]}merge(e){if(e instanceof CodeNode){this.generatedCode+=e.generatedCode;return this}return false}}e.exports=CodeNode},940:function(e){"use strict";class MappingsContext{constructor(){this.sourcesIndices=new Map;this.sourcesContent=new Map;this.hasSourceContent=false;this.currentOriginalLine=1;this.currentSource=0;this.unfinishedGeneratedLine=false}ensureSource(e,t){let s=this.sourcesIndices.get(e);if(typeof s==="number"){return s}s=this.sourcesIndices.size;this.sourcesIndices.set(e,s);this.sourcesContent.set(e,t);if(typeof t==="string")this.hasSourceContent=true;return s}getArrays(){const e=[];const t=[];for(const s of this.sourcesContent){e.push(s[0]);t.push(s[1])}return{sources:e,sourcesContent:t}}}e.exports=MappingsContext},482:function(e,t,s){"use strict";const n=s(439);const i=s(335).y;const r=s(335).P;const u=";AAAA";class SingleLineNode{constructor(e,t,s,n){this.generatedCode=e;this.originalSource=s;this.source=t;this.line=n||1;this._numberOfLines=i(this.generatedCode);this._endsWithNewLine=e[e.length-1]==="\n"}clone(){return new SingleLineNode(this.generatedCode,this.source,this.originalSource,this.line)}getGeneratedCode(){return this.generatedCode}getMappings(e){if(!this.generatedCode)return"";const t=this._numberOfLines;const s=e.ensureSource(this.source,this.originalSource);let i="A";if(e.unfinishedGeneratedLine)i=","+n.encode(e.unfinishedGeneratedLine);i+=n.encode(s-e.currentSource);i+=n.encode(this.line-e.currentOriginalLine);i+="A";e.currentSource=s;e.currentOriginalLine=this.line;const o=e.unfinishedGeneratedLine=r(this.generatedCode);i+=Array(t).join(u);if(o===0){i+=";"}else{if(t!==0)i+=u}return i}getNormalizedNodes(){return[this]}mapGeneratedCode(e){const t=e(this.generatedCode);return new SingleLineNode(t,this.source,this.originalSource,this.line)}merge(e){if(e instanceof SingleLineNode){return this.mergeSingleLineNode(e)}return false}mergeSingleLineNode(e){if(this.source===e.source&&this.originalSource===e.originalSource){if(this.line===e.line){this.generatedCode+=e.generatedCode;this._numberOfLines+=e._numberOfLines;this._endsWithNewLine=e._endsWithNewLine;return this}else if(this.line+1===e.line&&this._endsWithNewLine&&this._numberOfLines===1&&e._numberOfLines<=1){return new o(this.generatedCode+e.generatedCode,this.source,this.originalSource,this.line)}}return false}}e.exports=SingleLineNode;const o=s(839)},950:function(e,t,s){"use strict";const n=s(233);const i=s(839);const r=s(940);const u=s(335).y;class SourceListMap{constructor(e,t,s){if(Array.isArray(e)){this.children=e}else{this.children=[];if(e||t)this.add(e,t,s)}}add(e,t,s){if(typeof e==="string"){if(t){this.children.push(new i(e,t,s))}else if(this.children.length>0&&this.children[this.children.length-1]instanceof n){this.children[this.children.length-1].addGeneratedCode(e)}else{this.children.push(new n(e))}}else if(e.getMappings&&e.getGeneratedCode){this.children.push(e)}else if(e.children){e.children.forEach(function(e){this.children.push(e)},this)}else{throw new Error("Invalid arguments to SourceListMap.protfotype.add: Expected string, Node or SourceListMap")}}preprend(e,t,s){if(typeof e==="string"){if(t){this.children.unshift(new i(e,t,s))}else if(this.children.length>0&&this.children[this.children.length-1].preprendGeneratedCode){this.children[this.children.length-1].preprendGeneratedCode(e)}else{this.children.unshift(new n(e))}}else if(e.getMappings&&e.getGeneratedCode){this.children.unshift(e)}else if(e.children){e.children.slice().reverse().forEach(function(e){this.children.unshift(e)},this)}else{throw new Error("Invalid arguments to SourceListMap.protfotype.prerend: Expected string, Node or SourceListMap")}}mapGeneratedCode(e){const t=[];this.children.forEach(function(e){e.getNormalizedNodes().forEach(function(e){t.push(e)})});const s=[];t.forEach(function(t){t=t.mapGeneratedCode(e);if(s.length===0){s.push(t)}else{const e=s[s.length-1];const n=e.merge(t);if(n){s[s.length-1]=n}else{s.push(t)}}});return new SourceListMap(s)}toString(){return this.children.map(function(e){return e.getGeneratedCode()}).join("")}toStringWithSourceMap(e){const t=new r;const s=this.children.map(function(e){return e.getGeneratedCode()}).join("");const n=this.children.map(function(e){return e.getMappings(t)}).join("");const i=t.getArrays();return{source:s,map:{version:3,file:e&&e.file,sources:i.sources,sourcesContent:t.hasSourceContent?i.sourcesContent:undefined,mappings:n}}}}e.exports=SourceListMap},839:function(e,t,s){"use strict";const n=s(439);const i=s(335).y;const r=s(335).P;const u=";AACA";class SourceNode{constructor(e,t,s,n){this.generatedCode=e;this.originalSource=s;this.source=t;this.startingLine=n||1;this._numberOfLines=i(this.generatedCode);this._endsWithNewLine=e[e.length-1]==="\n"}clone(){return new SourceNode(this.generatedCode,this.source,this.originalSource,this.startingLine)}getGeneratedCode(){return this.generatedCode}addGeneratedCode(e){this.generatedCode+=e;this._numberOfLines+=i(e);this._endsWithNewLine=e[e.length-1]==="\n"}getMappings(e){if(!this.generatedCode)return"";const t=this._numberOfLines;const s=e.ensureSource(this.source,this.originalSource);let i="A";if(e.unfinishedGeneratedLine)i=","+n.encode(e.unfinishedGeneratedLine);i+=n.encode(s-e.currentSource);i+=n.encode(this.startingLine-e.currentOriginalLine);i+="A";e.currentSource=s;e.currentOriginalLine=this.startingLine+t-1;const o=e.unfinishedGeneratedLine=r(this.generatedCode);i+=Array(t).join(u);if(o===0){i+=";"}else{if(t!==0){i+=u}e.currentOriginalLine++}return i}mapGeneratedCode(e){throw new Error("Cannot map generated code on a SourceMap. Normalize to SingleLineNode first.")}getNormalizedNodes(){var e=[];var t=this.startingLine;var s=this.generatedCode;var n=0;var i=s.length;while(n>1;return t?-s:s}t.encode=function base64VLQ_encode(e){var t="";var s;var n=toVLQSigned(e);do{s=n&o;n>>>=r;if(n>0){s|=f}t+=i.encode(s)}while(n>0);return t};t.decode=function base64VLQ_decode(e,t){var s=0;var n=e.length;var u=0;var c=0;var h,a;do{if(s>=n){throw new Error("Expected more digits in base 64 VLQ value.")}a=i.decode(e.charAt(s++));h=!!(a&f);a&=o;u=u+(a<=0);return t};t.P=function getUnfinishedLine(e){const t=e.lastIndexOf("\n");if(t===-1)return e.length;else return e.length-t-1}},728:function(e,t,s){t.SourceListMap=s(950);t.SourceNode=s(839);t.SingleLineNode=s(482);t.CodeNode=s(233);t.MappingsContext=s(940);t.fromStringWithSourceMap=s(835)},357:function(e,t,s){"use strict";const n=s(598);const i=e=>{if(typeof e!=="object"||!e)return e;const t=Object.assign({},e);if(e.mappings){t.mappings=Buffer.from(e.mappings,"utf-8")}if(e.sourcesContent){t.sourcesContent=e.sourcesContent.map(e=>e&&Buffer.from(e,"utf-8"))}return t};const r=e=>{if(typeof e!=="object"||!e)return e;const t=Object.assign({},e);if(e.mappings){t.mappings=e.mappings.toString("utf-8")}if(e.sourcesContent){t.sourcesContent=e.sourcesContent.map(e=>e&&e.toString("utf-8"))}return t};class CachedSource extends n{constructor(e,t){super();this._source=e;this._cachedSourceType=t?t.source:undefined;this._cachedSource=undefined;this._cachedBuffer=t?t.buffer:undefined;this._cachedSize=t?t.size:undefined;this._cachedMaps=t?t.maps:new Map;this._cachedHashUpdate=t?t.hash:undefined}getCachedData(){if(this._cachedSource){this.buffer()}const e=new Map;for(const t of this._cachedMaps){if(t[1].bufferedMap===undefined){t[1].bufferedMap=i(t[1].map)}e.set(t[0],{map:undefined,bufferedMap:t[1].bufferedMap})}return{buffer:this._cachedBuffer,source:this._cachedSourceType!==undefined?this._cachedSourceType:typeof this._cachedSource==="string"?true:Buffer.isBuffer(this._cachedSource)?false:undefined,size:this._cachedSize,maps:e,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){if(typeof this._source==="function")this._source=this._source();return this._source}source(){if(this._cachedSource!==undefined)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==undefined){return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}else{return this._cachedSource=this.original().source()}}buffer(){if(typeof this._cachedBuffer!=="undefined")return this._cachedBuffer;if(typeof this._cachedSource!=="undefined"){if(Buffer.isBuffer(this._cachedSource)){return this._cachedBuffer=this._cachedSource}return this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8")}if(typeof this.original().buffer==="function"){return this._cachedBuffer=this.original().buffer()}const e=this.source();if(Buffer.isBuffer(e)){return this._cachedBuffer=e}return this._cachedBuffer=Buffer.from(e,"utf-8")}size(){if(typeof this._cachedSize!=="undefined")return this._cachedSize;if(typeof this._cachedSource!=="undefined"){return this._cachedSize=Buffer.byteLength(this._cachedSource)}if(typeof this._cachedBuffer!=="undefined"){return this._cachedSize=this._cachedBuffer.length}return this._cachedSize=this.original().size()}sourceAndMap(e){const t=e?JSON.stringify(e):"{}";let s=this._cachedMaps.get(t);if(s&&s.map===undefined){s.map=r(s.bufferedMap)}if(typeof this._cachedSource!=="undefined"){if(s===undefined){const s=this.original().map(e);this._cachedMaps.set(t,{map:s,bufferedMap:undefined});return{source:this._cachedSource,map:s}}else{return{source:this._cachedSource,map:s.map}}}else if(s!==undefined){return{source:this._cachedSource=this.original().source(),map:s.map}}else{const s=this.original().sourceAndMap(e);this._cachedSource=s.source;this._cachedMaps.set(t,{map:s.map,bufferedMap:undefined});return s}}map(e){const t=e?JSON.stringify(e):"{}";let s=this._cachedMaps.get(t);if(s!==undefined){if(s.map===undefined){s.map=r(s.bufferedMap)}return s.map}const n=this.original().map(e);this._cachedMaps.set(t,{map:n,bufferedMap:undefined});return n}updateHash(e){if(this._cachedHashUpdate!==undefined){for(const t of this._cachedHashUpdate)e.update(t);return}const t=[];let s=undefined;const n={update:e=>{if(typeof e==="string"&&e.length<10240){if(s===undefined){s=e}else{s+=e;if(s>102400){t.push(Buffer.from(s));s=undefined}}}else{if(s!==undefined){t.push(Buffer.from(s));s=undefined}t.push(e)}}};this.original().updateHash(n);if(s!==undefined){t.push(Buffer.from(s))}for(const s of t)e.update(s);this._cachedHashUpdate=t}}e.exports=CachedSource},973:function(e,t,s){"use strict";const n=s(598);class CompatSource extends n{static from(e){return e instanceof n?e:new CompatSource(e)}constructor(e){super();this._sourceLike=e}source(){return this._sourceLike.source()}buffer(){if(typeof this._sourceLike.buffer==="function"){return this._sourceLike.buffer()}return super.buffer()}size(){if(typeof this._sourceLike.size==="function"){return this._sourceLike.size()}return super.size()}map(e){if(typeof this._sourceLike.map==="function"){return this._sourceLike.map(e)}return super.map(e)}sourceAndMap(e){if(typeof this._sourceLike.sourceAndMap==="function"){return this._sourceLike.sourceAndMap(e)}return super.sourceAndMap(e)}updateHash(e){if(typeof this._sourceLike.updateHash==="function"){return this._sourceLike.updateHash(e)}if(typeof this._sourceLike.map==="function"){throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method")}e.update(this.buffer())}}e.exports=CompatSource},944:function(e,t,s){"use strict";const n=s(598);const i=s(891);const{SourceNode:r,SourceMapConsumer:u}=s(241);const{SourceListMap:o,fromStringWithSourceMap:f}=s(728);const{getSourceAndMap:c,getMap:h}=s(791);const a=new WeakSet;class ConcatSource extends n{constructor(){super();this._children=[];for(let e=0;e{if(s===undefined){s=e}else if(Array.isArray(s)){s.push(e)}else{s=[typeof s==="string"?s:s.source(),e]}};const r=e=>{if(s===undefined){s=e}else if(Array.isArray(s)){s.push(e.source())}else{s=[typeof s==="string"?s:s.source(),e.source()]}};const u=()=>{if(Array.isArray(s)){const t=new i(s.join(""));a.add(t);e.push(t)}else if(typeof s==="string"){const t=new i(s);a.add(t);e.push(t)}else{e.push(s)}};for(const i of this._children){if(typeof i==="string"){if(t===undefined){t=i}else{t+=i}}else{if(t!==undefined){n(t);t=undefined}if(a.has(i)){r(i)}else{if(s!==undefined){u();s=undefined}e.push(i)}}}if(t!==undefined){n(t)}if(s!==undefined){u()}this._children=e;this._isOptimized=true}}e.exports=ConcatSource},389:function(e,t,s){"use strict";const n=s(598);const{SourceNode:i}=s(241);const{SourceListMap:r}=s(728);const{getSourceAndMap:u,getMap:o}=s(791);const f=/(?!$)[^\n\r;{}]*[\n\r;{}]*/g;function _splitCode(e){return e.match(f)||[]}class OriginalSource extends n{constructor(e,t){super();const s=Buffer.isBuffer(e);this._value=s?undefined:e;this._valueAsBuffer=s?e:undefined;this._name=t}getName(){return this._name}source(){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return this._value}buffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}return this._valueAsBuffer}map(e){return o(this,e)}sourceAndMap(e){return u(this,e)}node(e){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}const t=this._value;const s=this._name;const n=t.split("\n");const r=new i(null,null,null,n.map(function(t,r){let u=0;if(e&&e.columns===false){const e=t+(r!==n.length-1?"\n":"");return new i(r+1,0,s,e)}return new i(null,null,null,_splitCode(t+(r!==n.length-1?"\n":"")).map(function(e){if(/^\s*$/.test(e)){u+=e.length;return e}const t=new i(r+1,u,s,e);u+=e.length;return t}))}));r.setSourceContent(s,t);return r}listMap(e){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return new r(this._value,this._name,this._value)}updateHash(e){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}e.update("OriginalSource");e.update(this._valueAsBuffer);e.update(this._name||"")}}e.exports=OriginalSource},193:function(e,t,s){"use strict";const n=s(598);const i=s(891);const{SourceNode:r}=s(241);const{getSourceAndMap:u,getMap:o}=s(791);const f=/\n(?=.|\s)/g;class PrefixSource extends n{constructor(e,t){super();this._source=typeof t==="string"||Buffer.isBuffer(t)?new i(t,true):t;this._prefix=e}getPrefix(){return this._prefix}original(){return this._source}source(){const e=this._source.source();const t=this._prefix;return t+e.replace(f,"\n"+t)}map(e){return o(this,e)}sourceAndMap(e){return u(this,e)}node(e){const t=this._source.node(e);const s=this._prefix;const n=[];const i=new r;t.walkSourceContents(function(e,t){i.setSourceContent(e,t)});let u=true;t.walk(function(e,t){const i=e.split(/(\n)/);for(let e=0;e{return e.insertIndex-t.insertIndex});return e}replace(e,t,s,n){if(typeof s!=="string")throw new Error("insertion must be a string, but is a "+typeof s);this._replacements.push(new Replacement(e,t,s,this._replacements.length,n));this._isSorted=false}insert(e,t,s){if(typeof t!=="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new Replacement(e,e-1,t,this._replacements.length,s));this._isSorted=false}source(){return this._replaceString(this._source.source())}map(e){if(this._replacements.length===0){return this._source.map(e)}return u(this,e)}sourceAndMap(e){if(this._replacements.length===0){return this._source.sourceAndMap(e)}return r(this,e)}original(){return this._source}_sortReplacements(){if(this._isSorted)return;this._replacements.sort(function(e,t){const s=t.end-e.end;if(s!==0)return s;const n=t.start-e.start;if(n!==0)return n;return t.insertIndex-e.insertIndex});this._isSorted=true}_replaceString(e){if(typeof e!=="string")throw new Error("str must be a string, but is a "+typeof e+": "+e);this._sortReplacements();const t=[e];this._replacements.forEach(function(e){const s=t.pop();const n=this._splitString(s,Math.floor(e.end+1));const i=this._splitString(n[0],Math.floor(e.start));t.push(n[1],e.content,i[0])},this);let s="";for(let e=t.length-1;e>=0;--e){s+=t[e]}return s}node(e){const t=o(this._source,e);if(this._replacements.length===0){return t}this._sortReplacements();const s=new ReplacementEnumerator(this._replacements);const n=[];let r=0;const u=Object.create(null);const f=Object.create(null);const c=new i;t.walkSourceContents(function(e,t){c.setSourceContent(e,t);u["$"+e]=t});const h=this._replaceInStringNode.bind(this,n,s,function getOriginalSource(e){const t="$"+e.source;let s=f[t];if(!s){const e=u[t];if(!e)return null;s=e.split("\n").map(function(e){return e+"\n"});f[t]=s}if(e.line>s.length)return null;const n=s[e.line-1];return n.substr(e.column)});t.walk(function(e,t){r=h(e,r,t)});const a=s.footer();if(a){n.push(a)}c.add(n);return c}listMap(e){let t=f(this._source,e);this._sortReplacements();let s=0;const n=this._replacements;let i=n.length-1;let r=0;t=t.mapGeneratedCode(function(e){const t=s+e.length;if(r>e.length){r-=e.length;e=""}else{if(r>0){e=e.substr(r);s+=r;r=0}let u="";while(i>=0&&n[i].start=0){u+=n[i].content;i--}if(u){t.add(u)}return t}_splitString(e,t){return t<=0?["",e]:[e.substr(0,t),e.substr(t)]}_replaceInStringNode(e,t,s,n,r,u){let o=undefined;do{let f=t.position-r;if(f<0){f=0}if(f>=n.length||t.done){if(t.emit){const t=new i(u.line,u.column,u.source,n,u.name);e.push(t)}return r+n.length}const c=u.column;let h;if(f>0){h=n.slice(0,f);if(o===undefined){o=s(u)}if(o&&o.length>=f&&o.startsWith(h)){u.column+=f;o=o.substr(f)}}const a=t.next();if(!a){if(f>0){const t=new i(u.line,c,u.source,h,u.name);e.push(t)}if(t.value){e.push(new i(u.line,u.column,u.source,t.value,u.name||t.name))}}n=n.substr(f);r+=f}while(true)}updateHash(e){this._sortReplacements();e.update("ReplaceSource");this._source.updateHash(e);e.update(this._name||"");for(const t of this._replacements){e.update(`${t.start}`);e.update(`${t.end}`);e.update(`${t.content}`);e.update(`${t.insertIndex}`);e.update(`${t.name}`)}}}class ReplacementEnumerator{constructor(e){this.replacements=e||[];this.index=this.replacements.length;this.done=false;this.emit=false;this.next()}next(){if(this.done)return true;if(this.emit){const e=this.replacements[this.index];const t=Math.floor(e.end+1);this.position=t;this.value=e.content;this.name=e.name}else{this.index--;if(this.index<0){this.done=true}else{const e=this.replacements[this.index];const t=Math.floor(e.start);this.position=t}}if(this.position<0)this.position=0;this.emit=!this.emit;return this.emit}footer(){if(!this.done&&!this.emit)this.next();if(this.done){return[]}else{let e="";for(let t=this.index;t>=0;t--){const s=this.replacements[t];e+=s.content}return e}}}e.exports=ReplaceSource},271:function(e,t,s){"use strict";const n=s(598);class SizeOnlySource extends n{constructor(e){super();this._size=e}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(e){throw this._error()}updateHash(){throw this._error()}}e.exports=SizeOnlySource},598:function(e){"use strict";class Source{source(){throw new Error("Abstract")}buffer(){const e=this.source();if(Buffer.isBuffer(e))return e;return Buffer.from(e,"utf-8")}size(){return this.buffer().length}map(e){return null}sourceAndMap(e){return{source:this.source(),map:this.map(e)}}updateHash(e){throw new Error("Abstract")}}e.exports=Source},287:function(e,t,s){"use strict";const n=s(598);const{SourceNode:i,SourceMapConsumer:r}=s(241);const{SourceListMap:u,fromStringWithSourceMap:o}=s(728);const{getSourceAndMap:f,getMap:c}=s(791);const h=s(462);class SourceMapSource extends n{constructor(e,t,s,n,i,r){super();const u=Buffer.isBuffer(e);this._valueAsString=u?undefined:e;this._valueAsBuffer=u?e:undefined;this._name=t;this._hasSourceMap=!!s;const o=Buffer.isBuffer(s);const f=typeof s==="string";this._sourceMapAsObject=o||f?undefined:s;this._sourceMapAsString=f?s:undefined;this._sourceMapAsBuffer=o?s:undefined;this._hasOriginalSource=!!n;const c=Buffer.isBuffer(n);this._originalSourceAsString=c?undefined:n;this._originalSourceAsBuffer=c?n:undefined;this._hasInnerSourceMap=!!i;const h=Buffer.isBuffer(i);const a=typeof i==="string";this._innerSourceMapAsObject=h||a?undefined:i;this._innerSourceMapAsString=a?i:undefined;this._innerSourceMapAsBuffer=h?i:undefined;this._removeOriginalSource=r}_ensureValueBuffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8")}}_ensureValueString(){if(this._valueAsString===undefined){this._valueAsString=this._valueAsBuffer.toString("utf-8")}}_ensureOriginalSourceBuffer(){if(this._originalSourceAsBuffer===undefined&&this._hasOriginalSource){this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8")}}_ensureOriginalSourceString(){if(this._originalSourceAsString===undefined&&this._hasOriginalSource){this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8")}}_ensureInnerSourceMapObject(){if(this._innerSourceMapAsObject===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString)}}_ensureInnerSourceMapBuffer(){if(this._innerSourceMapAsBuffer===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8")}}_ensureInnerSourceMapString(){if(this._innerSourceMapAsString===undefined&&this._hasInnerSourceMap){if(this._innerSourceMapAsBuffer!==undefined){this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8")}else{this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject)}}}_ensureSourceMapObject(){if(this._sourceMapAsObject===undefined){this._ensureSourceMapString();this._sourceMapAsObject=JSON.parse(this._sourceMapAsString)}}_ensureSourceMapBuffer(){if(this._sourceMapAsBuffer===undefined){this._ensureSourceMapString();this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8")}}_ensureSourceMapString(){if(this._sourceMapAsString===undefined){if(this._sourceMapAsBuffer!==undefined){this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8")}else{this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject)}}}getArgsAsBuffers(){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();return[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}source(){this._ensureValueString();return this._valueAsString}map(e){if(!this._hasInnerSourceMap){this._ensureSourceMapObject();return this._sourceMapAsObject}return c(this,e)}sourceAndMap(e){if(!this._hasInnerSourceMap){this._ensureValueString();this._ensureSourceMapObject();return{source:this._valueAsString,map:this._sourceMapAsObject}}return f(this,e)}node(e){this._ensureValueString();this._ensureSourceMapObject();this._ensureOriginalSourceString();let t=i.fromStringWithSourceMap(this._valueAsString,new r(this._sourceMapAsObject));t.setSourceContent(this._name,this._originalSourceAsString);if(this._hasInnerSourceMap){this._ensureInnerSourceMapObject();t=h(t,new r(this._innerSourceMapAsObject),this._name,this._removeOriginalSource)}return t}listMap(e){this._ensureValueString();this._ensureSourceMapObject();e=e||{};if(e.module===false)return new u(this._valueAsString,this._name,this._valueAsString);return o(this._valueAsString,this._sourceMapAsObject)}updateHash(e){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();e.update("SourceMapSource");e.update(this._valueAsBuffer);e.update(this._sourceMapAsBuffer);if(this._hasOriginalSource){e.update(this._originalSourceAsBuffer)}if(this._hasInnerSourceMap){e.update(this._innerSourceMapAsBuffer)}e.update(this._removeOriginalSource?"true":"false")}}e.exports=SourceMapSource},462:function(e,t,s){"use strict";const n=s(241).SourceNode;const i=s(241).SourceMapConsumer;const r=function(e,t,s,r){const u=new n;const o=[];const f={};const c={};const h={};const a={};t.eachMapping(function(e){(c[e.generatedLine]=c[e.generatedLine]||[]).push(e)},null,i.GENERATED_ORDER);const l=(e,t)=>{const s=c[e];let n=0;let i=s.length;while(n>1;if(s[e].generatedColumn<=t){n=e+1}else{i=e}}if(n===0)return undefined;return s[n-1]};e.walkSourceContents(function(e,t){f["$"+e]=t});const d=f["$"+s];const p=d?d.split("\n"):undefined;e.walk(function(e,i){if(i.source===s&&i.line&&c[i.line]){let s=l(i.line,i.column);if(s){let r=false;let f;let c;let l;const d=s.source;if(p&&d&&(f=p[s.generatedLine-1])&&((l=a[d])||(c=t.sourceContentFor(d,true)))){if(!l){l=a[d]=c.split("\n")}const e=l[s.originalLine-1];if(e){const t=i.column-s.generatedColumn;if(t>0){const n=f.slice(s.generatedColumn,i.column);const r=e.slice(s.originalColumn,s.originalColumn+t);if(n===r){s=Object.assign({},s,{originalColumn:s.originalColumn+t,generatedColumn:i.column,name:undefined})}}if(!s.name&&i.name){r=e.slice(s.originalColumn,s.originalColumn+i.name.length)===i.name}}}let _=s.source;if(_&&_!=="."){o.push(new n(s.originalLine,s.originalColumn,_,e,r?i.name:s.name));if(!("$"+_ in h)){h["$"+_]=true;const e=t.sourceContentFor(_,true);if(e){u.setSourceContent(_,e)}}return}}}if(r&&i.source===s||!i.source){o.push(e);return}const d=i.source;o.push(new n(i.line,i.column,d,e,i.name));if("$"+d in f){if(!("$"+d in h)){u.setSourceContent(d,f["$"+d]);delete f["$"+d]}}});u.add(o);return u};e.exports=r},791:function(e,t,s){"use strict";const{SourceNode:n,SourceMapConsumer:i}=s(241);const{SourceListMap:r,fromStringWithSourceMap:u}=s(728);t.getSourceAndMap=((e,t)=>{let s;let n;if(t&&t.columns===false){const i=e.listMap(t).toStringWithSourceMap({file:"x"});s=i.source;n=i.map}else{const i=e.node(t).toStringWithSourceMap({file:"x"});s=i.code;n=i.map.toJSON()}if(!n||!n.sources||n.sources.length===0)n=null;return{source:s,map:n}});t.getMap=((e,t)=>{let s;if(t&&t.columns===false){s=e.listMap(t).toStringWithSourceMap({file:"x"}).map}else{s=e.node(t).toStringWithSourceMap({file:"x"}).map.toJSON()}if(!s||!s.sources||s.sources.length===0)return null;return s});t.getNode=((e,t)=>{if(typeof e.node==="function"){return e.node(t)}else{const s=e.sourceAndMap(t);if(s.map){return n.fromStringWithSourceMap(s.source,new i(s.map))}else{return new n(null,null,null,s.source)}}});t.getListMap=((e,t)=>{if(typeof e.listMap==="function"){return e.listMap(t)}else{const s=e.sourceAndMap(t);if(s.map){return u(s.source,s.map)}else{return new r(s.source)}}})},351:function(e,t,s){const n=(e,s)=>{let n;Object.defineProperty(t,e,{get:()=>{if(s!==undefined){n=s();s=undefined}return n},configurable:true})};n("Source",()=>s(598));n("RawSource",()=>s(891));n("OriginalSource",()=>s(389));n("SourceMapSource",()=>s(287));n("CachedSource",()=>s(357));n("ConcatSource",()=>s(944));n("ReplaceSource",()=>s(588));n("PrefixSource",()=>s(193));n("SizeOnlySource",()=>s(271));n("CompatSource",()=>s(973))},241:function(e){"use strict";e.exports=require("next/dist/compiled/source-map")}};var t={};function __nccwpck_require__(s){if(t[s]){return t[s].exports}var n=t[s]={exports:{}};var i=true;try{e[s](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[s]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(351)}(); \ No newline at end of file +module.exports=function(){var e={233:function(e,t,n){"use strict";const s=n(335).y;const i=n(335).P;class CodeNode{constructor(e){this.generatedCode=e}clone(){return new CodeNode(this.generatedCode)}getGeneratedCode(){return this.generatedCode}getMappings(e){const t=s(this.generatedCode);const n=Array(t+1).join(";");if(t>0){e.unfinishedGeneratedLine=i(this.generatedCode);if(e.unfinishedGeneratedLine>0){return n+"A"}else{return n}}else{const t=e.unfinishedGeneratedLine;e.unfinishedGeneratedLine+=i(this.generatedCode);if(t===0&&e.unfinishedGeneratedLine>0){return"A"}else{return""}}}addGeneratedCode(e){this.generatedCode+=e}mapGeneratedCode(e){const t=e(this.generatedCode);return new CodeNode(t)}getNormalizedNodes(){return[this]}merge(e){if(e instanceof CodeNode){this.generatedCode+=e.generatedCode;return this}return false}}e.exports=CodeNode},940:function(e){"use strict";class MappingsContext{constructor(){this.sourcesIndices=new Map;this.sourcesContent=new Map;this.hasSourceContent=false;this.currentOriginalLine=1;this.currentSource=0;this.unfinishedGeneratedLine=false}ensureSource(e,t){let n=this.sourcesIndices.get(e);if(typeof n==="number"){return n}n=this.sourcesIndices.size;this.sourcesIndices.set(e,n);this.sourcesContent.set(e,t);if(typeof t==="string")this.hasSourceContent=true;return n}getArrays(){const e=[];const t=[];for(const n of this.sourcesContent){e.push(n[0]);t.push(n[1])}return{sources:e,sourcesContent:t}}}e.exports=MappingsContext},482:function(e,t,n){"use strict";const s=n(439);const i=n(335).y;const r=n(335).P;const u=";AAAA";class SingleLineNode{constructor(e,t,n,s){this.generatedCode=e;this.originalSource=n;this.source=t;this.line=s||1;this._numberOfLines=i(this.generatedCode);this._endsWithNewLine=e[e.length-1]==="\n"}clone(){return new SingleLineNode(this.generatedCode,this.source,this.originalSource,this.line)}getGeneratedCode(){return this.generatedCode}getMappings(e){if(!this.generatedCode)return"";const t=this._numberOfLines;const n=e.ensureSource(this.source,this.originalSource);let i="A";if(e.unfinishedGeneratedLine)i=","+s.encode(e.unfinishedGeneratedLine);i+=s.encode(n-e.currentSource);i+=s.encode(this.line-e.currentOriginalLine);i+="A";e.currentSource=n;e.currentOriginalLine=this.line;const o=e.unfinishedGeneratedLine=r(this.generatedCode);i+=Array(t).join(u);if(o===0){i+=";"}else{if(t!==0)i+=u}return i}getNormalizedNodes(){return[this]}mapGeneratedCode(e){const t=e(this.generatedCode);return new SingleLineNode(t,this.source,this.originalSource,this.line)}merge(e){if(e instanceof SingleLineNode){return this.mergeSingleLineNode(e)}return false}mergeSingleLineNode(e){if(this.source===e.source&&this.originalSource===e.originalSource){if(this.line===e.line){this.generatedCode+=e.generatedCode;this._numberOfLines+=e._numberOfLines;this._endsWithNewLine=e._endsWithNewLine;return this}else if(this.line+1===e.line&&this._endsWithNewLine&&this._numberOfLines===1&&e._numberOfLines<=1){return new o(this.generatedCode+e.generatedCode,this.source,this.originalSource,this.line)}}return false}}e.exports=SingleLineNode;const o=n(839)},950:function(e,t,n){"use strict";const s=n(233);const i=n(839);const r=n(940);const u=n(335).y;class SourceListMap{constructor(e,t,n){if(Array.isArray(e)){this.children=e}else{this.children=[];if(e||t)this.add(e,t,n)}}add(e,t,n){if(typeof e==="string"){if(t){this.children.push(new i(e,t,n))}else if(this.children.length>0&&this.children[this.children.length-1]instanceof s){this.children[this.children.length-1].addGeneratedCode(e)}else{this.children.push(new s(e))}}else if(e.getMappings&&e.getGeneratedCode){this.children.push(e)}else if(e.children){e.children.forEach(function(e){this.children.push(e)},this)}else{throw new Error("Invalid arguments to SourceListMap.protfotype.add: Expected string, Node or SourceListMap")}}preprend(e,t,n){if(typeof e==="string"){if(t){this.children.unshift(new i(e,t,n))}else if(this.children.length>0&&this.children[this.children.length-1].preprendGeneratedCode){this.children[this.children.length-1].preprendGeneratedCode(e)}else{this.children.unshift(new s(e))}}else if(e.getMappings&&e.getGeneratedCode){this.children.unshift(e)}else if(e.children){e.children.slice().reverse().forEach(function(e){this.children.unshift(e)},this)}else{throw new Error("Invalid arguments to SourceListMap.protfotype.prerend: Expected string, Node or SourceListMap")}}mapGeneratedCode(e){const t=[];this.children.forEach(function(e){e.getNormalizedNodes().forEach(function(e){t.push(e)})});const n=[];t.forEach(function(t){t=t.mapGeneratedCode(e);if(n.length===0){n.push(t)}else{const e=n[n.length-1];const s=e.merge(t);if(s){n[n.length-1]=s}else{n.push(t)}}});return new SourceListMap(n)}toString(){return this.children.map(function(e){return e.getGeneratedCode()}).join("")}toStringWithSourceMap(e){const t=new r;const n=this.children.map(function(e){return e.getGeneratedCode()}).join("");const s=this.children.map(function(e){return e.getMappings(t)}).join("");const i=t.getArrays();return{source:n,map:{version:3,file:e&&e.file,sources:i.sources,sourcesContent:t.hasSourceContent?i.sourcesContent:undefined,mappings:s}}}}e.exports=SourceListMap},839:function(e,t,n){"use strict";const s=n(439);const i=n(335).y;const r=n(335).P;const u=";AACA";class SourceNode{constructor(e,t,n,s){this.generatedCode=e;this.originalSource=n;this.source=t;this.startingLine=s||1;this._numberOfLines=i(this.generatedCode);this._endsWithNewLine=e[e.length-1]==="\n"}clone(){return new SourceNode(this.generatedCode,this.source,this.originalSource,this.startingLine)}getGeneratedCode(){return this.generatedCode}addGeneratedCode(e){this.generatedCode+=e;this._numberOfLines+=i(e);this._endsWithNewLine=e[e.length-1]==="\n"}getMappings(e){if(!this.generatedCode)return"";const t=this._numberOfLines;const n=e.ensureSource(this.source,this.originalSource);let i="A";if(e.unfinishedGeneratedLine)i=","+s.encode(e.unfinishedGeneratedLine);i+=s.encode(n-e.currentSource);i+=s.encode(this.startingLine-e.currentOriginalLine);i+="A";e.currentSource=n;e.currentOriginalLine=this.startingLine+t-1;const o=e.unfinishedGeneratedLine=r(this.generatedCode);i+=Array(t).join(u);if(o===0){i+=";"}else{if(t!==0){i+=u}e.currentOriginalLine++}return i}mapGeneratedCode(e){throw new Error("Cannot map generated code on a SourceMap. Normalize to SingleLineNode first.")}getNormalizedNodes(){var e=[];var t=this.startingLine;var n=this.generatedCode;var s=0;var i=n.length;while(s>1;return t?-n:n}t.encode=function base64VLQ_encode(e){var t="";var n;var s=toVLQSigned(e);do{n=s&o;s>>>=r;if(s>0){n|=f}t+=i.encode(n)}while(s>0);return t};t.decode=function base64VLQ_decode(e,t){var n=0;var s=e.length;var u=0;var c=0;var h,a;do{if(n>=s){throw new Error("Expected more digits in base 64 VLQ value.")}a=i.decode(e.charAt(n++));h=!!(a&f);a&=o;u=u+(a<=0);return t};t.P=function getUnfinishedLine(e){const t=e.lastIndexOf("\n");if(t===-1)return e.length;else return e.length-t-1}},728:function(e,t,n){t.SourceListMap=n(950);t.SourceNode=n(839);t.SingleLineNode=n(482);t.CodeNode=n(233);t.MappingsContext=n(940);t.fromStringWithSourceMap=n(835)},357:function(e,t,n){"use strict";const s=n(598);const{SourceMapConsumer:i,SourceNode:r}=n(241);const{SourceListMap:u,fromStringWithSourceMap:o}=n(728);const f={columns:false};const c=e=>{if(typeof e!=="object"||!e)return e;const t=Object.assign({},e);if(e.mappings){t.mappings=Buffer.from(e.mappings,"utf-8")}if(e.sourcesContent){t.sourcesContent=e.sourcesContent.map(e=>e&&Buffer.from(e,"utf-8"))}return t};const h=e=>{if(typeof e!=="object"||!e)return e;const t=Object.assign({},e);if(e.mappings){t.mappings=e.mappings.toString("utf-8")}if(e.sourcesContent){t.sourcesContent=e.sourcesContent.map(e=>e&&e.toString("utf-8"))}return t};const a=(e,t)=>{if(t){return r.fromStringWithSourceMap(e,new i(t))}else{return new r(null,null,null,e)}};const l=(e,t)=>{if(t){return o(e,t)}else{return new u(e)}};class CachedSource extends s{constructor(e,t){super();this._source=e;this._cachedSourceType=t?t.source:undefined;this._cachedSource=undefined;this._cachedBuffer=t?t.buffer:undefined;this._cachedSize=t?t.size:undefined;this._cachedMaps=t?t.maps:new Map;this._cachedHashUpdate=t?t.hash:undefined}getCachedData(){const e=new Map;for(const t of this._cachedMaps){let n=t[1];if(n.bufferedMap===undefined){n.bufferedMap=c(this._getMapFromCacheEntry(n))}e.set(t[0],{map:undefined,node:undefined,listMap:undefined,bufferedMap:n.bufferedMap})}if(this._cachedSource){this.buffer()}return{buffer:this._cachedBuffer,source:this._cachedSourceType!==undefined?this._cachedSourceType:typeof this._cachedSource==="string"?true:Buffer.isBuffer(this._cachedSource)?false:undefined,size:this._cachedSize,maps:e,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){if(typeof this._source==="function")this._source=this._source();return this._source}source(){const e=this._getCachedSource();if(e!==undefined)return e;return this._cachedSource=this.original().source()}_getMapFromCacheEntry(e){if(e.map!==undefined){return e.map}else if(e.bufferedMap!==undefined){return e.map=h(e.bufferedMap)}else if(e.node!==undefined){const t=e.node.toStringWithSourceMap({file:"x"});if(this._cachedSource===undefined)this._cachedSource=t.code;return e.map=t.map.toJSON()}else if(e.listMap!==undefined){const t=e.listMap.toStringWithSourceMap({file:"x"});if(this._cachedSource===undefined)this._cachedSource=t.source;return e.map=t.map}}_getCachedSource(){if(this._cachedSource!==undefined)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==undefined){return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}for(const e of this._cachedMaps.values()){if(e.node!==undefined){return this._cachedSource=e.node.toString()}if(e.listMap!==undefined){return this._cachedSource=e.listMap.toString()}}}buffer(){if(this._cachedBuffer!==undefined)return this._cachedBuffer;if(this._cachedSource!==undefined){if(Buffer.isBuffer(this._cachedSource)){return this._cachedBuffer=this._cachedSource}return this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8")}if(typeof this.original().buffer==="function"){return this._cachedBuffer=this.original().buffer()}const e=this.source();if(Buffer.isBuffer(e)){return this._cachedBuffer=e}return this._cachedBuffer=Buffer.from(e,"utf-8")}size(){if(this._cachedSize!==undefined)return this._cachedSize;if(this._cachedBuffer!==undefined){return this._cachedSize=this._cachedBuffer.length}const e=this._getCachedSource();if(e!==undefined){return this._cachedSize=Buffer.byteLength(e)}return this._cachedSize=this.original().size()}sourceAndMap(e){const t=e?JSON.stringify(e):"{}";const n=this._cachedMaps.get(t);if(n!==undefined){const e=this._getMapFromCacheEntry(n);return{source:this.source(),map:e}}let s=this._getCachedSource();let i;if(s!==undefined){i=this.original().map(e)}else{const t=this.original().sourceAndMap(e);s=t.source;i=t.map;this._cachedSource=s}this._cachedMaps.set(t,{map:i,node:undefined,listMap:undefined,bufferedMap:undefined});return{source:s,map:i}}node(e){const t=e?JSON.stringify(e):"{}";let n=this._cachedMaps.get(t);if(n!==undefined){if(n.node)return n.node;const e=this._getMapFromCacheEntry(n);const t=this.source();const s=a(t,e);n.node=s;return s}let s;const i=this.original();if(typeof i.node==="function"){s=i.node(e);this._cachedMaps.set(t,{map:undefined,node:s,listMap:undefined,bufferedMap:undefined})}else{const n=this.sourceAndMap(e);s=a(n.source,n.map);this._cachedMaps.get(t).node=s}return s}listMap(e){let t;if(!e){t='{"columns":false}';e=f}else{if(e.columns!==false){e=Object.assign({},e,f)}t=JSON.stringify(e)}let n=this._cachedMaps.get(t);if(n!==undefined){if(n.listMap)return n.listMap;const e=this._getMapFromCacheEntry(n);const t=this.source();const s=l(t,e);n.listMap=s;return s}let s;const i=this.original();if(typeof i.listMap==="function"){s=i.listMap(e);this._cachedMaps.set(t,{map:undefined,node:undefined,listMap:s,bufferedMap:undefined})}else{const n=this.sourceAndMap(e);s=l(n.source,n.map);this._cachedMaps.get(t).listMap=s}return s}map(e){const t=e?JSON.stringify(e):"{}";const n=this._cachedMaps.get(t);if(n!==undefined){return this._getMapFromCacheEntry(n)}const s=this.original().map(e);this._cachedMaps.set(t,{map:s,node:undefined,listMap:undefined,bufferedMap:undefined});return s}updateHash(e){if(this._cachedHashUpdate!==undefined){for(const t of this._cachedHashUpdate)e.update(t);return}const t=[];let n=undefined;const s={update:e=>{if(typeof e==="string"&&e.length<10240){if(n===undefined){n=e}else{n+=e;if(n>102400){t.push(Buffer.from(n));n=undefined}}}else{if(n!==undefined){t.push(Buffer.from(n));n=undefined}t.push(e)}}};this.original().updateHash(s);if(n!==undefined){t.push(Buffer.from(n))}for(const n of t)e.update(n);this._cachedHashUpdate=t}}e.exports=CachedSource},973:function(e,t,n){"use strict";const s=n(598);class CompatSource extends s{static from(e){return e instanceof s?e:new CompatSource(e)}constructor(e){super();this._sourceLike=e}source(){return this._sourceLike.source()}buffer(){if(typeof this._sourceLike.buffer==="function"){return this._sourceLike.buffer()}return super.buffer()}size(){if(typeof this._sourceLike.size==="function"){return this._sourceLike.size()}return super.size()}map(e){if(typeof this._sourceLike.map==="function"){return this._sourceLike.map(e)}return super.map(e)}sourceAndMap(e){if(typeof this._sourceLike.sourceAndMap==="function"){return this._sourceLike.sourceAndMap(e)}return super.sourceAndMap(e)}updateHash(e){if(typeof this._sourceLike.updateHash==="function"){return this._sourceLike.updateHash(e)}if(typeof this._sourceLike.map==="function"){throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method")}e.update(this.buffer())}}e.exports=CompatSource},944:function(e,t,n){"use strict";const s=n(598);const i=n(891);const{SourceNode:r,SourceMapConsumer:u}=n(241);const{SourceListMap:o,fromStringWithSourceMap:f}=n(728);const{getSourceAndMap:c,getMap:h}=n(791);const a=new WeakSet;class ConcatSource extends s{constructor(){super();this._children=[];for(let e=0;e{if(n===undefined){n=e}else if(Array.isArray(n)){n.push(e)}else{n=[typeof n==="string"?n:n.source(),e]}};const r=e=>{if(n===undefined){n=e}else if(Array.isArray(n)){n.push(e.source())}else{n=[typeof n==="string"?n:n.source(),e.source()]}};const u=()=>{if(Array.isArray(n)){const t=new i(n.join(""));a.add(t);e.push(t)}else if(typeof n==="string"){const t=new i(n);a.add(t);e.push(t)}else{e.push(n)}};for(const i of this._children){if(typeof i==="string"){if(t===undefined){t=i}else{t+=i}}else{if(t!==undefined){s(t);t=undefined}if(a.has(i)){r(i)}else{if(n!==undefined){u();n=undefined}e.push(i)}}}if(t!==undefined){s(t)}if(n!==undefined){u()}this._children=e;this._isOptimized=true}}e.exports=ConcatSource},389:function(e,t,n){"use strict";const s=n(598);const{SourceNode:i}=n(241);const{SourceListMap:r}=n(728);const{getSourceAndMap:u,getMap:o}=n(791);const f=/(?!$)[^\n\r;{}]*[\n\r;{}]*/g;function _splitCode(e){return e.match(f)||[]}class OriginalSource extends s{constructor(e,t){super();const n=Buffer.isBuffer(e);this._value=n?undefined:e;this._valueAsBuffer=n?e:undefined;this._name=t}getName(){return this._name}source(){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return this._value}buffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}return this._valueAsBuffer}map(e){return o(this,e)}sourceAndMap(e){return u(this,e)}node(e){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}const t=this._value;const n=this._name;const s=t.split("\n");const r=new i(null,null,null,s.map(function(t,r){let u=0;if(e&&e.columns===false){const e=t+(r!==s.length-1?"\n":"");return new i(r+1,0,n,e)}return new i(null,null,null,_splitCode(t+(r!==s.length-1?"\n":"")).map(function(e){if(/^\s*$/.test(e)){u+=e.length;return e}const t=new i(r+1,u,n,e);u+=e.length;return t}))}));r.setSourceContent(n,t);return r}listMap(e){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return new r(this._value,this._name,this._value)}updateHash(e){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}e.update("OriginalSource");e.update(this._valueAsBuffer);e.update(this._name||"")}}e.exports=OriginalSource},193:function(e,t,n){"use strict";const s=n(598);const i=n(891);const{SourceNode:r}=n(241);const{getSourceAndMap:u,getMap:o}=n(791);const f=/\n(?=.|\s)/g;class PrefixSource extends s{constructor(e,t){super();this._source=typeof t==="string"||Buffer.isBuffer(t)?new i(t,true):t;this._prefix=e}getPrefix(){return this._prefix}original(){return this._source}source(){const e=this._source.source();const t=this._prefix;return t+e.replace(f,"\n"+t)}map(e){return o(this,e)}sourceAndMap(e){return u(this,e)}node(e){const t=this._source.node(e);const n=this._prefix;const s=[];const i=new r;t.walkSourceContents(function(e,t){i.setSourceContent(e,t)});let u=true;t.walk(function(e,t){const i=e.split(/(\n)/);for(let e=0;e{return e.insertIndex-t.insertIndex});return e}replace(e,t,n,s){if(typeof n!=="string")throw new Error("insertion must be a string, but is a "+typeof n);this._replacements.push(new Replacement(e,t,n,this._replacements.length,s));this._isSorted=false}insert(e,t,n){if(typeof t!=="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new Replacement(e,e-1,t,this._replacements.length,n));this._isSorted=false}source(){return this._replaceString(this._source.source())}map(e){if(this._replacements.length===0){return this._source.map(e)}return u(this,e)}sourceAndMap(e){if(this._replacements.length===0){return this._source.sourceAndMap(e)}return r(this,e)}original(){return this._source}_sortReplacements(){if(this._isSorted)return;this._replacements.sort(function(e,t){const n=t.end-e.end;if(n!==0)return n;const s=t.start-e.start;if(s!==0)return s;return t.insertIndex-e.insertIndex});this._isSorted=true}_replaceString(e){if(typeof e!=="string")throw new Error("str must be a string, but is a "+typeof e+": "+e);this._sortReplacements();const t=[e];this._replacements.forEach(function(e){const n=t.pop();const s=this._splitString(n,Math.floor(e.end+1));const i=this._splitString(s[0],Math.floor(e.start));t.push(s[1],e.content,i[0])},this);let n="";for(let e=t.length-1;e>=0;--e){n+=t[e]}return n}node(e){const t=o(this._source,e);if(this._replacements.length===0){return t}this._sortReplacements();const n=new ReplacementEnumerator(this._replacements);const s=[];let r=0;const u=Object.create(null);const f=Object.create(null);const c=new i;t.walkSourceContents(function(e,t){c.setSourceContent(e,t);u["$"+e]=t});const h=this._replaceInStringNode.bind(this,s,n,function getOriginalSource(e){const t="$"+e.source;let n=f[t];if(!n){const e=u[t];if(!e)return null;n=e.split("\n").map(function(e){return e+"\n"});f[t]=n}if(e.line>n.length)return null;const s=n[e.line-1];return s.substr(e.column)});t.walk(function(e,t){r=h(e,r,t)});const a=n.footer();if(a){s.push(a)}c.add(s);return c}listMap(e){let t=f(this._source,e);this._sortReplacements();let n=0;const s=this._replacements;let i=s.length-1;let r=0;t=t.mapGeneratedCode(function(e){const t=n+e.length;if(r>e.length){r-=e.length;e=""}else{if(r>0){e=e.substr(r);n+=r;r=0}let u="";while(i>=0&&s[i].start=0){u+=s[i].content;i--}if(u){t.add(u)}return t}_splitString(e,t){return t<=0?["",e]:[e.substr(0,t),e.substr(t)]}_replaceInStringNode(e,t,n,s,r,u){let o=undefined;do{let f=t.position-r;if(f<0){f=0}if(f>=s.length||t.done){if(t.emit){const t=new i(u.line,u.column,u.source,s,u.name);e.push(t)}return r+s.length}const c=u.column;let h;if(f>0){h=s.slice(0,f);if(o===undefined){o=n(u)}if(o&&o.length>=f&&o.startsWith(h)){u.column+=f;o=o.substr(f)}}const a=t.next();if(!a){if(f>0){const t=new i(u.line,c,u.source,h,u.name);e.push(t)}if(t.value){e.push(new i(u.line,u.column,u.source,t.value,u.name||t.name))}}s=s.substr(f);r+=f}while(true)}updateHash(e){this._sortReplacements();e.update("ReplaceSource");this._source.updateHash(e);e.update(this._name||"");for(const t of this._replacements){e.update(`${t.start}`);e.update(`${t.end}`);e.update(`${t.content}`);e.update(`${t.insertIndex}`);e.update(`${t.name}`)}}}class ReplacementEnumerator{constructor(e){this.replacements=e||[];this.index=this.replacements.length;this.done=false;this.emit=false;this.next()}next(){if(this.done)return true;if(this.emit){const e=this.replacements[this.index];const t=Math.floor(e.end+1);this.position=t;this.value=e.content;this.name=e.name}else{this.index--;if(this.index<0){this.done=true}else{const e=this.replacements[this.index];const t=Math.floor(e.start);this.position=t}}if(this.position<0)this.position=0;this.emit=!this.emit;return this.emit}footer(){if(!this.done&&!this.emit)this.next();if(this.done){return[]}else{let e="";for(let t=this.index;t>=0;t--){const n=this.replacements[t];e+=n.content}return e}}}e.exports=ReplaceSource},271:function(e,t,n){"use strict";const s=n(598);class SizeOnlySource extends s{constructor(e){super();this._size=e}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(e){throw this._error()}updateHash(){throw this._error()}}e.exports=SizeOnlySource},598:function(e){"use strict";class Source{source(){throw new Error("Abstract")}buffer(){const e=this.source();if(Buffer.isBuffer(e))return e;return Buffer.from(e,"utf-8")}size(){return this.buffer().length}map(e){return null}sourceAndMap(e){return{source:this.source(),map:this.map(e)}}updateHash(e){throw new Error("Abstract")}}e.exports=Source},287:function(e,t,n){"use strict";const s=n(598);const{SourceNode:i,SourceMapConsumer:r}=n(241);const{SourceListMap:u,fromStringWithSourceMap:o}=n(728);const{getSourceAndMap:f,getMap:c}=n(791);const h=n(462);class SourceMapSource extends s{constructor(e,t,n,s,i,r){super();const u=Buffer.isBuffer(e);this._valueAsString=u?undefined:e;this._valueAsBuffer=u?e:undefined;this._name=t;this._hasSourceMap=!!n;const o=Buffer.isBuffer(n);const f=typeof n==="string";this._sourceMapAsObject=o||f?undefined:n;this._sourceMapAsString=f?n:undefined;this._sourceMapAsBuffer=o?n:undefined;this._hasOriginalSource=!!s;const c=Buffer.isBuffer(s);this._originalSourceAsString=c?undefined:s;this._originalSourceAsBuffer=c?s:undefined;this._hasInnerSourceMap=!!i;const h=Buffer.isBuffer(i);const a=typeof i==="string";this._innerSourceMapAsObject=h||a?undefined:i;this._innerSourceMapAsString=a?i:undefined;this._innerSourceMapAsBuffer=h?i:undefined;this._removeOriginalSource=r}_ensureValueBuffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8")}}_ensureValueString(){if(this._valueAsString===undefined){this._valueAsString=this._valueAsBuffer.toString("utf-8")}}_ensureOriginalSourceBuffer(){if(this._originalSourceAsBuffer===undefined&&this._hasOriginalSource){this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8")}}_ensureOriginalSourceString(){if(this._originalSourceAsString===undefined&&this._hasOriginalSource){this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8")}}_ensureInnerSourceMapObject(){if(this._innerSourceMapAsObject===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString)}}_ensureInnerSourceMapBuffer(){if(this._innerSourceMapAsBuffer===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8")}}_ensureInnerSourceMapString(){if(this._innerSourceMapAsString===undefined&&this._hasInnerSourceMap){if(this._innerSourceMapAsBuffer!==undefined){this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8")}else{this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject)}}}_ensureSourceMapObject(){if(this._sourceMapAsObject===undefined){this._ensureSourceMapString();this._sourceMapAsObject=JSON.parse(this._sourceMapAsString)}}_ensureSourceMapBuffer(){if(this._sourceMapAsBuffer===undefined){this._ensureSourceMapString();this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8")}}_ensureSourceMapString(){if(this._sourceMapAsString===undefined){if(this._sourceMapAsBuffer!==undefined){this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8")}else{this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject)}}}getArgsAsBuffers(){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();return[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}source(){this._ensureValueString();return this._valueAsString}map(e){if(!this._hasInnerSourceMap){this._ensureSourceMapObject();return this._sourceMapAsObject}return c(this,e)}sourceAndMap(e){if(!this._hasInnerSourceMap){this._ensureValueString();this._ensureSourceMapObject();return{source:this._valueAsString,map:this._sourceMapAsObject}}return f(this,e)}node(e){this._ensureValueString();this._ensureSourceMapObject();this._ensureOriginalSourceString();let t=i.fromStringWithSourceMap(this._valueAsString,new r(this._sourceMapAsObject));t.setSourceContent(this._name,this._originalSourceAsString);if(this._hasInnerSourceMap){this._ensureInnerSourceMapObject();t=h(t,new r(this._innerSourceMapAsObject),this._name,this._removeOriginalSource)}return t}listMap(e){this._ensureValueString();this._ensureSourceMapObject();e=e||{};if(e.module===false)return new u(this._valueAsString,this._name,this._valueAsString);return o(this._valueAsString,this._sourceMapAsObject)}updateHash(e){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();e.update("SourceMapSource");e.update(this._valueAsBuffer);e.update(this._sourceMapAsBuffer);if(this._hasOriginalSource){e.update(this._originalSourceAsBuffer)}if(this._hasInnerSourceMap){e.update(this._innerSourceMapAsBuffer)}e.update(this._removeOriginalSource?"true":"false")}}e.exports=SourceMapSource},462:function(e,t,n){"use strict";const s=n(241).SourceNode;const i=n(241).SourceMapConsumer;const r=function(e,t,n,r){const u=new s;const o=[];const f={};const c={};const h={};const a={};t.eachMapping(function(e){(c[e.generatedLine]=c[e.generatedLine]||[]).push(e)},null,i.GENERATED_ORDER);const l=(e,t)=>{const n=c[e];let s=0;let i=n.length;while(s>1;if(n[e].generatedColumn<=t){s=e+1}else{i=e}}if(s===0)return undefined;return n[s-1]};e.walkSourceContents(function(e,t){f["$"+e]=t});const d=f["$"+n];const p=d?d.split("\n"):undefined;e.walk(function(e,i){if(i.source===n&&i.line&&c[i.line]){let n=l(i.line,i.column);if(n){let r=false;let f;let c;let l;const d=n.source;if(p&&d&&(f=p[n.generatedLine-1])&&((l=a[d])||(c=t.sourceContentFor(d,true)))){if(!l){l=a[d]=c.split("\n")}const e=l[n.originalLine-1];if(e){const t=i.column-n.generatedColumn;if(t>0){const s=f.slice(n.generatedColumn,i.column);const r=e.slice(n.originalColumn,n.originalColumn+t);if(s===r){n=Object.assign({},n,{originalColumn:n.originalColumn+t,generatedColumn:i.column,name:undefined})}}if(!n.name&&i.name){r=e.slice(n.originalColumn,n.originalColumn+i.name.length)===i.name}}}let _=n.source;if(_&&_!=="."){o.push(new s(n.originalLine,n.originalColumn,_,e,r?i.name:n.name));if(!("$"+_ in h)){h["$"+_]=true;const e=t.sourceContentFor(_,true);if(e){u.setSourceContent(_,e)}}return}}}if(r&&i.source===n||!i.source){o.push(e);return}const d=i.source;o.push(new s(i.line,i.column,d,e,i.name));if("$"+d in f){if(!("$"+d in h)){u.setSourceContent(d,f["$"+d]);delete f["$"+d]}}});u.add(o);return u};e.exports=r},791:function(e,t,n){"use strict";const{SourceNode:s,SourceMapConsumer:i}=n(241);const{SourceListMap:r,fromStringWithSourceMap:u}=n(728);t.getSourceAndMap=((e,t)=>{let n;let s;if(t&&t.columns===false){const i=e.listMap(t).toStringWithSourceMap({file:"x"});n=i.source;s=i.map}else{const i=e.node(t).toStringWithSourceMap({file:"x"});n=i.code;s=i.map.toJSON()}if(!s||!s.sources||s.sources.length===0)s=null;return{source:n,map:s}});t.getMap=((e,t)=>{let n;if(t&&t.columns===false){n=e.listMap(t).toStringWithSourceMap({file:"x"}).map}else{n=e.node(t).toStringWithSourceMap({file:"x"}).map.toJSON()}if(!n||!n.sources||n.sources.length===0)return null;return n});t.getNode=((e,t)=>{if(typeof e.node==="function"){return e.node(t)}else{const n=e.sourceAndMap(t);if(n.map){return s.fromStringWithSourceMap(n.source,new i(n.map))}else{return new s(null,null,null,n.source)}}});t.getListMap=((e,t)=>{if(typeof e.listMap==="function"){return e.listMap(t)}else{const n=e.sourceAndMap(t);if(n.map){return u(n.source,n.map)}else{return new r(n.source)}}})},351:function(e,t,n){const s=(e,n)=>{let s;Object.defineProperty(t,e,{get:()=>{if(n!==undefined){s=n();n=undefined}return s},configurable:true})};s("Source",()=>n(598));s("RawSource",()=>n(891));s("OriginalSource",()=>n(389));s("SourceMapSource",()=>n(287));s("CachedSource",()=>n(357));s("ConcatSource",()=>n(944));s("ReplaceSource",()=>n(588));s("PrefixSource",()=>n(193));s("SizeOnlySource",()=>n(271));s("CompatSource",()=>n(973))},241:function(e){"use strict";e.exports=require("next/dist/compiled/source-map")}};var t={};function __nccwpck_require__(n){if(t[n]){return t[n].exports}var s=t[n]={exports:{}};var i=true;try{e[n](s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete t[n]}return s.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(351)}(); \ No newline at end of file diff --git a/packages/next/compiled/webpack/bundle5.js b/packages/next/compiled/webpack/bundle5.js index b4b7850b317ce..fd81231f8ac8c 100644 --- a/packages/next/compiled/webpack/bundle5.js +++ b/packages/next/compiled/webpack/bundle5.js @@ -54,7 +54,7 @@ module.exports = JSON.parse("{\"name\":\"terser\",\"description\":\"JavaScript p /***/ (function(module) { "use strict"; -module.exports = {"i8":"5.37.0"}; +module.exports = {"i8":"5.38.1"}; /***/ }), @@ -62,7 +62,7 @@ module.exports = {"i8":"5.37.0"}; /***/ (function(module) { "use strict"; -module.exports = JSON.parse("{\"definitions\":{\"Amd\":{\"description\":\"Set the value of `require.amd` and `define.amd`. Or disable AMD support.\",\"anyOf\":[{\"description\":\"You can pass `false` to disable AMD support.\",\"enum\":[false]},{\"description\":\"You can pass an object to set the value of `require.amd` and `define.amd`.\",\"type\":\"object\"}]},\"AssetFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((name: string, asset: import('../lib/stats/DefaultStatsFactoryPlugin').StatsAsset) => boolean)\"}]},\"AssetFilterTypes\":{\"description\":\"Filtering modules.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/AssetFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/AssetFilterItemTypes\"}]},\"AssetGeneratorDataUrl\":{\"description\":\"The options for data url generator.\",\"anyOf\":[{\"$ref\":\"#/definitions/AssetGeneratorDataUrlOptions\"},{\"$ref\":\"#/definitions/AssetGeneratorDataUrlFunction\"}]},\"AssetGeneratorDataUrlFunction\":{\"description\":\"Function that executes for module and should return an DataUrl string.\",\"instanceof\":\"Function\",\"tsType\":\"((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => string)\"},\"AssetGeneratorDataUrlOptions\":{\"description\":\"Options object for data url generation.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"encoding\":{\"description\":\"Asset encoding (defaults to base64).\",\"enum\":[false,\"base64\"]},\"mimetype\":{\"description\":\"Asset mimetype (getting from file extension by default).\",\"type\":\"string\"}}},\"AssetGeneratorOptions\":{\"description\":\"Generator options for asset modules.\",\"type\":\"object\",\"implements\":[\"#/definitions/AssetInlineGeneratorOptions\",\"#/definitions/AssetResourceGeneratorOptions\"],\"additionalProperties\":false,\"properties\":{\"dataUrl\":{\"$ref\":\"#/definitions/AssetGeneratorDataUrl\"},\"emit\":{\"description\":\"Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.\",\"type\":\"boolean\"},\"filename\":{\"$ref\":\"#/definitions/FilenameTemplate\"},\"publicPath\":{\"$ref\":\"#/definitions/RawPublicPath\"}}},\"AssetInlineGeneratorOptions\":{\"description\":\"Generator options for asset/inline modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dataUrl\":{\"$ref\":\"#/definitions/AssetGeneratorDataUrl\"}}},\"AssetModuleFilename\":{\"description\":\"The filename of asset modules as relative path inside the 'output.path' directory.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"AssetParserDataUrlFunction\":{\"description\":\"Function that executes for module and should return whenever asset should be inlined as DataUrl.\",\"instanceof\":\"Function\",\"tsType\":\"((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => boolean)\"},\"AssetParserDataUrlOptions\":{\"description\":\"Options object for DataUrl condition.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"maxSize\":{\"description\":\"Maximum size of asset that should be inline as modules. Default: 8kb.\",\"type\":\"number\"}}},\"AssetParserOptions\":{\"description\":\"Parser options for asset modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dataUrlCondition\":{\"description\":\"The condition for inlining the asset as DataUrl.\",\"anyOf\":[{\"$ref\":\"#/definitions/AssetParserDataUrlOptions\"},{\"$ref\":\"#/definitions/AssetParserDataUrlFunction\"}]}}},\"AssetResourceGeneratorOptions\":{\"description\":\"Generator options for asset/resource modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"emit\":{\"description\":\"Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.\",\"type\":\"boolean\"},\"filename\":{\"$ref\":\"#/definitions/FilenameTemplate\"},\"publicPath\":{\"$ref\":\"#/definitions/RawPublicPath\"}}},\"AuxiliaryComment\":{\"description\":\"Add a comment in the UMD wrapper.\",\"anyOf\":[{\"description\":\"Append the same comment above each import style.\",\"type\":\"string\"},{\"$ref\":\"#/definitions/LibraryCustomUmdCommentObject\"}]},\"Bail\":{\"description\":\"Report the first error as a hard error instead of tolerating it.\",\"type\":\"boolean\"},\"CacheOptions\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"Enable in memory caching.\",\"enum\":[true]},{\"$ref\":\"#/definitions/CacheOptionsNormalized\"}]},\"CacheOptionsNormalized\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"Disable caching.\",\"enum\":[false]},{\"$ref\":\"#/definitions/MemoryCacheOptions\"},{\"$ref\":\"#/definitions/FileCacheOptions\"}]},\"Charset\":{\"description\":\"Add charset attribute for script tag.\",\"type\":\"boolean\"},\"ChunkFilename\":{\"description\":\"Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"ChunkFormat\":{\"description\":\"The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"array-push\",\"commonjs\",false]},{\"type\":\"string\"}]},\"ChunkLoadTimeout\":{\"description\":\"Number of milliseconds before chunk request expires.\",\"type\":\"number\"},\"ChunkLoading\":{\"description\":\"The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/ChunkLoadingType\"}]},\"ChunkLoadingGlobal\":{\"description\":\"The global variable used by webpack for loading of chunks.\",\"type\":\"string\"},\"ChunkLoadingType\":{\"description\":\"The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"jsonp\",\"import-scripts\",\"require\",\"async-node\"]},{\"type\":\"string\"}]},\"Clean\":{\"description\":\"Clean the output directory before emit.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/CleanOptions\"}]},\"CleanOptions\":{\"description\":\"Advanced options for cleaning assets.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dry\":{\"description\":\"Log the assets that should be removed instead of deleting them.\",\"type\":\"boolean\"},\"keep\":{\"description\":\"Keep these assets.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((filename: string) => boolean)\"}]}}},\"CompareBeforeEmit\":{\"description\":\"Check if to be emitted file already exists and have the same content before writing to output filesystem.\",\"type\":\"boolean\"},\"Context\":{\"description\":\"The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.\",\"type\":\"string\",\"absolutePath\":true},\"CrossOriginLoading\":{\"description\":\"This option enables cross-origin loading of chunks.\",\"enum\":[false,\"anonymous\",\"use-credentials\"]},\"Dependencies\":{\"description\":\"References to other configurations to depend on.\",\"type\":\"array\",\"items\":{\"description\":\"References to another configuration to depend on.\",\"type\":\"string\"}},\"DevServer\":{\"description\":\"Options for the webpack-dev-server.\",\"type\":\"object\"},\"DevTool\":{\"description\":\"A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).\",\"anyOf\":[{\"enum\":[false,\"eval\"]},{\"type\":\"string\",\"pattern\":\"^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\"}]},\"DevtoolFallbackModuleFilenameTemplate\":{\"description\":\"Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"DevtoolModuleFilenameTemplate\":{\"description\":\"Filename template string of function for the sources array in a generated SourceMap.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"DevtoolNamespace\":{\"description\":\"Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.\",\"type\":\"string\"},\"EmptyGeneratorOptions\":{\"description\":\"No generator options are supported for this module type.\",\"type\":\"object\",\"additionalProperties\":false},\"EmptyParserOptions\":{\"description\":\"No parser options are supported for this module type.\",\"type\":\"object\",\"additionalProperties\":false},\"EnabledChunkLoadingTypes\":{\"description\":\"List of chunk loading types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ChunkLoadingType\"}},\"EnabledLibraryTypes\":{\"description\":\"List of library types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/LibraryType\"}},\"EnabledWasmLoadingTypes\":{\"description\":\"List of wasm loading types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/WasmLoadingType\"}},\"Entry\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamic\"},{\"$ref\":\"#/definitions/EntryStatic\"}]},\"EntryDescription\":{\"description\":\"An object with entry point description.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"dependOn\":{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"anyOf\":[{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"type\":\"array\",\"items\":{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1}]},\"filename\":{\"$ref\":\"#/definitions/EntryFilename\"},\"import\":{\"$ref\":\"#/definitions/EntryItem\"},\"layer\":{\"$ref\":\"#/definitions/Layer\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"runtime\":{\"$ref\":\"#/definitions/EntryRuntime\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}},\"required\":[\"import\"]},\"EntryDescriptionNormalized\":{\"description\":\"An object with entry point description.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"dependOn\":{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"type\":\"array\",\"items\":{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"import\":{\"description\":\"Module(s) that are loaded upon startup. The last one is exported.\",\"type\":\"array\",\"items\":{\"description\":\"Module that is loaded upon startup. Only the last one is exported.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"layer\":{\"$ref\":\"#/definitions/Layer\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"runtime\":{\"$ref\":\"#/definitions/EntryRuntime\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"EntryDynamic\":{\"description\":\"A Function returning an entry object, an entry string, an entry array or a promise to these things.\",\"instanceof\":\"Function\",\"tsType\":\"(() => EntryStatic | Promise)\"},\"EntryDynamicNormalized\":{\"description\":\"A Function returning a Promise resolving to a normalized entry.\",\"instanceof\":\"Function\",\"tsType\":\"(() => Promise)\"},\"EntryFilename\":{\"description\":\"Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"EntryItem\":{\"description\":\"Module(s) that are loaded upon startup.\",\"anyOf\":[{\"description\":\"All modules are loaded upon startup. The last one is exported.\",\"type\":\"array\",\"items\":{\"description\":\"A module that is loaded upon startup. Only the last one is exported.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},{\"description\":\"The string is resolved to a module which is loaded upon startup.\",\"type\":\"string\",\"minLength\":1}]},\"EntryNormalized\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamicNormalized\"},{\"$ref\":\"#/definitions/EntryStaticNormalized\"}]},\"EntryObject\":{\"description\":\"Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An entry point with name.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryItem\"},{\"$ref\":\"#/definitions/EntryDescription\"}]}},\"EntryRuntime\":{\"description\":\"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\",\"type\":\"string\",\"minLength\":1},\"EntryStatic\":{\"description\":\"A static entry description.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryObject\"},{\"$ref\":\"#/definitions/EntryUnnamed\"}]},\"EntryStaticNormalized\":{\"description\":\"Multiple entry bundles are created. The key is the entry name. The value is an entry description object.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An object with entry point description.\",\"oneOf\":[{\"$ref\":\"#/definitions/EntryDescriptionNormalized\"}]}},\"EntryUnnamed\":{\"description\":\"An entry point without name.\",\"oneOf\":[{\"$ref\":\"#/definitions/EntryItem\"}]},\"Environment\":{\"description\":\"The abilities of the environment where the webpack generated code should run.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"arrowFunction\":{\"description\":\"The environment supports arrow functions ('() => { ... }').\",\"type\":\"boolean\"},\"bigIntLiteral\":{\"description\":\"The environment supports BigInt as literal (123n).\",\"type\":\"boolean\"},\"const\":{\"description\":\"The environment supports const and let for variable declarations.\",\"type\":\"boolean\"},\"destructuring\":{\"description\":\"The environment supports destructuring ('{ a, b } = obj').\",\"type\":\"boolean\"},\"dynamicImport\":{\"description\":\"The environment supports an async import() function to import EcmaScript modules.\",\"type\":\"boolean\"},\"forOf\":{\"description\":\"The environment supports 'for of' iteration ('for (const x of array) { ... }').\",\"type\":\"boolean\"},\"module\":{\"description\":\"The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').\",\"type\":\"boolean\"}}},\"Experiments\":{\"description\":\"Enables/Disables experiments (experimental features with relax SemVer compatibility).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"asset\":{\"description\":\"Allow module type 'asset' to generate assets.\",\"type\":\"boolean\"},\"asyncWebAssembly\":{\"description\":\"Support WebAssembly as asynchronous EcmaScript Module.\",\"type\":\"boolean\"},\"executeModule\":{\"description\":\"Enable build-time execution of modules from the module graph for plugins and loaders.\",\"type\":\"boolean\"},\"layers\":{\"description\":\"Enable module and chunk layers.\",\"type\":\"boolean\"},\"lazyCompilation\":{\"description\":\"Compile entrypoints and import()s only when they are accessed.\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"backend\":{\"description\":\"A custom backend.\",\"instanceof\":\"Function\",\"tsType\":\"(((compiler: import('../lib/Compiler'), client: string, callback: (err?: Error, api?: any) => void) => void) | ((compiler: import('../lib/Compiler'), client: string) => Promise))\"},\"client\":{\"description\":\"A custom client.\",\"type\":\"string\"},\"entries\":{\"description\":\"Enable/disable lazy compilation for entries.\",\"type\":\"boolean\"},\"imports\":{\"description\":\"Enable/disable lazy compilation for import() modules.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((module: import('../lib/Module')) => boolean)\"}]}}}]},\"outputModule\":{\"description\":\"Allow output javascript files as module source type.\",\"type\":\"boolean\"},\"syncWebAssembly\":{\"description\":\"Support WebAssembly as synchronous EcmaScript Module (outdated).\",\"type\":\"boolean\"},\"topLevelAwait\":{\"description\":\"Allow using top-level-await in EcmaScript Modules.\",\"type\":\"boolean\"}}},\"ExternalItem\":{\"description\":\"Specify dependency that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"description\":\"Every matched dependency becomes external.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An exact matched dependency becomes external. The same string is used as external dependency.\",\"type\":\"string\"},{\"description\":\"If an dependency matches exactly a property of the object, the property value is used as dependency.\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/ExternalItemValue\"},\"properties\":{\"byLayer\":{\"description\":\"Specify externals depending on the layer.\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/ExternalItem\"}},{\"instanceof\":\"Function\",\"tsType\":\"((layer: string | null) => ExternalItem)\"}]}}},{\"description\":\"The function is called on each dependency (`function(context, request, callback(err, result))`).\",\"instanceof\":\"Function\",\"tsType\":\"(((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise))\"}]},\"ExternalItemFunctionData\":{\"description\":\"Data object passed as argument when a function is set for 'externals'.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"context\":{\"description\":\"The directory in which the request is placed.\",\"type\":\"string\"},\"contextInfo\":{\"description\":\"Contextual information.\",\"type\":\"object\",\"tsType\":\"import('../lib/ModuleFactory').ModuleFactoryCreateDataContextInfo\"},\"getResolve\":{\"description\":\"Get a resolve function with the current resolver options.\",\"instanceof\":\"Function\",\"tsType\":\"((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error, result?: string) => void) => void) | ((context: string, request: string) => Promise))\"},\"request\":{\"description\":\"The request as written by the user in the require/import expression/statement.\",\"type\":\"string\"}}},\"ExternalItemValue\":{\"description\":\"The dependency used for the external.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A part of the target of the external.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"`true`: The dependency name is used as target of the external.\",\"type\":\"boolean\"},{\"description\":\"The target of the external.\",\"type\":\"string\"},{\"type\":\"object\"}]},\"Externals\":{\"description\":\"Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ExternalItem\"}},{\"$ref\":\"#/definitions/ExternalItem\"}]},\"ExternalsPresets\":{\"description\":\"Enable presets of externals for specific targets.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"electron\":{\"description\":\"Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronMain\":{\"description\":\"Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronPreload\":{\"description\":\"Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronRenderer\":{\"description\":\"Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"node\":{\"description\":\"Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.\",\"type\":\"boolean\"},\"nwjs\":{\"description\":\"Treat NW.js legacy nw.gui module as external and load it via require() when used.\",\"type\":\"boolean\"},\"web\":{\"description\":\"Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).\",\"type\":\"boolean\"},\"webAsync\":{\"description\":\"Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).\",\"type\":\"boolean\"}}},\"ExternalsType\":{\"description\":\"Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).\",\"enum\":[\"var\",\"module\",\"assign\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\",\"promise\",\"import\",\"script\"]},\"FileCacheOptions\":{\"description\":\"Options object for persistent file-based caching.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"allowCollectingMemory\":{\"description\":\"Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.\",\"type\":\"boolean\"},\"buildDependencies\":{\"description\":\"Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"List of dependencies the build depends on.\",\"type\":\"array\",\"items\":{\"description\":\"Request to a dependency (resolved as directory relative to the context directory).\",\"type\":\"string\",\"minLength\":1}}},\"cacheDirectory\":{\"description\":\"Base directory for the cache (defaults to node_modules/.cache/webpack).\",\"type\":\"string\",\"absolutePath\":true},\"cacheLocation\":{\"description\":\"Locations for the cache (defaults to cacheDirectory / name).\",\"type\":\"string\",\"absolutePath\":true},\"hashAlgorithm\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package).\",\"type\":\"string\"},\"idleTimeout\":{\"description\":\"Time in ms after which idle period the cache storing should happen (only for store: 'pack').\",\"type\":\"number\",\"minimum\":0},\"idleTimeoutForInitialStore\":{\"description\":\"Time in ms after which idle period the initial cache storing should happen (only for store: 'pack').\",\"type\":\"number\",\"minimum\":0},\"immutablePaths\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"type\":\"array\",\"items\":{\"description\":\"A path to a immutable directory (usually a package manager cache directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}},\"managedPaths\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"type\":\"array\",\"items\":{\"description\":\"A path to a managed directory (usually a node_modules directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}},\"maxAge\":{\"description\":\"Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).\",\"type\":\"number\",\"minimum\":0},\"maxMemoryGenerations\":{\"description\":\"Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.\",\"type\":\"number\",\"minimum\":0},\"name\":{\"description\":\"Name for the cache. Different names will lead to different coexisting caches.\",\"type\":\"string\"},\"profile\":{\"description\":\"Track and log detailed timing information for individual cache items.\",\"type\":\"boolean\"},\"store\":{\"description\":\"When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).\",\"enum\":[\"pack\"]},\"type\":{\"description\":\"Filesystem caching.\",\"enum\":[\"filesystem\"]},\"version\":{\"description\":\"Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.\",\"type\":\"string\"}},\"required\":[\"type\"]},\"Filename\":{\"description\":\"Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"FilenameTemplate\":{\"description\":\"Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"FilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"}]},\"FilterTypes\":{\"description\":\"Filtering values.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/FilterItemTypes\"}]}},{\"$ref\":\"#/definitions/FilterItemTypes\"}]},\"GeneratorOptionsByModuleType\":{\"description\":\"Specify options for each generator.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options for generating.\",\"type\":\"object\",\"additionalProperties\":true},\"properties\":{\"asset\":{\"$ref\":\"#/definitions/AssetGeneratorOptions\"},\"asset/inline\":{\"$ref\":\"#/definitions/AssetInlineGeneratorOptions\"},\"asset/resource\":{\"$ref\":\"#/definitions/AssetResourceGeneratorOptions\"},\"javascript\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/auto\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/dynamic\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/esm\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"}}},\"GlobalObject\":{\"description\":\"An expression which is used to address the global object/scope in runtime code.\",\"type\":\"string\",\"minLength\":1},\"HashDigest\":{\"description\":\"Digest type used for the hash.\",\"type\":\"string\"},\"HashDigestLength\":{\"description\":\"Number of chars which are used for the hash.\",\"type\":\"number\",\"minimum\":1},\"HashFunction\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package).\",\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"typeof import('../lib/util/Hash')\"}]},\"HashSalt\":{\"description\":\"Any string which is added to the hash to salt it.\",\"type\":\"string\",\"minLength\":1},\"HotUpdateChunkFilename\":{\"description\":\"The filename of the Hot Update Chunks. They are inside the output.path directory.\",\"type\":\"string\",\"absolutePath\":false},\"HotUpdateGlobal\":{\"description\":\"The global variable used by webpack for loading of hot update chunks.\",\"type\":\"string\"},\"HotUpdateMainFilename\":{\"description\":\"The filename of the Hot Update Main File. It is inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"IgnoreWarnings\":{\"description\":\"Ignore specific warnings.\",\"type\":\"array\",\"items\":{\"description\":\"Ignore specific warnings.\",\"anyOf\":[{\"description\":\"A RegExp to select the warning message.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"file\":{\"description\":\"A RegExp to select the origin file for the warning.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"message\":{\"description\":\"A RegExp to select the warning message.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"module\":{\"description\":\"A RegExp to select the origin module for the warning.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},{\"description\":\"A custom function to select warnings based on the raw warning instance.\",\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)\"}]}},\"IgnoreWarningsNormalized\":{\"description\":\"Ignore specific warnings.\",\"type\":\"array\",\"items\":{\"description\":\"A function to select warnings based on the raw warning instance.\",\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)\"}},\"Iife\":{\"description\":\"Wrap javascript code into IIFE's to avoid leaking into global scope.\",\"type\":\"boolean\"},\"ImportFunctionName\":{\"description\":\"The name of the native import() function (can be exchanged for a polyfill).\",\"type\":\"string\"},\"ImportMetaName\":{\"description\":\"The name of the native import.meta object (can be exchanged for a polyfill).\",\"type\":\"string\"},\"InfrastructureLogging\":{\"description\":\"Options for infrastructure level logging.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"appendOnly\":{\"description\":\"Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided.\",\"type\":\"boolean\"},\"colors\":{\"description\":\"Enables/Disables colorful output. This option is only used when no custom console is provided.\",\"type\":\"boolean\"},\"console\":{\"description\":\"Custom console used for logging.\",\"tsType\":\"Console\"},\"debug\":{\"description\":\"Enable debug logging for specific loggers.\",\"anyOf\":[{\"description\":\"Enable/Disable debug logging for all loggers.\",\"type\":\"boolean\"},{\"$ref\":\"#/definitions/FilterTypes\"}]},\"level\":{\"description\":\"Log level.\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]},\"stream\":{\"description\":\"Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.\",\"tsType\":\"NodeJS.WritableStream\"}}},\"JavascriptParserOptions\":{\"description\":\"Parser options for javascript modules.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"browserify\":{\"description\":\"Enable/disable special handling for browserify bundles.\",\"type\":\"boolean\"},\"commonjs\":{\"description\":\"Enable/disable parsing of CommonJs syntax.\",\"type\":\"boolean\"},\"commonjsMagicComments\":{\"description\":\"Enable/disable parsing of magic comments in CommonJs syntax.\",\"type\":\"boolean\"},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies.\",\"type\":\"string\"},\"harmony\":{\"description\":\"Enable/disable parsing of EcmaScript Modules syntax.\",\"type\":\"boolean\"},\"import\":{\"description\":\"Enable/disable parsing of import() syntax.\",\"type\":\"boolean\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"requireContext\":{\"description\":\"Enable/disable parsing of require.context syntax.\",\"type\":\"boolean\"},\"requireEnsure\":{\"description\":\"Enable/disable parsing of require.ensure syntax.\",\"type\":\"boolean\"},\"requireInclude\":{\"description\":\"Enable/disable parsing of require.include syntax.\",\"type\":\"boolean\"},\"requireJs\":{\"description\":\"Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.\",\"type\":\"boolean\"},\"strictExportPresence\":{\"description\":\"Emit errors instead of warnings when imported names don't exist in imported module.\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects.\",\"type\":\"boolean\"},\"system\":{\"description\":\"Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way.\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way.\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way.\",\"type\":\"string\"},\"url\":{\"description\":\"Enable/disable parsing of new URL() syntax.\",\"anyOf\":[{\"enum\":[\"relative\"]},{\"type\":\"boolean\"}]},\"worker\":{\"description\":\"Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\\"xyz\\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"boolean\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies.\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies.\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"Layer\":{\"description\":\"Specifies the layer in which modules of this entrypoint are placed.\",\"anyOf\":[{\"enum\":[null]},{\"type\":\"string\",\"minLength\":1}]},\"Library\":{\"description\":\"Make the output files a library, exporting the exports of the entry point.\",\"anyOf\":[{\"$ref\":\"#/definitions/LibraryName\"},{\"$ref\":\"#/definitions/LibraryOptions\"}]},\"LibraryCustomUmdCommentObject\":{\"description\":\"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Set comment for `amd` section in UMD.\",\"type\":\"string\"},\"commonjs\":{\"description\":\"Set comment for `commonjs` (exports) section in UMD.\",\"type\":\"string\"},\"commonjs2\":{\"description\":\"Set comment for `commonjs2` (module.exports) section in UMD.\",\"type\":\"string\"},\"root\":{\"description\":\"Set comment for `root` (global variable) section in UMD.\",\"type\":\"string\"}}},\"LibraryCustomUmdObject\":{\"description\":\"Description object for all UMD variants of the library name.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Name of the exposed AMD library in the UMD.\",\"type\":\"string\",\"minLength\":1},\"commonjs\":{\"description\":\"Name of the exposed commonjs export in the UMD.\",\"type\":\"string\",\"minLength\":1},\"root\":{\"description\":\"Name of the property exposed globally by a UMD library.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the name of the property exposed globally by a UMD library.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}}},\"LibraryExport\":{\"description\":\"Specify which export should be exposed as library.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the export that should be exposed as library.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]},\"LibraryName\":{\"description\":\"The name of the library (some types allow unnamed libraries too).\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A part of the library name.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1},{\"type\":\"string\",\"minLength\":1},{\"$ref\":\"#/definitions/LibraryCustomUmdObject\"}]},\"LibraryOptions\":{\"description\":\"Options for library.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"auxiliaryComment\":{\"$ref\":\"#/definitions/AuxiliaryComment\"},\"export\":{\"$ref\":\"#/definitions/LibraryExport\"},\"name\":{\"$ref\":\"#/definitions/LibraryName\"},\"type\":{\"$ref\":\"#/definitions/LibraryType\"},\"umdNamedDefine\":{\"$ref\":\"#/definitions/UmdNamedDefine\"}},\"required\":[\"type\"]},\"LibraryType\":{\"description\":\"Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"var\",\"module\",\"assign\",\"assign-properties\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\"]},{\"type\":\"string\"}]},\"Loader\":{\"description\":\"Custom values available in the loader context.\",\"type\":\"object\"},\"MemoryCacheOptions\":{\"description\":\"Options object for in-memory caching.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"maxGenerations\":{\"description\":\"Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).\",\"type\":\"number\",\"minimum\":1},\"type\":{\"description\":\"In memory caching.\",\"enum\":[\"memory\"]}},\"required\":[\"type\"]},\"Mode\":{\"description\":\"Enable production optimizations or development hints.\",\"enum\":[\"development\",\"production\",\"none\"]},\"ModuleFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((name: string, module: import('../lib/stats/DefaultStatsFactoryPlugin').StatsModule, type: 'module' | 'chunk' | 'root-of-chunk' | 'nested') => boolean)\"}]},\"ModuleFilterTypes\":{\"description\":\"Filtering modules.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/ModuleFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/ModuleFilterItemTypes\"}]},\"ModuleOptions\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.\",\"type\":\"string\"},\"generator\":{\"$ref\":\"#/definitions/GeneratorOptionsByModuleType\"},\"noParse\":{\"$ref\":\"#/definitions/NoParse\"},\"parser\":{\"$ref\":\"#/definitions/ParserOptionsByModuleType\"},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"strictExportPresence\":{\"description\":\"Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.\",\"type\":\"string\"},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests.\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"ModuleOptionsNormalized\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"generator\":{\"$ref\":\"#/definitions/GeneratorOptionsByModuleType\"},\"noParse\":{\"$ref\":\"#/definitions/NoParse\"},\"parser\":{\"$ref\":\"#/definitions/ParserOptionsByModuleType\"},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests.\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}},\"required\":[\"defaultRules\",\"generator\",\"parser\",\"rules\"]},\"Name\":{\"description\":\"Name of the configuration. Used when loading multiple configurations.\",\"type\":\"string\"},\"NoParse\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"description\":\"A regular expression, when matched the module is not parsed.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An absolute path, when the module starts with this path it is not parsed.\",\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"minItems\":1},{\"description\":\"A regular expression, when matched the module is not parsed.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An absolute path, when the module starts with this path it is not parsed.\",\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"Node\":{\"description\":\"Include polyfills or mocks for various node stuff.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/NodeOptions\"}]},\"NodeOptions\":{\"description\":\"Options object for node compatibility features.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"__dirname\":{\"description\":\"Include a polyfill for the '__dirname' variable.\",\"enum\":[false,true,\"mock\",\"eval-only\"]},\"__filename\":{\"description\":\"Include a polyfill for the '__filename' variable.\",\"enum\":[false,true,\"mock\",\"eval-only\"]},\"global\":{\"description\":\"Include a polyfill for the 'global' variable.\",\"type\":\"boolean\"}}},\"Optimization\":{\"description\":\"Enables/Disables integrated optimizations.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"checkWasmTypes\":{\"description\":\"Check for incompatible wasm types when importing/exporting from/to ESM.\",\"type\":\"boolean\"},\"chunkIds\":{\"description\":\"Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).\",\"enum\":[\"natural\",\"named\",\"deterministic\",\"size\",\"total-size\",false]},\"concatenateModules\":{\"description\":\"Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.\",\"type\":\"boolean\"},\"emitOnErrors\":{\"description\":\"Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.\",\"type\":\"boolean\"},\"flagIncludedChunks\":{\"description\":\"Also flag chunks as loaded which contain a subset of the modules.\",\"type\":\"boolean\"},\"innerGraph\":{\"description\":\"Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.\",\"type\":\"boolean\"},\"mangleExports\":{\"description\":\"Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\\"deterministic\\\": generate short deterministic names optimized for caching, \\\"size\\\": generate the shortest possible names).\",\"anyOf\":[{\"enum\":[\"size\",\"deterministic\"]},{\"type\":\"boolean\"}]},\"mangleWasmImports\":{\"description\":\"Reduce size of WASM by changing imports to shorter strings.\",\"type\":\"boolean\"},\"mergeDuplicateChunks\":{\"description\":\"Merge chunks which contain the same modules.\",\"type\":\"boolean\"},\"minimize\":{\"description\":\"Enable minimizing the output. Uses optimization.minimizer.\",\"type\":\"boolean\"},\"minimizer\":{\"description\":\"Minimizer(s) to use for minimizing the output.\",\"type\":\"array\",\"cli\":{\"exclude\":true},\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"moduleIds\":{\"description\":\"Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).\",\"enum\":[\"natural\",\"named\",\"hashed\",\"deterministic\",\"size\",false]},\"noEmitOnErrors\":{\"description\":\"Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).\",\"type\":\"boolean\",\"cli\":{\"exclude\":true}},\"nodeEnv\":{\"description\":\"Set process.env.NODE_ENV to a specific value.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"}]},\"portableRecords\":{\"description\":\"Generate records with relative paths to be able to move the context folder.\",\"type\":\"boolean\"},\"providedExports\":{\"description\":\"Figure out which exports are provided by modules to generate more efficient code.\",\"type\":\"boolean\"},\"realContentHash\":{\"description\":\"Use real [contenthash] based on final content of the assets.\",\"type\":\"boolean\"},\"removeAvailableModules\":{\"description\":\"Removes modules from chunks when these modules are already included in all parents.\",\"type\":\"boolean\"},\"removeEmptyChunks\":{\"description\":\"Remove chunks which are empty.\",\"type\":\"boolean\"},\"runtimeChunk\":{\"$ref\":\"#/definitions/OptimizationRuntimeChunk\"},\"sideEffects\":{\"description\":\"Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).\",\"anyOf\":[{\"enum\":[\"flag\"]},{\"type\":\"boolean\"}]},\"splitChunks\":{\"description\":\"Optimize duplication and caching by splitting chunks by shared modules and cache group.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/OptimizationSplitChunksOptions\"}]},\"usedExports\":{\"description\":\"Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\\"global\\\": analyse exports globally for all runtimes combined).\",\"anyOf\":[{\"enum\":[\"global\"]},{\"type\":\"boolean\"}]}}},\"OptimizationRuntimeChunk\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps.\",\"anyOf\":[{\"enum\":[\"single\",\"multiple\"]},{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name or name factory for the runtime chunks.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}}}]},\"OptimizationRuntimeChunkNormalized\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name factory for the runtime chunks.\",\"instanceof\":\"Function\",\"tsType\":\"Function\"}}}]},\"OptimizationSplitChunksCacheGroup\":{\"description\":\"Options object for describing behavior of a cache group selecting modules that should be cached together.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"chunks\":{\"description\":\"Select chunks for determining cache group content (defaults to \\\"initial\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"enforce\":{\"description\":\"Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.\",\"type\":\"boolean\"},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"filename\":{\"description\":\"Sets the template for the filename for created chunks.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"idHint\":{\"description\":\"Sets the hint for chunk id.\",\"type\":\"string\"},\"layer\":{\"description\":\"Assign modules to a cache group by module layer.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading.\",\"type\":\"number\",\"minimum\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point.\",\"type\":\"number\",\"minimum\":1},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting.\",\"type\":\"number\",\"minimum\":1},\"minRemainingSize\":{\"description\":\"Minimal size for the chunks the stay after moving the modules to a new chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"name\":{\"description\":\"Give chunks for this cache group a name (chunks with equal name are merged).\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"priority\":{\"description\":\"Priority of this cache group.\",\"type\":\"number\"},\"reuseExistingChunk\":{\"description\":\"Try to reuse existing chunk (with name) when it has matching modules.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Assign modules to a cache group by module name.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"type\":{\"description\":\"Assign modules to a cache group by module type.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"usedExports\":{\"description\":\"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksGetCacheGroups\":{\"description\":\"A function returning cache groups.\",\"instanceof\":\"Function\",\"tsType\":\"((module: import('../lib/Module')) => OptimizationSplitChunksCacheGroup | OptimizationSplitChunksCacheGroup[] | void)\"},\"OptimizationSplitChunksOptions\":{\"description\":\"Options object for splitting chunks into smaller chunks.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"cacheGroups\":{\"description\":\"Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Configuration for a cache group.\",\"anyOf\":[{\"enum\":[false]},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"$ref\":\"#/definitions/OptimizationSplitChunksCacheGroup\"}]},\"not\":{\"description\":\"Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error\\nDid you intent to define a cache group with a test instead?\\ncacheGroups: {\\n : {\\n test: ...\\n }\\n}.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"test\":{\"description\":\"The test property is a cache group name, but using the test option of the cache group could be intended instead.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}},\"required\":[\"test\"]}},\"chunks\":{\"description\":\"Select chunks for determining shared modules (defaults to \\\"async\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"defaultSizeTypes\":{\"description\":\"Sets the size types which are used when a number is used for sizes.\",\"type\":\"array\",\"items\":{\"description\":\"Size type, like 'javascript', 'webassembly'.\",\"type\":\"string\"},\"minItems\":1},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"fallbackCacheGroup\":{\"description\":\"Options for modules not selected by any other cache group.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]}}},\"filename\":{\"description\":\"Sets the template for the filename for created chunks.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"hidePathInfo\":{\"description\":\"Prevents exposing path info when creating names for parts splitted by maxSize.\",\"type\":\"boolean\"},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading.\",\"type\":\"number\",\"minimum\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point.\",\"type\":\"number\",\"minimum\":1},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting.\",\"type\":\"number\",\"minimum\":1},\"minRemainingSize\":{\"description\":\"Minimal size for the chunks the stay after moving the modules to a new chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"name\":{\"description\":\"Give chunks created a name (chunks with equal name are merged).\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"usedExports\":{\"description\":\"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksSizes\":{\"description\":\"Size description for limits.\",\"anyOf\":[{\"description\":\"Size of the javascript part of the chunk.\",\"type\":\"number\",\"minimum\":0},{\"description\":\"Specify size limits per size type.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Size of the part of the chunk with the type of the key.\",\"type\":\"number\"}}]},\"Output\":{\"description\":\"Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetModuleFilename\":{\"$ref\":\"#/definitions/AssetModuleFilename\"},\"auxiliaryComment\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/AuxiliaryComment\"}]},\"charset\":{\"$ref\":\"#/definitions/Charset\"},\"chunkFilename\":{\"$ref\":\"#/definitions/ChunkFilename\"},\"chunkFormat\":{\"$ref\":\"#/definitions/ChunkFormat\"},\"chunkLoadTimeout\":{\"$ref\":\"#/definitions/ChunkLoadTimeout\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"chunkLoadingGlobal\":{\"$ref\":\"#/definitions/ChunkLoadingGlobal\"},\"clean\":{\"$ref\":\"#/definitions/Clean\"},\"compareBeforeEmit\":{\"$ref\":\"#/definitions/CompareBeforeEmit\"},\"crossOriginLoading\":{\"$ref\":\"#/definitions/CrossOriginLoading\"},\"devtoolFallbackModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolFallbackModuleFilenameTemplate\"},\"devtoolModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolModuleFilenameTemplate\"},\"devtoolNamespace\":{\"$ref\":\"#/definitions/DevtoolNamespace\"},\"enabledChunkLoadingTypes\":{\"$ref\":\"#/definitions/EnabledChunkLoadingTypes\"},\"enabledLibraryTypes\":{\"$ref\":\"#/definitions/EnabledLibraryTypes\"},\"enabledWasmLoadingTypes\":{\"$ref\":\"#/definitions/EnabledWasmLoadingTypes\"},\"environment\":{\"$ref\":\"#/definitions/Environment\"},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"globalObject\":{\"$ref\":\"#/definitions/GlobalObject\"},\"hashDigest\":{\"$ref\":\"#/definitions/HashDigest\"},\"hashDigestLength\":{\"$ref\":\"#/definitions/HashDigestLength\"},\"hashFunction\":{\"$ref\":\"#/definitions/HashFunction\"},\"hashSalt\":{\"$ref\":\"#/definitions/HashSalt\"},\"hotUpdateChunkFilename\":{\"$ref\":\"#/definitions/HotUpdateChunkFilename\"},\"hotUpdateGlobal\":{\"$ref\":\"#/definitions/HotUpdateGlobal\"},\"hotUpdateMainFilename\":{\"$ref\":\"#/definitions/HotUpdateMainFilename\"},\"iife\":{\"$ref\":\"#/definitions/Iife\"},\"importFunctionName\":{\"$ref\":\"#/definitions/ImportFunctionName\"},\"importMetaName\":{\"$ref\":\"#/definitions/ImportMetaName\"},\"library\":{\"$ref\":\"#/definitions/Library\"},\"libraryExport\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/LibraryExport\"}]},\"libraryTarget\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/LibraryType\"}]},\"module\":{\"$ref\":\"#/definitions/OutputModule\"},\"path\":{\"$ref\":\"#/definitions/Path\"},\"pathinfo\":{\"$ref\":\"#/definitions/Pathinfo\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"scriptType\":{\"$ref\":\"#/definitions/ScriptType\"},\"sourceMapFilename\":{\"$ref\":\"#/definitions/SourceMapFilename\"},\"sourcePrefix\":{\"$ref\":\"#/definitions/SourcePrefix\"},\"strictModuleErrorHandling\":{\"$ref\":\"#/definitions/StrictModuleErrorHandling\"},\"strictModuleExceptionHandling\":{\"$ref\":\"#/definitions/StrictModuleExceptionHandling\"},\"trustedTypes\":{\"description\":\"Use a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.\",\"anyOf\":[{\"enum\":[true]},{\"description\":\"The name of the Trusted Types policy created by webpack to serve bundle chunks.\",\"type\":\"string\",\"minLength\":1},{\"$ref\":\"#/definitions/TrustedTypes\"}]},\"umdNamedDefine\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/UmdNamedDefine\"}]},\"uniqueName\":{\"$ref\":\"#/definitions/UniqueName\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"},\"webassemblyModuleFilename\":{\"$ref\":\"#/definitions/WebassemblyModuleFilename\"},\"workerChunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"workerWasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"OutputModule\":{\"description\":\"Output javascript files as module source type.\",\"type\":\"boolean\"},\"OutputNormalized\":{\"description\":\"Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetModuleFilename\":{\"$ref\":\"#/definitions/AssetModuleFilename\"},\"charset\":{\"$ref\":\"#/definitions/Charset\"},\"chunkFilename\":{\"$ref\":\"#/definitions/ChunkFilename\"},\"chunkFormat\":{\"$ref\":\"#/definitions/ChunkFormat\"},\"chunkLoadTimeout\":{\"$ref\":\"#/definitions/ChunkLoadTimeout\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"chunkLoadingGlobal\":{\"$ref\":\"#/definitions/ChunkLoadingGlobal\"},\"clean\":{\"$ref\":\"#/definitions/Clean\"},\"compareBeforeEmit\":{\"$ref\":\"#/definitions/CompareBeforeEmit\"},\"crossOriginLoading\":{\"$ref\":\"#/definitions/CrossOriginLoading\"},\"devtoolFallbackModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolFallbackModuleFilenameTemplate\"},\"devtoolModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolModuleFilenameTemplate\"},\"devtoolNamespace\":{\"$ref\":\"#/definitions/DevtoolNamespace\"},\"enabledChunkLoadingTypes\":{\"$ref\":\"#/definitions/EnabledChunkLoadingTypes\"},\"enabledLibraryTypes\":{\"$ref\":\"#/definitions/EnabledLibraryTypes\"},\"enabledWasmLoadingTypes\":{\"$ref\":\"#/definitions/EnabledWasmLoadingTypes\"},\"environment\":{\"$ref\":\"#/definitions/Environment\"},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"globalObject\":{\"$ref\":\"#/definitions/GlobalObject\"},\"hashDigest\":{\"$ref\":\"#/definitions/HashDigest\"},\"hashDigestLength\":{\"$ref\":\"#/definitions/HashDigestLength\"},\"hashFunction\":{\"$ref\":\"#/definitions/HashFunction\"},\"hashSalt\":{\"$ref\":\"#/definitions/HashSalt\"},\"hotUpdateChunkFilename\":{\"$ref\":\"#/definitions/HotUpdateChunkFilename\"},\"hotUpdateGlobal\":{\"$ref\":\"#/definitions/HotUpdateGlobal\"},\"hotUpdateMainFilename\":{\"$ref\":\"#/definitions/HotUpdateMainFilename\"},\"iife\":{\"$ref\":\"#/definitions/Iife\"},\"importFunctionName\":{\"$ref\":\"#/definitions/ImportFunctionName\"},\"importMetaName\":{\"$ref\":\"#/definitions/ImportMetaName\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"module\":{\"$ref\":\"#/definitions/OutputModule\"},\"path\":{\"$ref\":\"#/definitions/Path\"},\"pathinfo\":{\"$ref\":\"#/definitions/Pathinfo\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"scriptType\":{\"$ref\":\"#/definitions/ScriptType\"},\"sourceMapFilename\":{\"$ref\":\"#/definitions/SourceMapFilename\"},\"sourcePrefix\":{\"$ref\":\"#/definitions/SourcePrefix\"},\"strictModuleErrorHandling\":{\"$ref\":\"#/definitions/StrictModuleErrorHandling\"},\"strictModuleExceptionHandling\":{\"$ref\":\"#/definitions/StrictModuleExceptionHandling\"},\"trustedTypes\":{\"$ref\":\"#/definitions/TrustedTypes\"},\"uniqueName\":{\"$ref\":\"#/definitions/UniqueName\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"},\"webassemblyModuleFilename\":{\"$ref\":\"#/definitions/WebassemblyModuleFilename\"},\"workerChunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"workerWasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"Parallelism\":{\"description\":\"The number of parallel processed modules in the compilation.\",\"type\":\"number\",\"minimum\":1},\"ParserOptionsByModuleType\":{\"description\":\"Specify options for each parser.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options for parsing.\",\"type\":\"object\",\"additionalProperties\":true},\"properties\":{\"asset\":{\"$ref\":\"#/definitions/AssetParserOptions\"},\"asset/inline\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"asset/resource\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"asset/source\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"javascript\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/auto\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/dynamic\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/esm\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"}}},\"Path\":{\"description\":\"The output directory as **absolute path** (required).\",\"type\":\"string\",\"absolutePath\":true},\"Pathinfo\":{\"description\":\"Include comments with information about the modules.\",\"anyOf\":[{\"enum\":[\"verbose\"]},{\"type\":\"boolean\"}]},\"Performance\":{\"description\":\"Configuration for web performance recommendations.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/PerformanceOptions\"}]},\"PerformanceOptions\":{\"description\":\"Configuration object for web performance recommendations.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetFilter\":{\"description\":\"Filter function to select assets that are checked.\",\"instanceof\":\"Function\",\"tsType\":\"Function\"},\"hints\":{\"description\":\"Sets the format of the hints: warnings, errors or nothing at all.\",\"enum\":[false,\"warning\",\"error\"]},\"maxAssetSize\":{\"description\":\"File size limit (in bytes) when exceeded, that webpack will provide performance hints.\",\"type\":\"number\"},\"maxEntrypointSize\":{\"description\":\"Total size of an entry point (in bytes).\",\"type\":\"number\"}}},\"Plugins\":{\"description\":\"Add additional plugins to the compiler.\",\"type\":\"array\",\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"Profile\":{\"description\":\"Capture timing information for each module.\",\"type\":\"boolean\"},\"PublicPath\":{\"description\":\"The 'publicPath' specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"$ref\":\"#/definitions/RawPublicPath\"}]},\"RawPublicPath\":{\"description\":\"The 'publicPath' specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"RecordsInputPath\":{\"description\":\"Store compiler state to a json file.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"RecordsOutputPath\":{\"description\":\"Load compiler state from a json file.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"RecordsPath\":{\"description\":\"Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"Resolve\":{\"description\":\"Options for the resolver.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"ResolveAlias\":{\"description\":\"Redirect module requests.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Alias configuration.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"description\":\"New request.\",\"anyOf\":[{\"description\":\"Multiple alternative requests.\",\"type\":\"array\",\"items\":{\"description\":\"One choice of request.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"Ignore request (replace with empty module).\",\"enum\":[false]},{\"description\":\"New request.\",\"type\":\"string\",\"minLength\":1}]},\"name\":{\"description\":\"Request to be redirected.\",\"type\":\"string\"},\"onlyModule\":{\"description\":\"Redirect only exact matching request.\",\"type\":\"boolean\"}},\"required\":[\"alias\",\"name\"]}},{\"type\":\"object\",\"additionalProperties\":{\"description\":\"New request.\",\"anyOf\":[{\"description\":\"Multiple alternative requests.\",\"type\":\"array\",\"items\":{\"description\":\"One choice of request.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"Ignore request (replace with empty module).\",\"enum\":[false]},{\"description\":\"New request.\",\"type\":\"string\",\"minLength\":1}]}}]},\"ResolveLoader\":{\"description\":\"Options for the resolver when resolving loaders.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"ResolveOptions\":{\"description\":\"Options object for resolving requests.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"$ref\":\"#/definitions/ResolveAlias\"},\"aliasFields\":{\"description\":\"Fields in the description file (usually package.json) which are used to redirect requests inside the module.\",\"type\":\"array\",\"items\":{\"description\":\"Field in the description file (usually package.json) which are used to redirect requests inside the module.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the field path in the description file (usually package.json) which are used to redirect requests inside the module.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}},\"byDependency\":{\"description\":\"Extra resolve options per dependency category. Typical categories are \\\"commonjs\\\", \\\"amd\\\", \\\"esm\\\".\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options object for resolving requests.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]}},\"cache\":{\"description\":\"Enable caching of successfully resolved requests (cache entries are revalidated).\",\"type\":\"boolean\"},\"cachePredicate\":{\"description\":\"Predicate function to decide which requests should be cached.\",\"instanceof\":\"Function\",\"tsType\":\"((request: import('enhanced-resolve').ResolveRequest) => boolean)\"},\"cacheWithContext\":{\"description\":\"Include the context information in the cache identifier when caching.\",\"type\":\"boolean\"},\"conditionNames\":{\"description\":\"Condition names for exports field entry point.\",\"type\":\"array\",\"items\":{\"description\":\"Condition names for exports field entry point.\",\"type\":\"string\"}},\"descriptionFiles\":{\"description\":\"Filenames used to find a description file (like a package.json).\",\"type\":\"array\",\"items\":{\"description\":\"Filename used to find a description file (like a package.json).\",\"type\":\"string\",\"minLength\":1}},\"enforceExtension\":{\"description\":\"Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).\",\"type\":\"boolean\"},\"exportsFields\":{\"description\":\"Field names from the description file (usually package.json) which are used to provide entry points of a package.\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (usually package.json) which is used to provide entry points of a package.\",\"type\":\"string\"}},\"extensions\":{\"description\":\"Extensions added to the request when trying to find the file.\",\"type\":\"array\",\"items\":{\"description\":\"Extension added to the request when trying to find the file.\",\"type\":\"string\"}},\"fallback\":{\"description\":\"Redirect module requests when normal resolving fails.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveAlias\"}]},\"fileSystem\":{\"description\":\"Filesystem for the resolver.\",\"tsType\":\"(import('../lib/util/fs').InputFileSystem)\"},\"fullySpecified\":{\"description\":\"Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).\",\"type\":\"boolean\"},\"importsFields\":{\"description\":\"Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal).\",\"type\":\"string\"}},\"mainFields\":{\"description\":\"Field names from the description file (package.json) which are used to find the default entry point.\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (package.json) which are used to find the default entry point.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the field path from the description file (package.json) which are used to find the default entry point.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}},\"mainFiles\":{\"description\":\"Filenames used to find the default entry point if there is no description file or main field.\",\"type\":\"array\",\"items\":{\"description\":\"Filename used to find the default entry point if there is no description file or main field.\",\"type\":\"string\",\"minLength\":1}},\"modules\":{\"description\":\"Folder names or directory paths where to find modules.\",\"type\":\"array\",\"items\":{\"description\":\"Folder name or directory path where to find modules.\",\"type\":\"string\",\"minLength\":1}},\"plugins\":{\"description\":\"Plugins for the resolver.\",\"type\":\"array\",\"cli\":{\"exclude\":true},\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/ResolvePluginInstance\"}]}},\"preferAbsolute\":{\"description\":\"Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.\",\"type\":\"boolean\"},\"preferRelative\":{\"description\":\"Prefer to resolve module requests as relative request and fallback to resolving as module.\",\"type\":\"boolean\"},\"resolver\":{\"description\":\"Custom resolver.\",\"tsType\":\"(import('enhanced-resolve').Resolver)\"},\"restrictions\":{\"description\":\"A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.\",\"type\":\"array\",\"items\":{\"description\":\"Resolve restriction. Resolve result must fulfill this restriction.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"roots\":{\"description\":\"A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"array\",\"items\":{\"description\":\"Directory in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"string\"}},\"symlinks\":{\"description\":\"Enable resolving symlinks to the original location.\",\"type\":\"boolean\"},\"unsafeCache\":{\"description\":\"Enable caching of successfully resolved requests (cache entries are not revalidated).\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":true}]},\"useSyncFileSystemCalls\":{\"description\":\"Use synchronous filesystem calls for the resolver.\",\"type\":\"boolean\"}}},\"ResolvePluginInstance\":{\"description\":\"Plugin instance.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(resolver: import('enhanced-resolve').Resolver) => void\"}},\"required\":[\"apply\"]},\"RuleSetCondition\":{\"description\":\"A condition matcher.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"not\":{\"description\":\"Logical NOT.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"or\":{\"description\":\"Logical OR.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]}}},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionAbsolute\":{\"description\":\"A condition matcher matching an absolute path.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"not\":{\"description\":\"Logical NOT.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"or\":{\"description\":\"Logical OR.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]}}},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditionOrConditions\":{\"description\":\"One or multiple rule conditions.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionOrConditionsAbsolute\":{\"description\":\"One or multiple rule conditions matching an absolute path.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditions\":{\"description\":\"A list of rule conditions.\",\"type\":\"array\",\"items\":{\"description\":\"A rule condition.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"}]}},\"RuleSetConditionsAbsolute\":{\"description\":\"A list of rule conditions matching an absolute path.\",\"type\":\"array\",\"items\":{\"description\":\"A rule condition matching an absolute path.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"}]}},\"RuleSetLoader\":{\"description\":\"A loader request.\",\"type\":\"string\",\"minLength\":1},\"RuleSetLoaderOptions\":{\"description\":\"Options passed to a loader.\",\"anyOf\":[{\"type\":\"string\"},{\"type\":\"object\"}]},\"RuleSetRule\":{\"description\":\"A rule description with conditions and effects for modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"compiler\":{\"description\":\"Match the child compiler name.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"dependency\":{\"description\":\"Match dependency type.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"descriptionData\":{\"description\":\"Match values of properties in the description file (usually package.json).\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}},\"enforce\":{\"description\":\"Enforce this rule as pre or post step.\",\"enum\":[\"pre\",\"post\"]},\"exclude\":{\"description\":\"Shortcut for resource.exclude.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"generator\":{\"description\":\"The options for the module generator.\",\"type\":\"object\"},\"include\":{\"description\":\"Shortcut for resource.include.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuer\":{\"description\":\"Match the issuer of the module (The module pointing to this module).\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuerLayer\":{\"description\":\"Match layer of the issuer of this module (The module pointing to this module).\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"layer\":{\"description\":\"Specifies the layer in which the module should be placed in.\",\"type\":\"string\"},\"loader\":{\"description\":\"Shortcut for use.loader.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"mimetype\":{\"description\":\"Match module mimetype when load from Data URI.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"oneOf\":{\"description\":\"Only execute the first matching rule in this array.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"options\":{\"description\":\"Shortcut for use.options.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoaderOptions\"}]},\"parser\":{\"description\":\"Options for parsing.\",\"type\":\"object\",\"additionalProperties\":true},\"realResource\":{\"description\":\"Match the real resource path of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resolve\":{\"description\":\"Options for the resolver.\",\"type\":\"object\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"resource\":{\"description\":\"Match the resource path of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resourceFragment\":{\"description\":\"Match the resource fragment of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"resourceQuery\":{\"description\":\"Match the resource query of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"rules\":{\"description\":\"Match and execute these rules when this rule is matched.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"sideEffects\":{\"description\":\"Flags a module as with or without side effects.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Shortcut for resource.test.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"type\":{\"description\":\"Module type to use for the module.\",\"type\":\"string\"},\"use\":{\"description\":\"Modifiers applied to the module when rule is matched.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetUse\"}]}}},\"RuleSetRules\":{\"description\":\"A list of rules.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"anyOf\":[{\"cli\":{\"exclude\":true},\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"RuleSetUse\":{\"description\":\"A list of descriptions of loaders applied.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"An use item.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetUseItem\"}]}},{\"instanceof\":\"Function\",\"tsType\":\"((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => RuleSetUseItem[])\"},{\"$ref\":\"#/definitions/RuleSetUseItem\"}]},\"RuleSetUseItem\":{\"description\":\"A description of an applied loader.\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"ident\":{\"description\":\"Unique loader options identifier.\",\"type\":\"string\"},\"loader\":{\"description\":\"Loader name.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"options\":{\"description\":\"Loader options.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoaderOptions\"}]}}},{\"instanceof\":\"Function\",\"tsType\":\"((data: object) => RuleSetUseItem|RuleSetUseItem[])\"},{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"ScriptType\":{\"description\":\"This option enables loading async chunks via a custom script type, such as script type=\\\"module\\\".\",\"enum\":[false,\"text/javascript\",\"module\"]},\"SnapshotOptions\":{\"description\":\"Options affecting how file system snapshots are created and validated.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"buildDependencies\":{\"description\":\"Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"immutablePaths\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"type\":\"array\",\"items\":{\"description\":\"A path to a immutable directory (usually a package manager cache directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}},\"managedPaths\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"type\":\"array\",\"items\":{\"description\":\"A path to a managed directory (usually a node_modules directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}},\"module\":{\"description\":\"Options for snapshotting dependencies of modules to determine if they need to be built again.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"resolve\":{\"description\":\"Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"resolveBuildDependencies\":{\"description\":\"Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}}}},\"SourceMapFilename\":{\"description\":\"The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"SourcePrefix\":{\"description\":\"Prefixes every line of the source in the bundle with this string.\",\"type\":\"string\"},\"StatsOptions\":{\"description\":\"Stats options object.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"all\":{\"description\":\"Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).\",\"type\":\"boolean\"},\"assets\":{\"description\":\"Add assets information.\",\"type\":\"boolean\"},\"assetsSort\":{\"description\":\"Sort the assets by that field.\",\"type\":\"string\"},\"assetsSpace\":{\"description\":\"Space to display assets (groups will be collapsed to fit this space).\",\"type\":\"number\"},\"builtAt\":{\"description\":\"Add built at time information.\",\"type\":\"boolean\"},\"cached\":{\"description\":\"Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).\",\"type\":\"boolean\"},\"cachedAssets\":{\"description\":\"Show cached assets (setting this to `false` only shows emitted files).\",\"type\":\"boolean\"},\"cachedModules\":{\"description\":\"Add information about cached (not built) modules.\",\"type\":\"boolean\"},\"children\":{\"description\":\"Add children information.\",\"type\":\"boolean\"},\"chunkGroupAuxiliary\":{\"description\":\"Display auxiliary assets in chunk groups.\",\"type\":\"boolean\"},\"chunkGroupChildren\":{\"description\":\"Display children of chunk groups.\",\"type\":\"boolean\"},\"chunkGroupMaxAssets\":{\"description\":\"Limit of assets displayed in chunk groups.\",\"type\":\"number\"},\"chunkGroups\":{\"description\":\"Display all chunk groups with the corresponding bundles.\",\"type\":\"boolean\"},\"chunkModules\":{\"description\":\"Add built modules information to chunk information.\",\"type\":\"boolean\"},\"chunkModulesSpace\":{\"description\":\"Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).\",\"type\":\"number\"},\"chunkOrigins\":{\"description\":\"Add the origins of chunks and chunk merging info.\",\"type\":\"boolean\"},\"chunkRelations\":{\"description\":\"Add information about parent, children and sibling chunks to chunk information.\",\"type\":\"boolean\"},\"chunks\":{\"description\":\"Add chunk information.\",\"type\":\"boolean\"},\"chunksSort\":{\"description\":\"Sort the chunks by that field.\",\"type\":\"string\"},\"colors\":{\"description\":\"Enables/Disables colorful output.\",\"anyOf\":[{\"description\":\"Enables/Disables colorful output.\",\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"bold\":{\"description\":\"Custom color for bold text.\",\"type\":\"string\"},\"cyan\":{\"description\":\"Custom color for cyan text.\",\"type\":\"string\"},\"green\":{\"description\":\"Custom color for green text.\",\"type\":\"string\"},\"magenta\":{\"description\":\"Custom color for magenta text.\",\"type\":\"string\"},\"red\":{\"description\":\"Custom color for red text.\",\"type\":\"string\"},\"yellow\":{\"description\":\"Custom color for yellow text.\",\"type\":\"string\"}}}]},\"context\":{\"description\":\"Context directory for request shortening.\",\"type\":\"string\",\"absolutePath\":true},\"dependentModules\":{\"description\":\"Show chunk modules that are dependencies of other modules of the chunk.\",\"type\":\"boolean\"},\"depth\":{\"description\":\"Add module depth in module graph.\",\"type\":\"boolean\"},\"entrypoints\":{\"description\":\"Display the entry points with the corresponding bundles.\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"type\":\"boolean\"}]},\"env\":{\"description\":\"Add --env information.\",\"type\":\"boolean\"},\"errorDetails\":{\"description\":\"Add details to errors (like resolving log).\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"type\":\"boolean\"}]},\"errorStack\":{\"description\":\"Add internal stack trace to errors.\",\"type\":\"boolean\"},\"errors\":{\"description\":\"Add errors.\",\"type\":\"boolean\"},\"errorsCount\":{\"description\":\"Add errors count.\",\"type\":\"boolean\"},\"exclude\":{\"description\":\"Please use excludeModules instead.\",\"cli\":{\"exclude\":true},\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/ModuleFilterTypes\"}]},\"excludeAssets\":{\"description\":\"Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.\",\"oneOf\":[{\"$ref\":\"#/definitions/AssetFilterTypes\"}]},\"excludeModules\":{\"description\":\"Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/ModuleFilterTypes\"}]},\"groupAssetsByChunk\":{\"description\":\"Group assets by how their are related to chunks.\",\"type\":\"boolean\"},\"groupAssetsByEmitStatus\":{\"description\":\"Group assets by their status (emitted, compared for emit or cached).\",\"type\":\"boolean\"},\"groupAssetsByExtension\":{\"description\":\"Group assets by their extension.\",\"type\":\"boolean\"},\"groupAssetsByInfo\":{\"description\":\"Group assets by their asset info (immutable, development, hotModuleReplacement, etc).\",\"type\":\"boolean\"},\"groupAssetsByPath\":{\"description\":\"Group assets by their path.\",\"type\":\"boolean\"},\"groupModulesByAttributes\":{\"description\":\"Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).\",\"type\":\"boolean\"},\"groupModulesByCacheStatus\":{\"description\":\"Group modules by their status (cached or built and cacheable).\",\"type\":\"boolean\"},\"groupModulesByExtension\":{\"description\":\"Group modules by their extension.\",\"type\":\"boolean\"},\"groupModulesByLayer\":{\"description\":\"Group modules by their layer.\",\"type\":\"boolean\"},\"groupModulesByPath\":{\"description\":\"Group modules by their path.\",\"type\":\"boolean\"},\"groupModulesByType\":{\"description\":\"Group modules by their type.\",\"type\":\"boolean\"},\"hash\":{\"description\":\"Add the hash of the compilation.\",\"type\":\"boolean\"},\"ids\":{\"description\":\"Add ids.\",\"type\":\"boolean\"},\"logging\":{\"description\":\"Add logging output.\",\"anyOf\":[{\"description\":\"Specify log level of logging output.\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]},{\"description\":\"Enable/disable logging output (`true`: shows normal logging output, loglevel: log).\",\"type\":\"boolean\"}]},\"loggingDebug\":{\"description\":\"Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.\",\"anyOf\":[{\"description\":\"Enable/Disable debug logging for all loggers.\",\"type\":\"boolean\"},{\"$ref\":\"#/definitions/FilterTypes\"}]},\"loggingTrace\":{\"description\":\"Add stack traces to logging output.\",\"type\":\"boolean\"},\"moduleAssets\":{\"description\":\"Add information about assets inside modules.\",\"type\":\"boolean\"},\"moduleTrace\":{\"description\":\"Add dependencies and origin of warnings/errors.\",\"type\":\"boolean\"},\"modules\":{\"description\":\"Add built modules information.\",\"type\":\"boolean\"},\"modulesSort\":{\"description\":\"Sort the modules by that field.\",\"type\":\"string\"},\"modulesSpace\":{\"description\":\"Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).\",\"type\":\"number\"},\"nestedModules\":{\"description\":\"Add information about modules nested in other modules (like with module concatenation).\",\"type\":\"boolean\"},\"nestedModulesSpace\":{\"description\":\"Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).\",\"type\":\"number\"},\"optimizationBailout\":{\"description\":\"Show reasons why optimization bailed out for modules.\",\"type\":\"boolean\"},\"orphanModules\":{\"description\":\"Add information about orphan modules.\",\"type\":\"boolean\"},\"outputPath\":{\"description\":\"Add output path information.\",\"type\":\"boolean\"},\"performance\":{\"description\":\"Add performance hint flags.\",\"type\":\"boolean\"},\"preset\":{\"description\":\"Preset for the default values.\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"string\"}]},\"providedExports\":{\"description\":\"Show exports provided by modules.\",\"type\":\"boolean\"},\"publicPath\":{\"description\":\"Add public path information.\",\"type\":\"boolean\"},\"reasons\":{\"description\":\"Add information about the reasons why modules are included.\",\"type\":\"boolean\"},\"relatedAssets\":{\"description\":\"Add information about assets that are related to other assets (like SourceMaps for assets).\",\"type\":\"boolean\"},\"runtime\":{\"description\":\"Add information about runtime modules (deprecated: use 'runtimeModules' instead).\",\"type\":\"boolean\"},\"runtimeModules\":{\"description\":\"Add information about runtime modules.\",\"type\":\"boolean\"},\"source\":{\"description\":\"Add the source code of modules.\",\"type\":\"boolean\"},\"timings\":{\"description\":\"Add timing information.\",\"type\":\"boolean\"},\"usedExports\":{\"description\":\"Show exports used by modules.\",\"type\":\"boolean\"},\"version\":{\"description\":\"Add webpack version information.\",\"type\":\"boolean\"},\"warnings\":{\"description\":\"Add warnings.\",\"type\":\"boolean\"},\"warningsCount\":{\"description\":\"Add warnings count.\",\"type\":\"boolean\"},\"warningsFilter\":{\"description\":\"Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.\",\"oneOf\":[{\"$ref\":\"#/definitions/WarningFilterTypes\"}]}}},\"StatsValue\":{\"description\":\"Stats options object or preset name.\",\"anyOf\":[{\"enum\":[\"none\",\"summary\",\"errors-only\",\"errors-warnings\",\"minimal\",\"normal\",\"detailed\",\"verbose\"]},{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/StatsOptions\"}]},\"StrictModuleErrorHandling\":{\"description\":\"Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.\",\"type\":\"boolean\"},\"StrictModuleExceptionHandling\":{\"description\":\"Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.\",\"type\":\"boolean\"},\"Target\":{\"description\":\"Environment to build for. An array of environments to build for all of them when possible.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Environment to build for.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1},{\"enum\":[false]},{\"type\":\"string\",\"minLength\":1}]},\"TrustedTypes\":{\"description\":\"Use a Trusted Types policy to create urls for chunks.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"policyName\":{\"description\":\"The name of the Trusted Types policy created by webpack to serve bundle chunks.\",\"type\":\"string\",\"minLength\":1}}},\"UmdNamedDefine\":{\"description\":\"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\",\"type\":\"boolean\"},\"UniqueName\":{\"description\":\"A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.\",\"type\":\"string\",\"minLength\":1},\"WarningFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/stats/DefaultStatsFactoryPlugin').StatsError, value: string) => boolean)\"}]},\"WarningFilterTypes\":{\"description\":\"Filtering warnings.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/WarningFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/WarningFilterItemTypes\"}]},\"WasmLoading\":{\"description\":\"The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/WasmLoadingType\"}]},\"WasmLoadingType\":{\"description\":\"The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"fetch-streaming\",\"fetch\",\"async-node\"]},{\"type\":\"string\"}]},\"Watch\":{\"description\":\"Enter watch mode, which rebuilds on file change.\",\"type\":\"boolean\"},\"WatchOptions\":{\"description\":\"Options for the watcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"aggregateTimeout\":{\"description\":\"Delay the rebuilt after the first change. Value is a time in ms.\",\"type\":\"number\"},\"followSymlinks\":{\"description\":\"Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').\",\"type\":\"boolean\"},\"ignored\":{\"description\":\"Ignore some files from watching (glob pattern or regexp).\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A glob pattern for files that should be ignored from watching.\",\"type\":\"string\",\"minLength\":1}},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A single glob pattern for files that should be ignored from watching.\",\"type\":\"string\",\"minLength\":1}]},\"poll\":{\"description\":\"Enable polling mode for watching.\",\"anyOf\":[{\"description\":\"`number`: use polling with specified interval.\",\"type\":\"number\"},{\"description\":\"`true`: use polling.\",\"type\":\"boolean\"}]},\"stdin\":{\"description\":\"Stop watching when stdin stream has ended.\",\"type\":\"boolean\"}}},\"WebassemblyModuleFilename\":{\"description\":\"The filename of WebAssembly modules as relative path inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"WebpackOptionsNormalized\":{\"description\":\"Normalized webpack options object.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"bail\":{\"$ref\":\"#/definitions/Bail\"},\"cache\":{\"$ref\":\"#/definitions/CacheOptionsNormalized\"},\"context\":{\"$ref\":\"#/definitions/Context\"},\"dependencies\":{\"$ref\":\"#/definitions/Dependencies\"},\"devServer\":{\"$ref\":\"#/definitions/DevServer\"},\"devtool\":{\"$ref\":\"#/definitions/DevTool\"},\"entry\":{\"$ref\":\"#/definitions/EntryNormalized\"},\"experiments\":{\"$ref\":\"#/definitions/Experiments\"},\"externals\":{\"$ref\":\"#/definitions/Externals\"},\"externalsPresets\":{\"$ref\":\"#/definitions/ExternalsPresets\"},\"externalsType\":{\"$ref\":\"#/definitions/ExternalsType\"},\"ignoreWarnings\":{\"$ref\":\"#/definitions/IgnoreWarningsNormalized\"},\"infrastructureLogging\":{\"$ref\":\"#/definitions/InfrastructureLogging\"},\"loader\":{\"$ref\":\"#/definitions/Loader\"},\"mode\":{\"$ref\":\"#/definitions/Mode\"},\"module\":{\"$ref\":\"#/definitions/ModuleOptionsNormalized\"},\"name\":{\"$ref\":\"#/definitions/Name\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"optimization\":{\"$ref\":\"#/definitions/Optimization\"},\"output\":{\"$ref\":\"#/definitions/OutputNormalized\"},\"parallelism\":{\"$ref\":\"#/definitions/Parallelism\"},\"performance\":{\"$ref\":\"#/definitions/Performance\"},\"plugins\":{\"$ref\":\"#/definitions/Plugins\"},\"profile\":{\"$ref\":\"#/definitions/Profile\"},\"recordsInputPath\":{\"$ref\":\"#/definitions/RecordsInputPath\"},\"recordsOutputPath\":{\"$ref\":\"#/definitions/RecordsOutputPath\"},\"resolve\":{\"$ref\":\"#/definitions/Resolve\"},\"resolveLoader\":{\"$ref\":\"#/definitions/ResolveLoader\"},\"snapshot\":{\"$ref\":\"#/definitions/SnapshotOptions\"},\"stats\":{\"$ref\":\"#/definitions/StatsValue\"},\"target\":{\"$ref\":\"#/definitions/Target\"},\"watch\":{\"$ref\":\"#/definitions/Watch\"},\"watchOptions\":{\"$ref\":\"#/definitions/WatchOptions\"}},\"required\":[\"cache\",\"snapshot\",\"entry\",\"experiments\",\"externals\",\"externalsPresets\",\"infrastructureLogging\",\"module\",\"node\",\"optimization\",\"output\",\"plugins\",\"resolve\",\"resolveLoader\",\"stats\",\"watchOptions\"]},\"WebpackPluginFunction\":{\"description\":\"Function acting as plugin.\",\"instanceof\":\"Function\",\"tsType\":\"(this: import('../lib/Compiler'), compiler: import('../lib/Compiler')) => void\"},\"WebpackPluginInstance\":{\"description\":\"Plugin instance.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(compiler: import('../lib/Compiler')) => void\"}},\"required\":[\"apply\"]}},\"title\":\"WebpackOptions\",\"description\":\"Options object as provided by the user.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"bail\":{\"$ref\":\"#/definitions/Bail\"},\"cache\":{\"$ref\":\"#/definitions/CacheOptions\"},\"context\":{\"$ref\":\"#/definitions/Context\"},\"dependencies\":{\"$ref\":\"#/definitions/Dependencies\"},\"devServer\":{\"$ref\":\"#/definitions/DevServer\"},\"devtool\":{\"$ref\":\"#/definitions/DevTool\"},\"entry\":{\"$ref\":\"#/definitions/Entry\"},\"experiments\":{\"$ref\":\"#/definitions/Experiments\"},\"externals\":{\"$ref\":\"#/definitions/Externals\"},\"externalsPresets\":{\"$ref\":\"#/definitions/ExternalsPresets\"},\"externalsType\":{\"$ref\":\"#/definitions/ExternalsType\"},\"ignoreWarnings\":{\"$ref\":\"#/definitions/IgnoreWarnings\"},\"infrastructureLogging\":{\"$ref\":\"#/definitions/InfrastructureLogging\"},\"loader\":{\"$ref\":\"#/definitions/Loader\"},\"mode\":{\"$ref\":\"#/definitions/Mode\"},\"module\":{\"$ref\":\"#/definitions/ModuleOptions\"},\"name\":{\"$ref\":\"#/definitions/Name\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"optimization\":{\"$ref\":\"#/definitions/Optimization\"},\"output\":{\"$ref\":\"#/definitions/Output\"},\"parallelism\":{\"$ref\":\"#/definitions/Parallelism\"},\"performance\":{\"$ref\":\"#/definitions/Performance\"},\"plugins\":{\"$ref\":\"#/definitions/Plugins\"},\"profile\":{\"$ref\":\"#/definitions/Profile\"},\"recordsInputPath\":{\"$ref\":\"#/definitions/RecordsInputPath\"},\"recordsOutputPath\":{\"$ref\":\"#/definitions/RecordsOutputPath\"},\"recordsPath\":{\"$ref\":\"#/definitions/RecordsPath\"},\"resolve\":{\"$ref\":\"#/definitions/Resolve\"},\"resolveLoader\":{\"$ref\":\"#/definitions/ResolveLoader\"},\"snapshot\":{\"$ref\":\"#/definitions/SnapshotOptions\"},\"stats\":{\"$ref\":\"#/definitions/StatsValue\"},\"target\":{\"$ref\":\"#/definitions/Target\"},\"watch\":{\"$ref\":\"#/definitions/Watch\"},\"watchOptions\":{\"$ref\":\"#/definitions/WatchOptions\"}}}"); +module.exports = JSON.parse("{\"definitions\":{\"Amd\":{\"description\":\"Set the value of `require.amd` and `define.amd`. Or disable AMD support.\",\"anyOf\":[{\"description\":\"You can pass `false` to disable AMD support.\",\"enum\":[false]},{\"description\":\"You can pass an object to set the value of `require.amd` and `define.amd`.\",\"type\":\"object\"}]},\"AssetFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((name: string, asset: import('../lib/stats/DefaultStatsFactoryPlugin').StatsAsset) => boolean)\"}]},\"AssetFilterTypes\":{\"description\":\"Filtering modules.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/AssetFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/AssetFilterItemTypes\"}]},\"AssetGeneratorDataUrl\":{\"description\":\"The options for data url generator.\",\"anyOf\":[{\"$ref\":\"#/definitions/AssetGeneratorDataUrlOptions\"},{\"$ref\":\"#/definitions/AssetGeneratorDataUrlFunction\"}]},\"AssetGeneratorDataUrlFunction\":{\"description\":\"Function that executes for module and should return an DataUrl string.\",\"instanceof\":\"Function\",\"tsType\":\"((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => string)\"},\"AssetGeneratorDataUrlOptions\":{\"description\":\"Options object for data url generation.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"encoding\":{\"description\":\"Asset encoding (defaults to base64).\",\"enum\":[false,\"base64\"]},\"mimetype\":{\"description\":\"Asset mimetype (getting from file extension by default).\",\"type\":\"string\"}}},\"AssetGeneratorOptions\":{\"description\":\"Generator options for asset modules.\",\"type\":\"object\",\"implements\":[\"#/definitions/AssetInlineGeneratorOptions\",\"#/definitions/AssetResourceGeneratorOptions\"],\"additionalProperties\":false,\"properties\":{\"dataUrl\":{\"$ref\":\"#/definitions/AssetGeneratorDataUrl\"},\"emit\":{\"description\":\"Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.\",\"type\":\"boolean\"},\"filename\":{\"$ref\":\"#/definitions/FilenameTemplate\"},\"publicPath\":{\"$ref\":\"#/definitions/RawPublicPath\"}}},\"AssetInlineGeneratorOptions\":{\"description\":\"Generator options for asset/inline modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dataUrl\":{\"$ref\":\"#/definitions/AssetGeneratorDataUrl\"}}},\"AssetModuleFilename\":{\"description\":\"The filename of asset modules as relative path inside the 'output.path' directory.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"AssetParserDataUrlFunction\":{\"description\":\"Function that executes for module and should return whenever asset should be inlined as DataUrl.\",\"instanceof\":\"Function\",\"tsType\":\"((source: string | Buffer, context: { filename: string, module: import('../lib/Module') }) => boolean)\"},\"AssetParserDataUrlOptions\":{\"description\":\"Options object for DataUrl condition.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"maxSize\":{\"description\":\"Maximum size of asset that should be inline as modules. Default: 8kb.\",\"type\":\"number\"}}},\"AssetParserOptions\":{\"description\":\"Parser options for asset modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dataUrlCondition\":{\"description\":\"The condition for inlining the asset as DataUrl.\",\"anyOf\":[{\"$ref\":\"#/definitions/AssetParserDataUrlOptions\"},{\"$ref\":\"#/definitions/AssetParserDataUrlFunction\"}]}}},\"AssetResourceGeneratorOptions\":{\"description\":\"Generator options for asset/resource modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"emit\":{\"description\":\"Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.\",\"type\":\"boolean\"},\"filename\":{\"$ref\":\"#/definitions/FilenameTemplate\"},\"publicPath\":{\"$ref\":\"#/definitions/RawPublicPath\"}}},\"AuxiliaryComment\":{\"description\":\"Add a comment in the UMD wrapper.\",\"anyOf\":[{\"description\":\"Append the same comment above each import style.\",\"type\":\"string\"},{\"$ref\":\"#/definitions/LibraryCustomUmdCommentObject\"}]},\"Bail\":{\"description\":\"Report the first error as a hard error instead of tolerating it.\",\"type\":\"boolean\"},\"CacheOptions\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"Enable in memory caching.\",\"enum\":[true]},{\"$ref\":\"#/definitions/CacheOptionsNormalized\"}]},\"CacheOptionsNormalized\":{\"description\":\"Cache generated modules and chunks to improve performance for multiple incremental builds.\",\"anyOf\":[{\"description\":\"Disable caching.\",\"enum\":[false]},{\"$ref\":\"#/definitions/MemoryCacheOptions\"},{\"$ref\":\"#/definitions/FileCacheOptions\"}]},\"Charset\":{\"description\":\"Add charset attribute for script tag.\",\"type\":\"boolean\"},\"ChunkFilename\":{\"description\":\"Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"ChunkFormat\":{\"description\":\"The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"array-push\",\"commonjs\",false]},{\"type\":\"string\"}]},\"ChunkLoadTimeout\":{\"description\":\"Number of milliseconds before chunk request expires.\",\"type\":\"number\"},\"ChunkLoading\":{\"description\":\"The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/ChunkLoadingType\"}]},\"ChunkLoadingGlobal\":{\"description\":\"The global variable used by webpack for loading of chunks.\",\"type\":\"string\"},\"ChunkLoadingType\":{\"description\":\"The method of loading chunks (methods included by default are 'jsonp' (web), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"jsonp\",\"import-scripts\",\"require\",\"async-node\"]},{\"type\":\"string\"}]},\"Clean\":{\"description\":\"Clean the output directory before emit.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/CleanOptions\"}]},\"CleanOptions\":{\"description\":\"Advanced options for cleaning assets.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"dry\":{\"description\":\"Log the assets that should be removed instead of deleting them.\",\"type\":\"boolean\"},\"keep\":{\"description\":\"Keep these assets.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((filename: string) => boolean)\"}]}}},\"CompareBeforeEmit\":{\"description\":\"Check if to be emitted file already exists and have the same content before writing to output filesystem.\",\"type\":\"boolean\"},\"Context\":{\"description\":\"The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.\",\"type\":\"string\",\"absolutePath\":true},\"CrossOriginLoading\":{\"description\":\"This option enables cross-origin loading of chunks.\",\"enum\":[false,\"anonymous\",\"use-credentials\"]},\"Dependencies\":{\"description\":\"References to other configurations to depend on.\",\"type\":\"array\",\"items\":{\"description\":\"References to another configuration to depend on.\",\"type\":\"string\"}},\"DevServer\":{\"description\":\"Options for the webpack-dev-server.\",\"type\":\"object\"},\"DevTool\":{\"description\":\"A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).\",\"anyOf\":[{\"enum\":[false,\"eval\"]},{\"type\":\"string\",\"pattern\":\"^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\"}]},\"DevtoolFallbackModuleFilenameTemplate\":{\"description\":\"Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"DevtoolModuleFilenameTemplate\":{\"description\":\"Filename template string of function for the sources array in a generated SourceMap.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"DevtoolNamespace\":{\"description\":\"Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.\",\"type\":\"string\"},\"EmptyGeneratorOptions\":{\"description\":\"No generator options are supported for this module type.\",\"type\":\"object\",\"additionalProperties\":false},\"EmptyParserOptions\":{\"description\":\"No parser options are supported for this module type.\",\"type\":\"object\",\"additionalProperties\":false},\"EnabledChunkLoadingTypes\":{\"description\":\"List of chunk loading types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ChunkLoadingType\"}},\"EnabledLibraryTypes\":{\"description\":\"List of library types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/LibraryType\"}},\"EnabledWasmLoadingTypes\":{\"description\":\"List of wasm loading types enabled for use by entry points.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/WasmLoadingType\"}},\"Entry\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamic\"},{\"$ref\":\"#/definitions/EntryStatic\"}]},\"EntryDescription\":{\"description\":\"An object with entry point description.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"dependOn\":{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"anyOf\":[{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"type\":\"array\",\"items\":{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1}]},\"filename\":{\"$ref\":\"#/definitions/EntryFilename\"},\"import\":{\"$ref\":\"#/definitions/EntryItem\"},\"layer\":{\"$ref\":\"#/definitions/Layer\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"runtime\":{\"$ref\":\"#/definitions/EntryRuntime\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}},\"required\":[\"import\"]},\"EntryDescriptionNormalized\":{\"description\":\"An object with entry point description.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"dependOn\":{\"description\":\"The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.\",\"type\":\"array\",\"items\":{\"description\":\"An entrypoint that the current entrypoint depend on. It must be loaded when this entrypoint is loaded.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"import\":{\"description\":\"Module(s) that are loaded upon startup. The last one is exported.\",\"type\":\"array\",\"items\":{\"description\":\"Module that is loaded upon startup. Only the last one is exported.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},\"layer\":{\"$ref\":\"#/definitions/Layer\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"runtime\":{\"$ref\":\"#/definitions/EntryRuntime\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"EntryDynamic\":{\"description\":\"A Function returning an entry object, an entry string, an entry array or a promise to these things.\",\"instanceof\":\"Function\",\"tsType\":\"(() => EntryStatic | Promise)\"},\"EntryDynamicNormalized\":{\"description\":\"A Function returning a Promise resolving to a normalized entry.\",\"instanceof\":\"Function\",\"tsType\":\"(() => Promise)\"},\"EntryFilename\":{\"description\":\"Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"EntryItem\":{\"description\":\"Module(s) that are loaded upon startup.\",\"anyOf\":[{\"description\":\"All modules are loaded upon startup. The last one is exported.\",\"type\":\"array\",\"items\":{\"description\":\"A module that is loaded upon startup. Only the last one is exported.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1,\"uniqueItems\":true},{\"description\":\"The string is resolved to a module which is loaded upon startup.\",\"type\":\"string\",\"minLength\":1}]},\"EntryNormalized\":{\"description\":\"The entry point(s) of the compilation.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryDynamicNormalized\"},{\"$ref\":\"#/definitions/EntryStaticNormalized\"}]},\"EntryObject\":{\"description\":\"Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An entry point with name.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryItem\"},{\"$ref\":\"#/definitions/EntryDescription\"}]}},\"EntryRuntime\":{\"description\":\"The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\",\"type\":\"string\",\"minLength\":1},\"EntryStatic\":{\"description\":\"A static entry description.\",\"anyOf\":[{\"$ref\":\"#/definitions/EntryObject\"},{\"$ref\":\"#/definitions/EntryUnnamed\"}]},\"EntryStaticNormalized\":{\"description\":\"Multiple entry bundles are created. The key is the entry name. The value is an entry description object.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"An object with entry point description.\",\"oneOf\":[{\"$ref\":\"#/definitions/EntryDescriptionNormalized\"}]}},\"EntryUnnamed\":{\"description\":\"An entry point without name.\",\"oneOf\":[{\"$ref\":\"#/definitions/EntryItem\"}]},\"Environment\":{\"description\":\"The abilities of the environment where the webpack generated code should run.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"arrowFunction\":{\"description\":\"The environment supports arrow functions ('() => { ... }').\",\"type\":\"boolean\"},\"bigIntLiteral\":{\"description\":\"The environment supports BigInt as literal (123n).\",\"type\":\"boolean\"},\"const\":{\"description\":\"The environment supports const and let for variable declarations.\",\"type\":\"boolean\"},\"destructuring\":{\"description\":\"The environment supports destructuring ('{ a, b } = obj').\",\"type\":\"boolean\"},\"dynamicImport\":{\"description\":\"The environment supports an async import() function to import EcmaScript modules.\",\"type\":\"boolean\"},\"forOf\":{\"description\":\"The environment supports 'for of' iteration ('for (const x of array) { ... }').\",\"type\":\"boolean\"},\"module\":{\"description\":\"The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').\",\"type\":\"boolean\"}}},\"Experiments\":{\"description\":\"Enables/Disables experiments (experimental features with relax SemVer compatibility).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"asset\":{\"description\":\"Allow module type 'asset' to generate assets.\",\"type\":\"boolean\"},\"asyncWebAssembly\":{\"description\":\"Support WebAssembly as asynchronous EcmaScript Module.\",\"type\":\"boolean\"},\"executeModule\":{\"description\":\"Enable build-time execution of modules from the module graph for plugins and loaders.\",\"type\":\"boolean\"},\"layers\":{\"description\":\"Enable module and chunk layers.\",\"type\":\"boolean\"},\"lazyCompilation\":{\"description\":\"Compile entrypoints and import()s only when they are accessed.\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"backend\":{\"description\":\"A custom backend.\",\"instanceof\":\"Function\",\"tsType\":\"(((compiler: import('../lib/Compiler'), client: string, callback: (err?: Error, api?: any) => void) => void) | ((compiler: import('../lib/Compiler'), client: string) => Promise))\"},\"client\":{\"description\":\"A custom client.\",\"type\":\"string\"},\"entries\":{\"description\":\"Enable/disable lazy compilation for entries.\",\"type\":\"boolean\"},\"imports\":{\"description\":\"Enable/disable lazy compilation for import() modules.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((module: import('../lib/Module')) => boolean)\"}]}}}]},\"outputModule\":{\"description\":\"Allow output javascript files as module source type.\",\"type\":\"boolean\"},\"syncWebAssembly\":{\"description\":\"Support WebAssembly as synchronous EcmaScript Module (outdated).\",\"type\":\"boolean\"},\"topLevelAwait\":{\"description\":\"Allow using top-level-await in EcmaScript Modules.\",\"type\":\"boolean\"}}},\"ExternalItem\":{\"description\":\"Specify dependency that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"description\":\"Every matched dependency becomes external.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An exact matched dependency becomes external. The same string is used as external dependency.\",\"type\":\"string\"},{\"description\":\"If an dependency matches exactly a property of the object, the property value is used as dependency.\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/ExternalItemValue\"},\"properties\":{\"byLayer\":{\"description\":\"Specify externals depending on the layer.\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/ExternalItem\"}},{\"instanceof\":\"Function\",\"tsType\":\"((layer: string | null) => ExternalItem)\"}]}}},{\"description\":\"The function is called on each dependency (`function(context, request, callback(err, result))`).\",\"instanceof\":\"Function\",\"tsType\":\"(((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise))\"}]},\"ExternalItemFunctionData\":{\"description\":\"Data object passed as argument when a function is set for 'externals'.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"context\":{\"description\":\"The directory in which the request is placed.\",\"type\":\"string\"},\"contextInfo\":{\"description\":\"Contextual information.\",\"type\":\"object\",\"tsType\":\"import('../lib/ModuleFactory').ModuleFactoryCreateDataContextInfo\"},\"getResolve\":{\"description\":\"Get a resolve function with the current resolver options.\",\"instanceof\":\"Function\",\"tsType\":\"((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error, result?: string) => void) => void) | ((context: string, request: string) => Promise))\"},\"request\":{\"description\":\"The request as written by the user in the require/import expression/statement.\",\"type\":\"string\"}}},\"ExternalItemValue\":{\"description\":\"The dependency used for the external.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A part of the target of the external.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"`true`: The dependency name is used as target of the external.\",\"type\":\"boolean\"},{\"description\":\"The target of the external.\",\"type\":\"string\"},{\"type\":\"object\"}]},\"Externals\":{\"description\":\"Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ExternalItem\"}},{\"$ref\":\"#/definitions/ExternalItem\"}]},\"ExternalsPresets\":{\"description\":\"Enable presets of externals for specific targets.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"electron\":{\"description\":\"Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronMain\":{\"description\":\"Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronPreload\":{\"description\":\"Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"electronRenderer\":{\"description\":\"Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.\",\"type\":\"boolean\"},\"node\":{\"description\":\"Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.\",\"type\":\"boolean\"},\"nwjs\":{\"description\":\"Treat NW.js legacy nw.gui module as external and load it via require() when used.\",\"type\":\"boolean\"},\"web\":{\"description\":\"Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).\",\"type\":\"boolean\"},\"webAsync\":{\"description\":\"Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).\",\"type\":\"boolean\"}}},\"ExternalsType\":{\"description\":\"Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).\",\"enum\":[\"var\",\"module\",\"assign\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\",\"promise\",\"import\",\"script\"]},\"FileCacheOptions\":{\"description\":\"Options object for persistent file-based caching.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"allowCollectingMemory\":{\"description\":\"Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.\",\"type\":\"boolean\"},\"buildDependencies\":{\"description\":\"Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"List of dependencies the build depends on.\",\"type\":\"array\",\"items\":{\"description\":\"Request to a dependency (resolved as directory relative to the context directory).\",\"type\":\"string\",\"minLength\":1}}},\"cacheDirectory\":{\"description\":\"Base directory for the cache (defaults to node_modules/.cache/webpack).\",\"type\":\"string\",\"absolutePath\":true},\"cacheLocation\":{\"description\":\"Locations for the cache (defaults to cacheDirectory / name).\",\"type\":\"string\",\"absolutePath\":true},\"hashAlgorithm\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package).\",\"type\":\"string\"},\"idleTimeout\":{\"description\":\"Time in ms after which idle period the cache storing should happen (only for store: 'pack').\",\"type\":\"number\",\"minimum\":0},\"idleTimeoutForInitialStore\":{\"description\":\"Time in ms after which idle period the initial cache storing should happen (only for store: 'pack').\",\"type\":\"number\",\"minimum\":0},\"immutablePaths\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"type\":\"array\",\"items\":{\"description\":\"A path to a immutable directory (usually a package manager cache directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}},\"managedPaths\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"type\":\"array\",\"items\":{\"description\":\"A path to a managed directory (usually a node_modules directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}},\"maxAge\":{\"description\":\"Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).\",\"type\":\"number\",\"minimum\":0},\"maxMemoryGenerations\":{\"description\":\"Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.\",\"type\":\"number\",\"minimum\":0},\"name\":{\"description\":\"Name for the cache. Different names will lead to different coexisting caches.\",\"type\":\"string\"},\"profile\":{\"description\":\"Track and log detailed timing information for individual cache items.\",\"type\":\"boolean\"},\"store\":{\"description\":\"When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).\",\"enum\":[\"pack\"]},\"type\":{\"description\":\"Filesystem caching.\",\"enum\":[\"filesystem\"]},\"version\":{\"description\":\"Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.\",\"type\":\"string\"}},\"required\":[\"type\"]},\"Filename\":{\"description\":\"Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"oneOf\":[{\"$ref\":\"#/definitions/FilenameTemplate\"}]},\"FilenameTemplate\":{\"description\":\"Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"FilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"}]},\"FilterTypes\":{\"description\":\"Filtering values.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/FilterItemTypes\"}]}},{\"$ref\":\"#/definitions/FilterItemTypes\"}]},\"GeneratorOptionsByModuleType\":{\"description\":\"Specify options for each generator.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options for generating.\",\"type\":\"object\",\"additionalProperties\":true},\"properties\":{\"asset\":{\"$ref\":\"#/definitions/AssetGeneratorOptions\"},\"asset/inline\":{\"$ref\":\"#/definitions/AssetInlineGeneratorOptions\"},\"asset/resource\":{\"$ref\":\"#/definitions/AssetResourceGeneratorOptions\"},\"javascript\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/auto\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/dynamic\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"},\"javascript/esm\":{\"$ref\":\"#/definitions/EmptyGeneratorOptions\"}}},\"GlobalObject\":{\"description\":\"An expression which is used to address the global object/scope in runtime code.\",\"type\":\"string\",\"minLength\":1},\"HashDigest\":{\"description\":\"Digest type used for the hash.\",\"type\":\"string\"},\"HashDigestLength\":{\"description\":\"Number of chars which are used for the hash.\",\"type\":\"number\",\"minimum\":1},\"HashFunction\":{\"description\":\"Algorithm used for generation the hash (see node.js crypto package).\",\"anyOf\":[{\"type\":\"string\",\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"typeof import('../lib/util/Hash')\"}]},\"HashSalt\":{\"description\":\"Any string which is added to the hash to salt it.\",\"type\":\"string\",\"minLength\":1},\"HotUpdateChunkFilename\":{\"description\":\"The filename of the Hot Update Chunks. They are inside the output.path directory.\",\"type\":\"string\",\"absolutePath\":false},\"HotUpdateGlobal\":{\"description\":\"The global variable used by webpack for loading of hot update chunks.\",\"type\":\"string\"},\"HotUpdateMainFilename\":{\"description\":\"The filename of the Hot Update Main File. It is inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"IgnoreWarnings\":{\"description\":\"Ignore specific warnings.\",\"type\":\"array\",\"items\":{\"description\":\"Ignore specific warnings.\",\"anyOf\":[{\"description\":\"A RegExp to select the warning message.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"file\":{\"description\":\"A RegExp to select the origin file for the warning.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"message\":{\"description\":\"A RegExp to select the warning message.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},\"module\":{\"description\":\"A RegExp to select the origin module for the warning.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},{\"description\":\"A custom function to select warnings based on the raw warning instance.\",\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)\"}]}},\"IgnoreWarningsNormalized\":{\"description\":\"Ignore specific warnings.\",\"type\":\"array\",\"items\":{\"description\":\"A function to select warnings based on the raw warning instance.\",\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/WebpackError'), compilation: import('../lib/Compilation')) => boolean)\"}},\"Iife\":{\"description\":\"Wrap javascript code into IIFE's to avoid leaking into global scope.\",\"type\":\"boolean\"},\"ImportFunctionName\":{\"description\":\"The name of the native import() function (can be exchanged for a polyfill).\",\"type\":\"string\"},\"ImportMetaName\":{\"description\":\"The name of the native import.meta object (can be exchanged for a polyfill).\",\"type\":\"string\"},\"InfrastructureLogging\":{\"description\":\"Options for infrastructure level logging.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"appendOnly\":{\"description\":\"Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided.\",\"type\":\"boolean\"},\"colors\":{\"description\":\"Enables/Disables colorful output. This option is only used when no custom console is provided.\",\"type\":\"boolean\"},\"console\":{\"description\":\"Custom console used for logging.\",\"tsType\":\"Console\"},\"debug\":{\"description\":\"Enable debug logging for specific loggers.\",\"anyOf\":[{\"description\":\"Enable/Disable debug logging for all loggers.\",\"type\":\"boolean\"},{\"$ref\":\"#/definitions/FilterTypes\"}]},\"level\":{\"description\":\"Log level.\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]},\"stream\":{\"description\":\"Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.\",\"tsType\":\"NodeJS.WritableStream\"}}},\"JavascriptParserOptions\":{\"description\":\"Parser options for javascript modules.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"browserify\":{\"description\":\"Enable/disable special handling for browserify bundles.\",\"type\":\"boolean\"},\"commonjs\":{\"description\":\"Enable/disable parsing of CommonJs syntax.\",\"type\":\"boolean\"},\"commonjsMagicComments\":{\"description\":\"Enable/disable parsing of magic comments in CommonJs syntax.\",\"type\":\"boolean\"},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies.\",\"type\":\"string\"},\"harmony\":{\"description\":\"Enable/disable parsing of EcmaScript Modules syntax.\",\"type\":\"boolean\"},\"import\":{\"description\":\"Enable/disable parsing of import() syntax.\",\"type\":\"boolean\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"requireContext\":{\"description\":\"Enable/disable parsing of require.context syntax.\",\"type\":\"boolean\"},\"requireEnsure\":{\"description\":\"Enable/disable parsing of require.ensure syntax.\",\"type\":\"boolean\"},\"requireInclude\":{\"description\":\"Enable/disable parsing of require.include syntax.\",\"type\":\"boolean\"},\"requireJs\":{\"description\":\"Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.\",\"type\":\"boolean\"},\"strictExportPresence\":{\"description\":\"Emit errors instead of warnings when imported names don't exist in imported module.\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects.\",\"type\":\"boolean\"},\"system\":{\"description\":\"Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way.\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way.\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way.\",\"type\":\"string\"},\"url\":{\"description\":\"Enable/disable parsing of new URL() syntax.\",\"anyOf\":[{\"enum\":[\"relative\"]},{\"type\":\"boolean\"}]},\"worker\":{\"description\":\"Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Specify a syntax that should be parsed as WebWorker reference. 'Abc' handles 'new Abc()', 'Abc from xyz' handles 'import { Abc } from \\\"xyz\\\"; new Abc()', 'abc()' handles 'abc()', and combinations are also possible.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"boolean\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies.\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies.\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"Layer\":{\"description\":\"Specifies the layer in which modules of this entrypoint are placed.\",\"anyOf\":[{\"enum\":[null]},{\"type\":\"string\",\"minLength\":1}]},\"Library\":{\"description\":\"Make the output files a library, exporting the exports of the entry point.\",\"anyOf\":[{\"$ref\":\"#/definitions/LibraryName\"},{\"$ref\":\"#/definitions/LibraryOptions\"}]},\"LibraryCustomUmdCommentObject\":{\"description\":\"Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Set comment for `amd` section in UMD.\",\"type\":\"string\"},\"commonjs\":{\"description\":\"Set comment for `commonjs` (exports) section in UMD.\",\"type\":\"string\"},\"commonjs2\":{\"description\":\"Set comment for `commonjs2` (module.exports) section in UMD.\",\"type\":\"string\"},\"root\":{\"description\":\"Set comment for `root` (global variable) section in UMD.\",\"type\":\"string\"}}},\"LibraryCustomUmdObject\":{\"description\":\"Description object for all UMD variants of the library name.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"description\":\"Name of the exposed AMD library in the UMD.\",\"type\":\"string\",\"minLength\":1},\"commonjs\":{\"description\":\"Name of the exposed commonjs export in the UMD.\",\"type\":\"string\",\"minLength\":1},\"root\":{\"description\":\"Name of the property exposed globally by a UMD library.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the name of the property exposed globally by a UMD library.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}}},\"LibraryExport\":{\"description\":\"Specify which export should be exposed as library.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the export that should be exposed as library.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]},\"LibraryName\":{\"description\":\"The name of the library (some types allow unnamed libraries too).\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A part of the library name.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1},{\"type\":\"string\",\"minLength\":1},{\"$ref\":\"#/definitions/LibraryCustomUmdObject\"}]},\"LibraryOptions\":{\"description\":\"Options for library.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"auxiliaryComment\":{\"$ref\":\"#/definitions/AuxiliaryComment\"},\"export\":{\"$ref\":\"#/definitions/LibraryExport\"},\"name\":{\"$ref\":\"#/definitions/LibraryName\"},\"type\":{\"$ref\":\"#/definitions/LibraryType\"},\"umdNamedDefine\":{\"$ref\":\"#/definitions/UmdNamedDefine\"}},\"required\":[\"type\"]},\"LibraryType\":{\"description\":\"Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"var\",\"module\",\"assign\",\"assign-properties\",\"this\",\"window\",\"self\",\"global\",\"commonjs\",\"commonjs2\",\"commonjs-module\",\"amd\",\"amd-require\",\"umd\",\"umd2\",\"jsonp\",\"system\"]},{\"type\":\"string\"}]},\"Loader\":{\"description\":\"Custom values available in the loader context.\",\"type\":\"object\"},\"MemoryCacheOptions\":{\"description\":\"Options object for in-memory caching.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"maxGenerations\":{\"description\":\"Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).\",\"type\":\"number\",\"minimum\":1},\"type\":{\"description\":\"In memory caching.\",\"enum\":[\"memory\"]}},\"required\":[\"type\"]},\"Mode\":{\"description\":\"Enable production optimizations or development hints.\",\"enum\":[\"development\",\"production\",\"none\"]},\"ModuleFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((name: string, module: import('../lib/stats/DefaultStatsFactoryPlugin').StatsModule, type: 'module' | 'chunk' | 'root-of-chunk' | 'nested') => boolean)\"}]},\"ModuleFilterTypes\":{\"description\":\"Filtering modules.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/ModuleFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/ModuleFilterItemTypes\"}]},\"ModuleOptions\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"exprContextCritical\":{\"description\":\"Enable warnings for full dynamic dependencies.\",\"type\":\"boolean\"},\"exprContextRecursive\":{\"description\":\"Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.\",\"type\":\"boolean\"},\"exprContextRegExp\":{\"description\":\"Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"exprContextRequest\":{\"description\":\"Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.\",\"type\":\"string\"},\"generator\":{\"$ref\":\"#/definitions/GeneratorOptionsByModuleType\"},\"noParse\":{\"$ref\":\"#/definitions/NoParse\"},\"parser\":{\"$ref\":\"#/definitions/ParserOptionsByModuleType\"},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"strictExportPresence\":{\"description\":\"Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.\",\"type\":\"boolean\"},\"strictThisContextOnImports\":{\"description\":\"Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.\",\"type\":\"boolean\"},\"unknownContextCritical\":{\"description\":\"Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.\",\"type\":\"boolean\"},\"unknownContextRecursive\":{\"description\":\"Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.\",\"type\":\"boolean\"},\"unknownContextRegExp\":{\"description\":\"Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"boolean\"}]},\"unknownContextRequest\":{\"description\":\"Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.\",\"type\":\"string\"},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests.\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"wrappedContextCritical\":{\"description\":\"Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.\",\"type\":\"boolean\"},\"wrappedContextRecursive\":{\"description\":\"Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.\",\"type\":\"boolean\"},\"wrappedContextRegExp\":{\"description\":\"Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"}}},\"ModuleOptionsNormalized\":{\"description\":\"Options affecting the normal modules (`NormalModuleFactory`).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"defaultRules\":{\"description\":\"An array of rules applied by default for modules.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"generator\":{\"$ref\":\"#/definitions/GeneratorOptionsByModuleType\"},\"noParse\":{\"$ref\":\"#/definitions/NoParse\"},\"parser\":{\"$ref\":\"#/definitions/ParserOptionsByModuleType\"},\"rules\":{\"description\":\"An array of rules applied for modules.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRules\"}]},\"unsafeCache\":{\"description\":\"Cache the resolving of module requests.\",\"anyOf\":[{\"type\":\"boolean\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}},\"required\":[\"defaultRules\",\"generator\",\"parser\",\"rules\"]},\"Name\":{\"description\":\"Name of the configuration. Used when loading multiple configurations.\",\"type\":\"string\"},\"NoParse\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Don't parse files matching. It's matched against the full resolved request.\",\"anyOf\":[{\"description\":\"A regular expression, when matched the module is not parsed.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An absolute path, when the module starts with this path it is not parsed.\",\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"minItems\":1},{\"description\":\"A regular expression, when matched the module is not parsed.\",\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"An absolute path, when the module starts with this path it is not parsed.\",\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"Node\":{\"description\":\"Include polyfills or mocks for various node stuff.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/NodeOptions\"}]},\"NodeOptions\":{\"description\":\"Options object for node compatibility features.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"__dirname\":{\"description\":\"Include a polyfill for the '__dirname' variable.\",\"enum\":[false,true,\"mock\",\"eval-only\"]},\"__filename\":{\"description\":\"Include a polyfill for the '__filename' variable.\",\"enum\":[false,true,\"mock\",\"eval-only\"]},\"global\":{\"description\":\"Include a polyfill for the 'global' variable.\",\"type\":\"boolean\"}}},\"Optimization\":{\"description\":\"Enables/Disables integrated optimizations.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"checkWasmTypes\":{\"description\":\"Check for incompatible wasm types when importing/exporting from/to ESM.\",\"type\":\"boolean\"},\"chunkIds\":{\"description\":\"Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).\",\"enum\":[\"natural\",\"named\",\"deterministic\",\"size\",\"total-size\",false]},\"concatenateModules\":{\"description\":\"Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.\",\"type\":\"boolean\"},\"emitOnErrors\":{\"description\":\"Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.\",\"type\":\"boolean\"},\"flagIncludedChunks\":{\"description\":\"Also flag chunks as loaded which contain a subset of the modules.\",\"type\":\"boolean\"},\"innerGraph\":{\"description\":\"Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.\",\"type\":\"boolean\"},\"mangleExports\":{\"description\":\"Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/\\\"deterministic\\\": generate short deterministic names optimized for caching, \\\"size\\\": generate the shortest possible names).\",\"anyOf\":[{\"enum\":[\"size\",\"deterministic\"]},{\"type\":\"boolean\"}]},\"mangleWasmImports\":{\"description\":\"Reduce size of WASM by changing imports to shorter strings.\",\"type\":\"boolean\"},\"mergeDuplicateChunks\":{\"description\":\"Merge chunks which contain the same modules.\",\"type\":\"boolean\"},\"minimize\":{\"description\":\"Enable minimizing the output. Uses optimization.minimizer.\",\"type\":\"boolean\"},\"minimizer\":{\"description\":\"Minimizer(s) to use for minimizing the output.\",\"type\":\"array\",\"cli\":{\"exclude\":true},\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"moduleIds\":{\"description\":\"Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).\",\"enum\":[\"natural\",\"named\",\"hashed\",\"deterministic\",\"size\",false]},\"noEmitOnErrors\":{\"description\":\"Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).\",\"type\":\"boolean\",\"cli\":{\"exclude\":true}},\"nodeEnv\":{\"description\":\"Set process.env.NODE_ENV to a specific value.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"}]},\"portableRecords\":{\"description\":\"Generate records with relative paths to be able to move the context folder.\",\"type\":\"boolean\"},\"providedExports\":{\"description\":\"Figure out which exports are provided by modules to generate more efficient code.\",\"type\":\"boolean\"},\"realContentHash\":{\"description\":\"Use real [contenthash] based on final content of the assets.\",\"type\":\"boolean\"},\"removeAvailableModules\":{\"description\":\"Removes modules from chunks when these modules are already included in all parents.\",\"type\":\"boolean\"},\"removeEmptyChunks\":{\"description\":\"Remove chunks which are empty.\",\"type\":\"boolean\"},\"runtimeChunk\":{\"$ref\":\"#/definitions/OptimizationRuntimeChunk\"},\"sideEffects\":{\"description\":\"Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).\",\"anyOf\":[{\"enum\":[\"flag\"]},{\"type\":\"boolean\"}]},\"splitChunks\":{\"description\":\"Optimize duplication and caching by splitting chunks by shared modules and cache group.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/OptimizationSplitChunksOptions\"}]},\"usedExports\":{\"description\":\"Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, \\\"global\\\": analyse exports globally for all runtimes combined).\",\"anyOf\":[{\"enum\":[\"global\"]},{\"type\":\"boolean\"}]}}},\"OptimizationRuntimeChunk\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps.\",\"anyOf\":[{\"enum\":[\"single\",\"multiple\"]},{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name or name factory for the runtime chunks.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}}}]},\"OptimizationRuntimeChunkNormalized\":{\"description\":\"Create an additional chunk which contains only the webpack runtime and chunk hash maps.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"name\":{\"description\":\"The name factory for the runtime chunks.\",\"instanceof\":\"Function\",\"tsType\":\"Function\"}}}]},\"OptimizationSplitChunksCacheGroup\":{\"description\":\"Options object for describing behavior of a cache group selecting modules that should be cached together.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"chunks\":{\"description\":\"Select chunks for determining cache group content (defaults to \\\"initial\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"enforce\":{\"description\":\"Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.\",\"type\":\"boolean\"},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"filename\":{\"description\":\"Sets the template for the filename for created chunks.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"idHint\":{\"description\":\"Sets the hint for chunk id.\",\"type\":\"string\"},\"layer\":{\"description\":\"Assign modules to a cache group by module layer.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading.\",\"type\":\"number\",\"minimum\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point.\",\"type\":\"number\",\"minimum\":1},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting.\",\"type\":\"number\",\"minimum\":1},\"minRemainingSize\":{\"description\":\"Minimal size for the chunks the stay after moving the modules to a new chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"name\":{\"description\":\"Give chunks for this cache group a name (chunks with equal name are merged).\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"priority\":{\"description\":\"Priority of this cache group.\",\"type\":\"number\"},\"reuseExistingChunk\":{\"description\":\"Try to reuse existing chunk (with name) when it has matching modules.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Assign modules to a cache group by module name.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"type\":{\"description\":\"Assign modules to a cache group by module type.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"usedExports\":{\"description\":\"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksGetCacheGroups\":{\"description\":\"A function returning cache groups.\",\"instanceof\":\"Function\",\"tsType\":\"((module: import('../lib/Module')) => OptimizationSplitChunksCacheGroup | OptimizationSplitChunksCacheGroup[] | void)\"},\"OptimizationSplitChunksOptions\":{\"description\":\"Options object for splitting chunks into smaller chunks.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"cacheGroups\":{\"description\":\"Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Configuration for a cache group.\",\"anyOf\":[{\"enum\":[false]},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"},{\"$ref\":\"#/definitions/OptimizationSplitChunksCacheGroup\"}]},\"not\":{\"description\":\"Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error\\nDid you intent to define a cache group with a test instead?\\ncacheGroups: {\\n : {\\n test: ...\\n }\\n}.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"test\":{\"description\":\"The test property is a cache group name, but using the test option of the cache group could be intended instead.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]}},\"required\":[\"test\"]}},\"chunks\":{\"description\":\"Select chunks for determining shared modules (defaults to \\\"async\\\", \\\"initial\\\" and \\\"all\\\" requires adding these chunks to the HTML).\",\"anyOf\":[{\"enum\":[\"initial\",\"async\",\"all\"]},{\"instanceof\":\"Function\",\"tsType\":\"((chunk: import('../lib/Chunk')) => boolean)\"}]},\"defaultSizeTypes\":{\"description\":\"Sets the size types which are used when a number is used for sizes.\",\"type\":\"array\",\"items\":{\"description\":\"Size type, like 'javascript', 'webassembly'.\",\"type\":\"string\"},\"minItems\":1},\"enforceSizeThreshold\":{\"description\":\"Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"fallbackCacheGroup\":{\"description\":\"Options for modules not selected by any other cache group.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"automaticNameDelimiter\":{\"description\":\"Sets the name delimiter for created chunks.\",\"type\":\"string\",\"minLength\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]}}},\"filename\":{\"description\":\"Sets the template for the filename for created chunks.\",\"anyOf\":[{\"type\":\"string\",\"absolutePath\":false,\"minLength\":1},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"hidePathInfo\":{\"description\":\"Prevents exposing path info when creating names for parts splitted by maxSize.\",\"type\":\"boolean\"},\"maxAsyncRequests\":{\"description\":\"Maximum number of requests which are accepted for on-demand loading.\",\"type\":\"number\",\"minimum\":1},\"maxAsyncSize\":{\"description\":\"Maximal size hint for the on-demand chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxInitialRequests\":{\"description\":\"Maximum number of initial chunks which are accepted for an entry point.\",\"type\":\"number\",\"minimum\":1},\"maxInitialSize\":{\"description\":\"Maximal size hint for the initial chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"maxSize\":{\"description\":\"Maximal size hint for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minChunks\":{\"description\":\"Minimum number of times a module has to be duplicated until it's considered for splitting.\",\"type\":\"number\",\"minimum\":1},\"minRemainingSize\":{\"description\":\"Minimal size for the chunks the stay after moving the modules to a new chunk.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"minSize\":{\"description\":\"Minimal size for the created chunks.\",\"oneOf\":[{\"$ref\":\"#/definitions/OptimizationSplitChunksSizes\"}]},\"name\":{\"description\":\"Give chunks created a name (chunks with equal name are merged).\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"Function\"}]},\"usedExports\":{\"description\":\"Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.\",\"type\":\"boolean\"}}},\"OptimizationSplitChunksSizes\":{\"description\":\"Size description for limits.\",\"anyOf\":[{\"description\":\"Size of the javascript part of the chunk.\",\"type\":\"number\",\"minimum\":0},{\"description\":\"Specify size limits per size type.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Size of the part of the chunk with the type of the key.\",\"type\":\"number\"}}]},\"Output\":{\"description\":\"Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetModuleFilename\":{\"$ref\":\"#/definitions/AssetModuleFilename\"},\"auxiliaryComment\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/AuxiliaryComment\"}]},\"charset\":{\"$ref\":\"#/definitions/Charset\"},\"chunkFilename\":{\"$ref\":\"#/definitions/ChunkFilename\"},\"chunkFormat\":{\"$ref\":\"#/definitions/ChunkFormat\"},\"chunkLoadTimeout\":{\"$ref\":\"#/definitions/ChunkLoadTimeout\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"chunkLoadingGlobal\":{\"$ref\":\"#/definitions/ChunkLoadingGlobal\"},\"clean\":{\"$ref\":\"#/definitions/Clean\"},\"compareBeforeEmit\":{\"$ref\":\"#/definitions/CompareBeforeEmit\"},\"crossOriginLoading\":{\"$ref\":\"#/definitions/CrossOriginLoading\"},\"devtoolFallbackModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolFallbackModuleFilenameTemplate\"},\"devtoolModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolModuleFilenameTemplate\"},\"devtoolNamespace\":{\"$ref\":\"#/definitions/DevtoolNamespace\"},\"enabledChunkLoadingTypes\":{\"$ref\":\"#/definitions/EnabledChunkLoadingTypes\"},\"enabledLibraryTypes\":{\"$ref\":\"#/definitions/EnabledLibraryTypes\"},\"enabledWasmLoadingTypes\":{\"$ref\":\"#/definitions/EnabledWasmLoadingTypes\"},\"environment\":{\"$ref\":\"#/definitions/Environment\"},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"globalObject\":{\"$ref\":\"#/definitions/GlobalObject\"},\"hashDigest\":{\"$ref\":\"#/definitions/HashDigest\"},\"hashDigestLength\":{\"$ref\":\"#/definitions/HashDigestLength\"},\"hashFunction\":{\"$ref\":\"#/definitions/HashFunction\"},\"hashSalt\":{\"$ref\":\"#/definitions/HashSalt\"},\"hotUpdateChunkFilename\":{\"$ref\":\"#/definitions/HotUpdateChunkFilename\"},\"hotUpdateGlobal\":{\"$ref\":\"#/definitions/HotUpdateGlobal\"},\"hotUpdateMainFilename\":{\"$ref\":\"#/definitions/HotUpdateMainFilename\"},\"iife\":{\"$ref\":\"#/definitions/Iife\"},\"importFunctionName\":{\"$ref\":\"#/definitions/ImportFunctionName\"},\"importMetaName\":{\"$ref\":\"#/definitions/ImportMetaName\"},\"library\":{\"$ref\":\"#/definitions/Library\"},\"libraryExport\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/LibraryExport\"}]},\"libraryTarget\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/LibraryType\"}]},\"module\":{\"$ref\":\"#/definitions/OutputModule\"},\"path\":{\"$ref\":\"#/definitions/Path\"},\"pathinfo\":{\"$ref\":\"#/definitions/Pathinfo\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"scriptType\":{\"$ref\":\"#/definitions/ScriptType\"},\"sourceMapFilename\":{\"$ref\":\"#/definitions/SourceMapFilename\"},\"sourcePrefix\":{\"$ref\":\"#/definitions/SourcePrefix\"},\"strictModuleErrorHandling\":{\"$ref\":\"#/definitions/StrictModuleErrorHandling\"},\"strictModuleExceptionHandling\":{\"$ref\":\"#/definitions/StrictModuleExceptionHandling\"},\"trustedTypes\":{\"description\":\"Use a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.\",\"anyOf\":[{\"enum\":[true]},{\"description\":\"The name of the Trusted Types policy created by webpack to serve bundle chunks.\",\"type\":\"string\",\"minLength\":1},{\"$ref\":\"#/definitions/TrustedTypes\"}]},\"umdNamedDefine\":{\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/UmdNamedDefine\"}]},\"uniqueName\":{\"$ref\":\"#/definitions/UniqueName\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"},\"webassemblyModuleFilename\":{\"$ref\":\"#/definitions/WebassemblyModuleFilename\"},\"workerChunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"workerWasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"OutputModule\":{\"description\":\"Output javascript files as module source type.\",\"type\":\"boolean\"},\"OutputNormalized\":{\"description\":\"Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetModuleFilename\":{\"$ref\":\"#/definitions/AssetModuleFilename\"},\"charset\":{\"$ref\":\"#/definitions/Charset\"},\"chunkFilename\":{\"$ref\":\"#/definitions/ChunkFilename\"},\"chunkFormat\":{\"$ref\":\"#/definitions/ChunkFormat\"},\"chunkLoadTimeout\":{\"$ref\":\"#/definitions/ChunkLoadTimeout\"},\"chunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"chunkLoadingGlobal\":{\"$ref\":\"#/definitions/ChunkLoadingGlobal\"},\"clean\":{\"$ref\":\"#/definitions/Clean\"},\"compareBeforeEmit\":{\"$ref\":\"#/definitions/CompareBeforeEmit\"},\"crossOriginLoading\":{\"$ref\":\"#/definitions/CrossOriginLoading\"},\"devtoolFallbackModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolFallbackModuleFilenameTemplate\"},\"devtoolModuleFilenameTemplate\":{\"$ref\":\"#/definitions/DevtoolModuleFilenameTemplate\"},\"devtoolNamespace\":{\"$ref\":\"#/definitions/DevtoolNamespace\"},\"enabledChunkLoadingTypes\":{\"$ref\":\"#/definitions/EnabledChunkLoadingTypes\"},\"enabledLibraryTypes\":{\"$ref\":\"#/definitions/EnabledLibraryTypes\"},\"enabledWasmLoadingTypes\":{\"$ref\":\"#/definitions/EnabledWasmLoadingTypes\"},\"environment\":{\"$ref\":\"#/definitions/Environment\"},\"filename\":{\"$ref\":\"#/definitions/Filename\"},\"globalObject\":{\"$ref\":\"#/definitions/GlobalObject\"},\"hashDigest\":{\"$ref\":\"#/definitions/HashDigest\"},\"hashDigestLength\":{\"$ref\":\"#/definitions/HashDigestLength\"},\"hashFunction\":{\"$ref\":\"#/definitions/HashFunction\"},\"hashSalt\":{\"$ref\":\"#/definitions/HashSalt\"},\"hotUpdateChunkFilename\":{\"$ref\":\"#/definitions/HotUpdateChunkFilename\"},\"hotUpdateGlobal\":{\"$ref\":\"#/definitions/HotUpdateGlobal\"},\"hotUpdateMainFilename\":{\"$ref\":\"#/definitions/HotUpdateMainFilename\"},\"iife\":{\"$ref\":\"#/definitions/Iife\"},\"importFunctionName\":{\"$ref\":\"#/definitions/ImportFunctionName\"},\"importMetaName\":{\"$ref\":\"#/definitions/ImportMetaName\"},\"library\":{\"$ref\":\"#/definitions/LibraryOptions\"},\"module\":{\"$ref\":\"#/definitions/OutputModule\"},\"path\":{\"$ref\":\"#/definitions/Path\"},\"pathinfo\":{\"$ref\":\"#/definitions/Pathinfo\"},\"publicPath\":{\"$ref\":\"#/definitions/PublicPath\"},\"scriptType\":{\"$ref\":\"#/definitions/ScriptType\"},\"sourceMapFilename\":{\"$ref\":\"#/definitions/SourceMapFilename\"},\"sourcePrefix\":{\"$ref\":\"#/definitions/SourcePrefix\"},\"strictModuleErrorHandling\":{\"$ref\":\"#/definitions/StrictModuleErrorHandling\"},\"strictModuleExceptionHandling\":{\"$ref\":\"#/definitions/StrictModuleExceptionHandling\"},\"trustedTypes\":{\"$ref\":\"#/definitions/TrustedTypes\"},\"uniqueName\":{\"$ref\":\"#/definitions/UniqueName\"},\"wasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"},\"webassemblyModuleFilename\":{\"$ref\":\"#/definitions/WebassemblyModuleFilename\"},\"workerChunkLoading\":{\"$ref\":\"#/definitions/ChunkLoading\"},\"workerWasmLoading\":{\"$ref\":\"#/definitions/WasmLoading\"}}},\"Parallelism\":{\"description\":\"The number of parallel processed modules in the compilation.\",\"type\":\"number\",\"minimum\":1},\"ParserOptionsByModuleType\":{\"description\":\"Specify options for each parser.\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options for parsing.\",\"type\":\"object\",\"additionalProperties\":true},\"properties\":{\"asset\":{\"$ref\":\"#/definitions/AssetParserOptions\"},\"asset/inline\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"asset/resource\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"asset/source\":{\"$ref\":\"#/definitions/EmptyParserOptions\"},\"javascript\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/auto\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/dynamic\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"},\"javascript/esm\":{\"$ref\":\"#/definitions/JavascriptParserOptions\"}}},\"Path\":{\"description\":\"The output directory as **absolute path** (required).\",\"type\":\"string\",\"absolutePath\":true},\"Pathinfo\":{\"description\":\"Include comments with information about the modules.\",\"anyOf\":[{\"enum\":[\"verbose\"]},{\"type\":\"boolean\"}]},\"Performance\":{\"description\":\"Configuration for web performance recommendations.\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/PerformanceOptions\"}]},\"PerformanceOptions\":{\"description\":\"Configuration object for web performance recommendations.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"assetFilter\":{\"description\":\"Filter function to select assets that are checked.\",\"instanceof\":\"Function\",\"tsType\":\"Function\"},\"hints\":{\"description\":\"Sets the format of the hints: warnings, errors or nothing at all.\",\"enum\":[false,\"warning\",\"error\"]},\"maxAssetSize\":{\"description\":\"File size limit (in bytes) when exceeded, that webpack will provide performance hints.\",\"type\":\"number\"},\"maxEntrypointSize\":{\"description\":\"Total size of an entry point (in bytes).\",\"type\":\"number\"}}},\"Plugins\":{\"description\":\"Add additional plugins to the compiler.\",\"type\":\"array\",\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"$ref\":\"#/definitions/WebpackPluginInstance\"},{\"$ref\":\"#/definitions/WebpackPluginFunction\"}]}},\"Profile\":{\"description\":\"Capture timing information for each module.\",\"type\":\"boolean\"},\"PublicPath\":{\"description\":\"The 'publicPath' specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"$ref\":\"#/definitions/RawPublicPath\"}]},\"RawPublicPath\":{\"description\":\"The 'publicPath' specifies the public URL address of the output files when referenced in a browser.\",\"anyOf\":[{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((pathData: import(\\\"../lib/Compilation\\\").PathData, assetInfo?: import(\\\"../lib/Compilation\\\").AssetInfo) => string)\"}]},\"RecordsInputPath\":{\"description\":\"Store compiler state to a json file.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"RecordsOutputPath\":{\"description\":\"Load compiler state from a json file.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"RecordsPath\":{\"description\":\"Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.\",\"anyOf\":[{\"enum\":[false]},{\"type\":\"string\",\"absolutePath\":true}]},\"Resolve\":{\"description\":\"Options for the resolver.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"ResolveAlias\":{\"description\":\"Redirect module requests.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Alias configuration.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"description\":\"New request.\",\"anyOf\":[{\"description\":\"Multiple alternative requests.\",\"type\":\"array\",\"items\":{\"description\":\"One choice of request.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"Ignore request (replace with empty module).\",\"enum\":[false]},{\"description\":\"New request.\",\"type\":\"string\",\"minLength\":1}]},\"name\":{\"description\":\"Request to be redirected.\",\"type\":\"string\"},\"onlyModule\":{\"description\":\"Redirect only exact matching request.\",\"type\":\"boolean\"}},\"required\":[\"alias\",\"name\"]}},{\"type\":\"object\",\"additionalProperties\":{\"description\":\"New request.\",\"anyOf\":[{\"description\":\"Multiple alternative requests.\",\"type\":\"array\",\"items\":{\"description\":\"One choice of request.\",\"type\":\"string\",\"minLength\":1}},{\"description\":\"Ignore request (replace with empty module).\",\"enum\":[false]},{\"description\":\"New request.\",\"type\":\"string\",\"minLength\":1}]}}]},\"ResolveLoader\":{\"description\":\"Options for the resolver when resolving loaders.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"ResolveOptions\":{\"description\":\"Options object for resolving requests.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"alias\":{\"$ref\":\"#/definitions/ResolveAlias\"},\"aliasFields\":{\"description\":\"Fields in the description file (usually package.json) which are used to redirect requests inside the module.\",\"type\":\"array\",\"items\":{\"description\":\"Field in the description file (usually package.json) which are used to redirect requests inside the module.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the field path in the description file (usually package.json) which are used to redirect requests inside the module.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}},\"byDependency\":{\"description\":\"Extra resolve options per dependency category. Typical categories are \\\"commonjs\\\", \\\"amd\\\", \\\"esm\\\".\",\"type\":\"object\",\"additionalProperties\":{\"description\":\"Options object for resolving requests.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]}},\"cache\":{\"description\":\"Enable caching of successfully resolved requests (cache entries are revalidated).\",\"type\":\"boolean\"},\"cachePredicate\":{\"description\":\"Predicate function to decide which requests should be cached.\",\"instanceof\":\"Function\",\"tsType\":\"((request: import('enhanced-resolve').ResolveRequest) => boolean)\"},\"cacheWithContext\":{\"description\":\"Include the context information in the cache identifier when caching.\",\"type\":\"boolean\"},\"conditionNames\":{\"description\":\"Condition names for exports field entry point.\",\"type\":\"array\",\"items\":{\"description\":\"Condition names for exports field entry point.\",\"type\":\"string\"}},\"descriptionFiles\":{\"description\":\"Filenames used to find a description file (like a package.json).\",\"type\":\"array\",\"items\":{\"description\":\"Filename used to find a description file (like a package.json).\",\"type\":\"string\",\"minLength\":1}},\"enforceExtension\":{\"description\":\"Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).\",\"type\":\"boolean\"},\"exportsFields\":{\"description\":\"Field names from the description file (usually package.json) which are used to provide entry points of a package.\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (usually package.json) which is used to provide entry points of a package.\",\"type\":\"string\"}},\"extensions\":{\"description\":\"Extensions added to the request when trying to find the file.\",\"type\":\"array\",\"items\":{\"description\":\"Extension added to the request when trying to find the file.\",\"type\":\"string\"}},\"fallback\":{\"description\":\"Redirect module requests when normal resolving fails.\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveAlias\"}]},\"fileSystem\":{\"description\":\"Filesystem for the resolver.\",\"tsType\":\"(import('../lib/util/fs').InputFileSystem)\"},\"fullySpecified\":{\"description\":\"Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).\",\"type\":\"boolean\"},\"importsFields\":{\"description\":\"Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (usually package.json) which is used to provide internal request of a package (requests starting with # are considered as internal).\",\"type\":\"string\"}},\"mainFields\":{\"description\":\"Field names from the description file (package.json) which are used to find the default entry point.\",\"type\":\"array\",\"items\":{\"description\":\"Field name from the description file (package.json) which are used to find the default entry point.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Part of the field path from the description file (package.json) which are used to find the default entry point.\",\"type\":\"string\",\"minLength\":1}},{\"type\":\"string\",\"minLength\":1}]}},\"mainFiles\":{\"description\":\"Filenames used to find the default entry point if there is no description file or main field.\",\"type\":\"array\",\"items\":{\"description\":\"Filename used to find the default entry point if there is no description file or main field.\",\"type\":\"string\",\"minLength\":1}},\"modules\":{\"description\":\"Folder names or directory paths where to find modules.\",\"type\":\"array\",\"items\":{\"description\":\"Folder name or directory path where to find modules.\",\"type\":\"string\",\"minLength\":1}},\"plugins\":{\"description\":\"Plugins for the resolver.\",\"type\":\"array\",\"cli\":{\"exclude\":true},\"items\":{\"description\":\"Plugin of type object or instanceof Function.\",\"anyOf\":[{\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/ResolvePluginInstance\"}]}},\"preferAbsolute\":{\"description\":\"Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.\",\"type\":\"boolean\"},\"preferRelative\":{\"description\":\"Prefer to resolve module requests as relative request and fallback to resolving as module.\",\"type\":\"boolean\"},\"resolver\":{\"description\":\"Custom resolver.\",\"tsType\":\"(import('enhanced-resolve').Resolver)\"},\"restrictions\":{\"description\":\"A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.\",\"type\":\"array\",\"items\":{\"description\":\"Resolve restriction. Resolve result must fulfill this restriction.\",\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}]}},\"roots\":{\"description\":\"A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"array\",\"items\":{\"description\":\"Directory in which requests that are server-relative URLs (starting with '/') are resolved.\",\"type\":\"string\"}},\"symlinks\":{\"description\":\"Enable resolving symlinks to the original location.\",\"type\":\"boolean\"},\"unsafeCache\":{\"description\":\"Enable caching of successfully resolved requests (cache entries are not revalidated).\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":true}]},\"useSyncFileSystemCalls\":{\"description\":\"Use synchronous filesystem calls for the resolver.\",\"type\":\"boolean\"}}},\"ResolvePluginInstance\":{\"description\":\"Plugin instance.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(resolver: import('enhanced-resolve').Resolver) => void\"}},\"required\":[\"apply\"]},\"RuleSetCondition\":{\"description\":\"A condition matcher.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\"},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetLogicalConditions\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionAbsolute\":{\"description\":\"A condition matcher matching an absolute path.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":true},{\"instanceof\":\"Function\",\"tsType\":\"((value: string) => boolean)\"},{\"$ref\":\"#/definitions/RuleSetLogicalConditionsAbsolute\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditionOrConditions\":{\"description\":\"One or multiple rule conditions.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"},{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"RuleSetConditionOrConditionsAbsolute\":{\"description\":\"One or multiple rule conditions matching an absolute path.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"},{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"RuleSetConditions\":{\"description\":\"A list of rule conditions.\",\"type\":\"array\",\"items\":{\"description\":\"A rule condition.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"}]}},\"RuleSetConditionsAbsolute\":{\"description\":\"A list of rule conditions matching an absolute path.\",\"type\":\"array\",\"items\":{\"description\":\"A rule condition matching an absolute path.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"}]}},\"RuleSetLoader\":{\"description\":\"A loader request.\",\"type\":\"string\",\"minLength\":1},\"RuleSetLoaderOptions\":{\"description\":\"Options passed to a loader.\",\"anyOf\":[{\"type\":\"string\"},{\"type\":\"object\"}]},\"RuleSetLogicalConditions\":{\"description\":\"Logic operators used in a condition matcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]},\"not\":{\"description\":\"Logical NOT.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetCondition\"}]},\"or\":{\"description\":\"Logical OR.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditions\"}]}}},\"RuleSetLogicalConditionsAbsolute\":{\"description\":\"Logic operators used in a condition matcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"and\":{\"description\":\"Logical AND.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]},\"not\":{\"description\":\"Logical NOT.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionAbsolute\"}]},\"or\":{\"description\":\"Logical OR.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionsAbsolute\"}]}}},\"RuleSetRule\":{\"description\":\"A rule description with conditions and effects for modules.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"compiler\":{\"description\":\"Match the child compiler name.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"dependency\":{\"description\":\"Match dependency type.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"descriptionData\":{\"description\":\"Match values of properties in the description file (usually package.json).\",\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}},\"enforce\":{\"description\":\"Enforce this rule as pre or post step.\",\"enum\":[\"pre\",\"post\"]},\"exclude\":{\"description\":\"Shortcut for resource.exclude.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"generator\":{\"description\":\"The options for the module generator.\",\"type\":\"object\"},\"include\":{\"description\":\"Shortcut for resource.include.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuer\":{\"description\":\"Match the issuer of the module (The module pointing to this module).\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"issuerLayer\":{\"description\":\"Match layer of the issuer of this module (The module pointing to this module).\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"layer\":{\"description\":\"Specifies the layer in which the module should be placed in.\",\"type\":\"string\"},\"loader\":{\"description\":\"Shortcut for use.loader.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"mimetype\":{\"description\":\"Match module mimetype when load from Data URI.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"oneOf\":{\"description\":\"Only execute the first matching rule in this array.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"options\":{\"description\":\"Shortcut for use.options.\",\"cli\":{\"exclude\":true},\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoaderOptions\"}]},\"parser\":{\"description\":\"Options for parsing.\",\"type\":\"object\",\"additionalProperties\":true},\"realResource\":{\"description\":\"Match the real resource path of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resolve\":{\"description\":\"Options for the resolver.\",\"type\":\"object\",\"oneOf\":[{\"$ref\":\"#/definitions/ResolveOptions\"}]},\"resource\":{\"description\":\"Match the resource path of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"resourceFragment\":{\"description\":\"Match the resource fragment of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"resourceQuery\":{\"description\":\"Match the resource query of the module.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"rules\":{\"description\":\"Match and execute these rules when this rule is matched.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"scheme\":{\"description\":\"Match module scheme.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditions\"}]},\"sideEffects\":{\"description\":\"Flags a module as with or without side effects.\",\"type\":\"boolean\"},\"test\":{\"description\":\"Shortcut for resource.test.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetConditionOrConditionsAbsolute\"}]},\"type\":{\"description\":\"Module type to use for the module.\",\"type\":\"string\"},\"use\":{\"description\":\"Modifiers applied to the module when rule is matched.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetUse\"}]}}},\"RuleSetRules\":{\"description\":\"A list of rules.\",\"type\":\"array\",\"items\":{\"description\":\"A rule.\",\"anyOf\":[{\"cli\":{\"exclude\":true},\"enum\":[\"...\"]},{\"$ref\":\"#/definitions/RuleSetRule\"}]}},\"RuleSetUse\":{\"description\":\"A list of descriptions of loaders applied.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"An use item.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetUseItem\"}]}},{\"instanceof\":\"Function\",\"tsType\":\"((data: { resource: string, realResource: string, resourceQuery: string, issuer: string, compiler: string }) => RuleSetUseItem[])\"},{\"$ref\":\"#/definitions/RuleSetUseItem\"}]},\"RuleSetUseItem\":{\"description\":\"A description of an applied loader.\",\"anyOf\":[{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"ident\":{\"description\":\"Unique loader options identifier.\",\"type\":\"string\"},\"loader\":{\"description\":\"Loader name.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"options\":{\"description\":\"Loader options.\",\"oneOf\":[{\"$ref\":\"#/definitions/RuleSetLoaderOptions\"}]}}},{\"instanceof\":\"Function\",\"tsType\":\"((data: object) => RuleSetUseItem|RuleSetUseItem[])\"},{\"$ref\":\"#/definitions/RuleSetLoader\"}]},\"ScriptType\":{\"description\":\"This option enables loading async chunks via a custom script type, such as script type=\\\"module\\\".\",\"enum\":[false,\"text/javascript\",\"module\"]},\"SnapshotOptions\":{\"description\":\"Options affecting how file system snapshots are created and validated.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"buildDependencies\":{\"description\":\"Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"immutablePaths\":{\"description\":\"List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.\",\"type\":\"array\",\"items\":{\"description\":\"A path to a immutable directory (usually a package manager cache directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}},\"managedPaths\":{\"description\":\"List of paths that are managed by a package manager and can be trusted to not be modified otherwise.\",\"type\":\"array\",\"items\":{\"description\":\"A path to a managed directory (usually a node_modules directory).\",\"type\":\"string\",\"absolutePath\":true,\"minLength\":1}},\"module\":{\"description\":\"Options for snapshotting dependencies of modules to determine if they need to be built again.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"resolve\":{\"description\":\"Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}},\"resolveBuildDependencies\":{\"description\":\"Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"hash\":{\"description\":\"Use hashes of the content of the files/directories to determine invalidation.\",\"type\":\"boolean\"},\"timestamp\":{\"description\":\"Use timestamps of the files/directories to determine invalidation.\",\"type\":\"boolean\"}}}}},\"SourceMapFilename\":{\"description\":\"The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"SourcePrefix\":{\"description\":\"Prefixes every line of the source in the bundle with this string.\",\"type\":\"string\"},\"StatsOptions\":{\"description\":\"Stats options object.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"all\":{\"description\":\"Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).\",\"type\":\"boolean\"},\"assets\":{\"description\":\"Add assets information.\",\"type\":\"boolean\"},\"assetsSort\":{\"description\":\"Sort the assets by that field.\",\"type\":\"string\"},\"assetsSpace\":{\"description\":\"Space to display assets (groups will be collapsed to fit this space).\",\"type\":\"number\"},\"builtAt\":{\"description\":\"Add built at time information.\",\"type\":\"boolean\"},\"cached\":{\"description\":\"Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).\",\"type\":\"boolean\"},\"cachedAssets\":{\"description\":\"Show cached assets (setting this to `false` only shows emitted files).\",\"type\":\"boolean\"},\"cachedModules\":{\"description\":\"Add information about cached (not built) modules.\",\"type\":\"boolean\"},\"children\":{\"description\":\"Add children information.\",\"type\":\"boolean\"},\"chunkGroupAuxiliary\":{\"description\":\"Display auxiliary assets in chunk groups.\",\"type\":\"boolean\"},\"chunkGroupChildren\":{\"description\":\"Display children of chunk groups.\",\"type\":\"boolean\"},\"chunkGroupMaxAssets\":{\"description\":\"Limit of assets displayed in chunk groups.\",\"type\":\"number\"},\"chunkGroups\":{\"description\":\"Display all chunk groups with the corresponding bundles.\",\"type\":\"boolean\"},\"chunkModules\":{\"description\":\"Add built modules information to chunk information.\",\"type\":\"boolean\"},\"chunkModulesSpace\":{\"description\":\"Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).\",\"type\":\"number\"},\"chunkOrigins\":{\"description\":\"Add the origins of chunks and chunk merging info.\",\"type\":\"boolean\"},\"chunkRelations\":{\"description\":\"Add information about parent, children and sibling chunks to chunk information.\",\"type\":\"boolean\"},\"chunks\":{\"description\":\"Add chunk information.\",\"type\":\"boolean\"},\"chunksSort\":{\"description\":\"Sort the chunks by that field.\",\"type\":\"string\"},\"colors\":{\"description\":\"Enables/Disables colorful output.\",\"anyOf\":[{\"description\":\"Enables/Disables colorful output.\",\"type\":\"boolean\"},{\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"bold\":{\"description\":\"Custom color for bold text.\",\"type\":\"string\"},\"cyan\":{\"description\":\"Custom color for cyan text.\",\"type\":\"string\"},\"green\":{\"description\":\"Custom color for green text.\",\"type\":\"string\"},\"magenta\":{\"description\":\"Custom color for magenta text.\",\"type\":\"string\"},\"red\":{\"description\":\"Custom color for red text.\",\"type\":\"string\"},\"yellow\":{\"description\":\"Custom color for yellow text.\",\"type\":\"string\"}}}]},\"context\":{\"description\":\"Context directory for request shortening.\",\"type\":\"string\",\"absolutePath\":true},\"dependentModules\":{\"description\":\"Show chunk modules that are dependencies of other modules of the chunk.\",\"type\":\"boolean\"},\"depth\":{\"description\":\"Add module depth in module graph.\",\"type\":\"boolean\"},\"entrypoints\":{\"description\":\"Display the entry points with the corresponding bundles.\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"type\":\"boolean\"}]},\"env\":{\"description\":\"Add --env information.\",\"type\":\"boolean\"},\"errorDetails\":{\"description\":\"Add details to errors (like resolving log).\",\"anyOf\":[{\"enum\":[\"auto\"]},{\"type\":\"boolean\"}]},\"errorStack\":{\"description\":\"Add internal stack trace to errors.\",\"type\":\"boolean\"},\"errors\":{\"description\":\"Add errors.\",\"type\":\"boolean\"},\"errorsCount\":{\"description\":\"Add errors count.\",\"type\":\"boolean\"},\"exclude\":{\"description\":\"Please use excludeModules instead.\",\"cli\":{\"exclude\":true},\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/ModuleFilterTypes\"}]},\"excludeAssets\":{\"description\":\"Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.\",\"oneOf\":[{\"$ref\":\"#/definitions/AssetFilterTypes\"}]},\"excludeModules\":{\"description\":\"Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.\",\"anyOf\":[{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/ModuleFilterTypes\"}]},\"groupAssetsByChunk\":{\"description\":\"Group assets by how their are related to chunks.\",\"type\":\"boolean\"},\"groupAssetsByEmitStatus\":{\"description\":\"Group assets by their status (emitted, compared for emit or cached).\",\"type\":\"boolean\"},\"groupAssetsByExtension\":{\"description\":\"Group assets by their extension.\",\"type\":\"boolean\"},\"groupAssetsByInfo\":{\"description\":\"Group assets by their asset info (immutable, development, hotModuleReplacement, etc).\",\"type\":\"boolean\"},\"groupAssetsByPath\":{\"description\":\"Group assets by their path.\",\"type\":\"boolean\"},\"groupModulesByAttributes\":{\"description\":\"Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).\",\"type\":\"boolean\"},\"groupModulesByCacheStatus\":{\"description\":\"Group modules by their status (cached or built and cacheable).\",\"type\":\"boolean\"},\"groupModulesByExtension\":{\"description\":\"Group modules by their extension.\",\"type\":\"boolean\"},\"groupModulesByLayer\":{\"description\":\"Group modules by their layer.\",\"type\":\"boolean\"},\"groupModulesByPath\":{\"description\":\"Group modules by their path.\",\"type\":\"boolean\"},\"groupModulesByType\":{\"description\":\"Group modules by their type.\",\"type\":\"boolean\"},\"hash\":{\"description\":\"Add the hash of the compilation.\",\"type\":\"boolean\"},\"ids\":{\"description\":\"Add ids.\",\"type\":\"boolean\"},\"logging\":{\"description\":\"Add logging output.\",\"anyOf\":[{\"description\":\"Specify log level of logging output.\",\"enum\":[\"none\",\"error\",\"warn\",\"info\",\"log\",\"verbose\"]},{\"description\":\"Enable/disable logging output (`true`: shows normal logging output, loglevel: log).\",\"type\":\"boolean\"}]},\"loggingDebug\":{\"description\":\"Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.\",\"anyOf\":[{\"description\":\"Enable/Disable debug logging for all loggers.\",\"type\":\"boolean\"},{\"$ref\":\"#/definitions/FilterTypes\"}]},\"loggingTrace\":{\"description\":\"Add stack traces to logging output.\",\"type\":\"boolean\"},\"moduleAssets\":{\"description\":\"Add information about assets inside modules.\",\"type\":\"boolean\"},\"moduleTrace\":{\"description\":\"Add dependencies and origin of warnings/errors.\",\"type\":\"boolean\"},\"modules\":{\"description\":\"Add built modules information.\",\"type\":\"boolean\"},\"modulesSort\":{\"description\":\"Sort the modules by that field.\",\"type\":\"string\"},\"modulesSpace\":{\"description\":\"Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).\",\"type\":\"number\"},\"nestedModules\":{\"description\":\"Add information about modules nested in other modules (like with module concatenation).\",\"type\":\"boolean\"},\"nestedModulesSpace\":{\"description\":\"Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).\",\"type\":\"number\"},\"optimizationBailout\":{\"description\":\"Show reasons why optimization bailed out for modules.\",\"type\":\"boolean\"},\"orphanModules\":{\"description\":\"Add information about orphan modules.\",\"type\":\"boolean\"},\"outputPath\":{\"description\":\"Add output path information.\",\"type\":\"boolean\"},\"performance\":{\"description\":\"Add performance hint flags.\",\"type\":\"boolean\"},\"preset\":{\"description\":\"Preset for the default values.\",\"anyOf\":[{\"type\":\"boolean\"},{\"type\":\"string\"}]},\"providedExports\":{\"description\":\"Show exports provided by modules.\",\"type\":\"boolean\"},\"publicPath\":{\"description\":\"Add public path information.\",\"type\":\"boolean\"},\"reasons\":{\"description\":\"Add information about the reasons why modules are included.\",\"type\":\"boolean\"},\"relatedAssets\":{\"description\":\"Add information about assets that are related to other assets (like SourceMaps for assets).\",\"type\":\"boolean\"},\"runtime\":{\"description\":\"Add information about runtime modules (deprecated: use 'runtimeModules' instead).\",\"type\":\"boolean\"},\"runtimeModules\":{\"description\":\"Add information about runtime modules.\",\"type\":\"boolean\"},\"source\":{\"description\":\"Add the source code of modules.\",\"type\":\"boolean\"},\"timings\":{\"description\":\"Add timing information.\",\"type\":\"boolean\"},\"usedExports\":{\"description\":\"Show exports used by modules.\",\"type\":\"boolean\"},\"version\":{\"description\":\"Add webpack version information.\",\"type\":\"boolean\"},\"warnings\":{\"description\":\"Add warnings.\",\"type\":\"boolean\"},\"warningsCount\":{\"description\":\"Add warnings count.\",\"type\":\"boolean\"},\"warningsFilter\":{\"description\":\"Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.\",\"oneOf\":[{\"$ref\":\"#/definitions/WarningFilterTypes\"}]}}},\"StatsValue\":{\"description\":\"Stats options object or preset name.\",\"anyOf\":[{\"enum\":[\"none\",\"summary\",\"errors-only\",\"errors-warnings\",\"minimal\",\"normal\",\"detailed\",\"verbose\"]},{\"type\":\"boolean\"},{\"$ref\":\"#/definitions/StatsOptions\"}]},\"StrictModuleErrorHandling\":{\"description\":\"Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.\",\"type\":\"boolean\"},\"StrictModuleExceptionHandling\":{\"description\":\"Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.\",\"type\":\"boolean\"},\"Target\":{\"description\":\"Environment to build for. An array of environments to build for all of them when possible.\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Environment to build for.\",\"type\":\"string\",\"minLength\":1},\"minItems\":1},{\"enum\":[false]},{\"type\":\"string\",\"minLength\":1}]},\"TrustedTypes\":{\"description\":\"Use a Trusted Types policy to create urls for chunks.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"policyName\":{\"description\":\"The name of the Trusted Types policy created by webpack to serve bundle chunks.\",\"type\":\"string\",\"minLength\":1}}},\"UmdNamedDefine\":{\"description\":\"If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\",\"type\":\"boolean\"},\"UniqueName\":{\"description\":\"A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.\",\"type\":\"string\",\"minLength\":1},\"WarningFilterItemTypes\":{\"description\":\"Filtering value, regexp or function.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"type\":\"string\",\"absolutePath\":false},{\"instanceof\":\"Function\",\"tsType\":\"((warning: import('../lib/stats/DefaultStatsFactoryPlugin').StatsError, value: string) => boolean)\"}]},\"WarningFilterTypes\":{\"description\":\"Filtering warnings.\",\"cli\":{\"helper\":true},\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"Rule to filter.\",\"cli\":{\"helper\":true},\"oneOf\":[{\"$ref\":\"#/definitions/WarningFilterItemTypes\"}]}},{\"$ref\":\"#/definitions/WarningFilterItemTypes\"}]},\"WasmLoading\":{\"description\":\"The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[false]},{\"$ref\":\"#/definitions/WasmLoadingType\"}]},\"WasmLoadingType\":{\"description\":\"The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).\",\"anyOf\":[{\"enum\":[\"fetch-streaming\",\"fetch\",\"async-node\"]},{\"type\":\"string\"}]},\"Watch\":{\"description\":\"Enter watch mode, which rebuilds on file change.\",\"type\":\"boolean\"},\"WatchOptions\":{\"description\":\"Options for the watcher.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"aggregateTimeout\":{\"description\":\"Delay the rebuilt after the first change. Value is a time in ms.\",\"type\":\"number\"},\"followSymlinks\":{\"description\":\"Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').\",\"type\":\"boolean\"},\"ignored\":{\"description\":\"Ignore some files from watching (glob pattern or regexp).\",\"anyOf\":[{\"type\":\"array\",\"items\":{\"description\":\"A glob pattern for files that should be ignored from watching.\",\"type\":\"string\",\"minLength\":1}},{\"instanceof\":\"RegExp\",\"tsType\":\"RegExp\"},{\"description\":\"A single glob pattern for files that should be ignored from watching.\",\"type\":\"string\",\"minLength\":1}]},\"poll\":{\"description\":\"Enable polling mode for watching.\",\"anyOf\":[{\"description\":\"`number`: use polling with specified interval.\",\"type\":\"number\"},{\"description\":\"`true`: use polling.\",\"type\":\"boolean\"}]},\"stdin\":{\"description\":\"Stop watching when stdin stream has ended.\",\"type\":\"boolean\"}}},\"WebassemblyModuleFilename\":{\"description\":\"The filename of WebAssembly modules as relative path inside the 'output.path' directory.\",\"type\":\"string\",\"absolutePath\":false},\"WebpackOptionsNormalized\":{\"description\":\"Normalized webpack options object.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"bail\":{\"$ref\":\"#/definitions/Bail\"},\"cache\":{\"$ref\":\"#/definitions/CacheOptionsNormalized\"},\"context\":{\"$ref\":\"#/definitions/Context\"},\"dependencies\":{\"$ref\":\"#/definitions/Dependencies\"},\"devServer\":{\"$ref\":\"#/definitions/DevServer\"},\"devtool\":{\"$ref\":\"#/definitions/DevTool\"},\"entry\":{\"$ref\":\"#/definitions/EntryNormalized\"},\"experiments\":{\"$ref\":\"#/definitions/Experiments\"},\"externals\":{\"$ref\":\"#/definitions/Externals\"},\"externalsPresets\":{\"$ref\":\"#/definitions/ExternalsPresets\"},\"externalsType\":{\"$ref\":\"#/definitions/ExternalsType\"},\"ignoreWarnings\":{\"$ref\":\"#/definitions/IgnoreWarningsNormalized\"},\"infrastructureLogging\":{\"$ref\":\"#/definitions/InfrastructureLogging\"},\"loader\":{\"$ref\":\"#/definitions/Loader\"},\"mode\":{\"$ref\":\"#/definitions/Mode\"},\"module\":{\"$ref\":\"#/definitions/ModuleOptionsNormalized\"},\"name\":{\"$ref\":\"#/definitions/Name\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"optimization\":{\"$ref\":\"#/definitions/Optimization\"},\"output\":{\"$ref\":\"#/definitions/OutputNormalized\"},\"parallelism\":{\"$ref\":\"#/definitions/Parallelism\"},\"performance\":{\"$ref\":\"#/definitions/Performance\"},\"plugins\":{\"$ref\":\"#/definitions/Plugins\"},\"profile\":{\"$ref\":\"#/definitions/Profile\"},\"recordsInputPath\":{\"$ref\":\"#/definitions/RecordsInputPath\"},\"recordsOutputPath\":{\"$ref\":\"#/definitions/RecordsOutputPath\"},\"resolve\":{\"$ref\":\"#/definitions/Resolve\"},\"resolveLoader\":{\"$ref\":\"#/definitions/ResolveLoader\"},\"snapshot\":{\"$ref\":\"#/definitions/SnapshotOptions\"},\"stats\":{\"$ref\":\"#/definitions/StatsValue\"},\"target\":{\"$ref\":\"#/definitions/Target\"},\"watch\":{\"$ref\":\"#/definitions/Watch\"},\"watchOptions\":{\"$ref\":\"#/definitions/WatchOptions\"}},\"required\":[\"cache\",\"snapshot\",\"entry\",\"experiments\",\"externals\",\"externalsPresets\",\"infrastructureLogging\",\"module\",\"node\",\"optimization\",\"output\",\"plugins\",\"resolve\",\"resolveLoader\",\"stats\",\"watchOptions\"]},\"WebpackPluginFunction\":{\"description\":\"Function acting as plugin.\",\"instanceof\":\"Function\",\"tsType\":\"(this: import('../lib/Compiler'), compiler: import('../lib/Compiler')) => void\"},\"WebpackPluginInstance\":{\"description\":\"Plugin instance.\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"apply\":{\"description\":\"The run point of the plugin, required method.\",\"instanceof\":\"Function\",\"tsType\":\"(compiler: import('../lib/Compiler')) => void\"}},\"required\":[\"apply\"]}},\"title\":\"WebpackOptions\",\"description\":\"Options object as provided by the user.\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"amd\":{\"$ref\":\"#/definitions/Amd\"},\"bail\":{\"$ref\":\"#/definitions/Bail\"},\"cache\":{\"$ref\":\"#/definitions/CacheOptions\"},\"context\":{\"$ref\":\"#/definitions/Context\"},\"dependencies\":{\"$ref\":\"#/definitions/Dependencies\"},\"devServer\":{\"$ref\":\"#/definitions/DevServer\"},\"devtool\":{\"$ref\":\"#/definitions/DevTool\"},\"entry\":{\"$ref\":\"#/definitions/Entry\"},\"experiments\":{\"$ref\":\"#/definitions/Experiments\"},\"externals\":{\"$ref\":\"#/definitions/Externals\"},\"externalsPresets\":{\"$ref\":\"#/definitions/ExternalsPresets\"},\"externalsType\":{\"$ref\":\"#/definitions/ExternalsType\"},\"ignoreWarnings\":{\"$ref\":\"#/definitions/IgnoreWarnings\"},\"infrastructureLogging\":{\"$ref\":\"#/definitions/InfrastructureLogging\"},\"loader\":{\"$ref\":\"#/definitions/Loader\"},\"mode\":{\"$ref\":\"#/definitions/Mode\"},\"module\":{\"$ref\":\"#/definitions/ModuleOptions\"},\"name\":{\"$ref\":\"#/definitions/Name\"},\"node\":{\"$ref\":\"#/definitions/Node\"},\"optimization\":{\"$ref\":\"#/definitions/Optimization\"},\"output\":{\"$ref\":\"#/definitions/Output\"},\"parallelism\":{\"$ref\":\"#/definitions/Parallelism\"},\"performance\":{\"$ref\":\"#/definitions/Performance\"},\"plugins\":{\"$ref\":\"#/definitions/Plugins\"},\"profile\":{\"$ref\":\"#/definitions/Profile\"},\"recordsInputPath\":{\"$ref\":\"#/definitions/RecordsInputPath\"},\"recordsOutputPath\":{\"$ref\":\"#/definitions/RecordsOutputPath\"},\"recordsPath\":{\"$ref\":\"#/definitions/RecordsPath\"},\"resolve\":{\"$ref\":\"#/definitions/Resolve\"},\"resolveLoader\":{\"$ref\":\"#/definitions/ResolveLoader\"},\"snapshot\":{\"$ref\":\"#/definitions/SnapshotOptions\"},\"stats\":{\"$ref\":\"#/definitions/StatsValue\"},\"target\":{\"$ref\":\"#/definitions/Target\"},\"watch\":{\"$ref\":\"#/definitions/Watch\"},\"watchOptions\":{\"$ref\":\"#/definitions/WatchOptions\"}}}"); /***/ }), @@ -35434,24 +35434,38 @@ class Watchpack extends EventEmitter { return map; } + getAggregated() { + if (this.aggregateTimer) { + clearTimeout(this.aggregateTimer); + this.aggregateTimer = undefined; + } + const changes = this.aggregatedChanges; + const removals = this.aggregatedRemovals; + this.aggregatedChanges = new Set(); + this.aggregatedRemovals = new Set(); + return { changes, removals }; + } + _onChange(item, mtime, file, type) { file = file || item; - if (this.paused) return; - this.emit("change", file, mtime, type); - if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + if (!this.paused) { + this.emit("change", file, mtime, type); + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); + } this.aggregatedRemovals.delete(item); this.aggregatedChanges.add(item); - this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); } _onRemove(item, file, type) { file = file || item; - if (this.paused) return; - this.emit("remove", file, type); - if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + if (!this.paused) { + this.emit("remove", file, type); + if (this.aggregateTimer) clearTimeout(this.aggregateTimer); + this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); + } this.aggregatedChanges.delete(item); this.aggregatedRemovals.add(item); - this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout); } _onTimeout() { @@ -36366,9 +36380,9 @@ class MultiItemCache { * @returns {Promise} promise signals when the value is stored */ storePromise(data) { - return Promise.all( - this._items.map(item => item.storePromise(data)) - ).then(() => {}); + return Promise.all(this._items.map(item => item.storePromise(data))).then( + () => {} + ); } } @@ -37257,9 +37271,8 @@ class Chunk { xor.add(chunkGraph.getModuleHash(m, this.runtime)); } xor.updateHash(hash); - const entryModules = chunkGraph.getChunkEntryModulesWithChunkGroupIterable( - this - ); + const entryModules = + chunkGraph.getChunkEntryModulesWithChunkGroupIterable(this); for (const [m, chunkGroup] of entryModules) { hash.update("entry"); hash.update(`${chunkGraph.getModuleId(m)}`); @@ -41251,7 +41264,8 @@ class Compilation { * @returns {FakeHook, "tap" | "tapAsync" | "tapPromise" | "name">>} fake hook which redirects */ const createProcessAssetsHook = (name, stage, getArgs, code) => { - const errorMessage = reason => `Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}. + const errorMessage = + reason => `Can't automatically convert plugin using Compilation.hooks.${name} to Compilation.hooks.processAssets because ${reason}. BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a single Compilation.hooks.processAssets hook.`; const getOptions = options => { if (typeof options === "string") options = { name: options }; @@ -42356,9 +42370,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si let creatingModuleDuringBuildSet = undefined; if (!recursive && this.buildQueue.isProcessing(originModule)) { // Track build dependency - creatingModuleDuringBuildSet = this.creatingModuleDuringBuild.get( - originModule - ); + creatingModuleDuringBuildSet = + this.creatingModuleDuringBuild.get(originModule); if (creatingModuleDuringBuildSet === undefined) { creatingModuleDuringBuildSet = new Set(); this.creatingModuleDuringBuild.set( @@ -42487,11 +42500,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si module: result }; } - const { - fileDependencies, - contextDependencies, - missingDependencies - } = result; + const { fileDependencies, contextDependencies, missingDependencies } = + result; if (fileDependencies) { this.fileDependencies.addAll(fileDependencies); } @@ -43057,7 +43067,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si } ] of this.entries) { if (dependOn && runtime) { - const err = new WebpackError(`Entrypoint '${name}' has 'dependOn' and 'runtime' specified. This is not valid. + const err = + new WebpackError(`Entrypoint '${name}' has 'dependOn' and 'runtime' specified. This is not valid. Entrypoints that depend on other entrypoints do not have their own runtime. They will use the runtime(s) from referenced entrypoints instead. Remove the 'runtime' option from the entrypoint.`); @@ -43098,11 +43109,12 @@ Remove the 'runtime' option from the entrypoint.`); let chunk = this.namedChunks.get(runtime); if (chunk) { if (!runtimeChunks.has(chunk)) { - const err = new WebpackError(`Entrypoint '${name}' has a 'runtime' option which points to another entrypoint named '${runtime}'. + const err = + new WebpackError(`Entrypoint '${name}' has a 'runtime' option which points to another entrypoint named '${runtime}'. It's not valid to use other entrypoints as runtime chunk. Did you mean to use 'dependOn: ${JSON.stringify( - runtime - )}' instead to allow using entrypoint '${name}' within the runtime of entrypoint '${runtime}'? For this '${runtime}' must always be loaded when '${name}' is used. + runtime + )}' instead to allow using entrypoint '${name}' within the runtime of entrypoint '${runtime}'? For this '${runtime}' must always be loaded when '${name}' is used. Or do you want to use the entrypoints '${name}' and '${runtime}' independently on the same page with a shared runtime? In this case give them both the same value for the 'runtime' option. It must be a name not already used by an entrypoint.`); const entryChunk = entry.getEntrypointChunk(); err.chunk = entryChunk; @@ -43362,12 +43374,8 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o _runCodeGenerationJobs(jobs, callback) { let statModulesFromCache = 0; let statModulesGenerated = 0; - const { - chunkGraph, - moduleGraph, - dependencyTemplates, - runtimeTemplate - } = this; + const { chunkGraph, moduleGraph, dependencyTemplates, runtimeTemplate } = + this; const results = this.codeGenerationResults; const errors = []; asyncLib.eachLimit( @@ -43514,17 +43522,15 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o chunkGraphEntries = this._getChunkGraphEntries() } = {}) { const context = { chunkGraph, codeGenerationResults }; - const additionalModuleRuntimeRequirements = this.hooks - .additionalModuleRuntimeRequirements; + const additionalModuleRuntimeRequirements = + this.hooks.additionalModuleRuntimeRequirements; const runtimeRequirementInModule = this.hooks.runtimeRequirementInModule; for (const module of modules) { if (chunkGraph.getNumberOfModuleChunks(module) > 0) { for (const runtime of chunkGraph.getModuleRuntimes(module)) { let set; - const runtimeRequirements = codeGenerationResults.getRuntimeRequirements( - module, - runtime - ); + const runtimeRequirements = + codeGenerationResults.getRuntimeRequirements(module, runtime); if (runtimeRequirements && runtimeRequirements.size > 0) { set = new Set(runtimeRequirements); } else if (additionalModuleRuntimeRequirements.isUsed()) { @@ -43564,9 +43570,8 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o for (const treeEntry of chunkGraphEntries) { const set = new Set(); for (const chunk of treeEntry.getAllReferencedChunks()) { - const runtimeRequirements = chunkGraph.getChunkRuntimeRequirements( - chunk - ); + const runtimeRequirements = + chunkGraph.getChunkRuntimeRequirements(chunk); for (const r of runtimeRequirements) set.add(r); } @@ -43964,9 +43969,9 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o runtime, runtimeTemplate }); - const moduleHashDigest = /** @type {string} */ (moduleHash.digest( - hashDigest - )); + const moduleHashDigest = /** @type {string} */ ( + moduleHash.digest(hashDigest) + ); chunkGraph.setModuleHashes( module, runtime, @@ -44095,10 +44100,11 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o } } circularRuntimeChunkInfo.sort(compareSelect(i => i.chunk, byId)); - const err = new WebpackError(`Circular dependency between chunks with runtime (${Array.from( - circularRuntimeChunkInfo, - c => c.chunk.name || c.chunk.id - ).join(", ")}) + const err = + new WebpackError(`Circular dependency between chunks with runtime (${Array.from( + circularRuntimeChunkInfo, + c => c.chunk.name || c.chunk.id + ).join(", ")}) This prevents using hashes of each other and should be avoided.`); err.chunk = circularRuntimeChunkInfo[0].chunk; this.warnings.push(err); @@ -44161,15 +44167,14 @@ This prevents using hashes of each other and should be avoided.`); moduleGraph: this.moduleGraph, runtimeTemplate: this.runtimeTemplate }); - const chunkHashDigest = /** @type {string} */ (chunkHash.digest( - hashDigest - )); + const chunkHashDigest = /** @type {string} */ ( + chunkHash.digest(hashDigest) + ); hash.update(chunkHashDigest); chunk.hash = chunkHashDigest; chunk.renderedHash = chunk.hash.substr(0, hashDigestLength); - const fullHashModules = chunkGraph.getChunkFullHashModulesIterable( - chunk - ); + const fullHashModules = + chunkGraph.getChunkFullHashModulesIterable(chunk); if (fullHashModules) { fullHashChunks.add(chunk); } else { @@ -44200,9 +44205,9 @@ This prevents using hashes of each other and should be avoided.`); runtime: chunk.runtime, runtimeTemplate }); - const moduleHashDigest = /** @type {string} */ (moduleHash.digest( - hashDigest - )); + const moduleHashDigest = /** @type {string} */ ( + moduleHash.digest(hashDigest) + ); const oldHash = chunkGraph.getModuleHash(module, chunk.runtime); chunkGraph.setModuleHashes( module, @@ -44215,9 +44220,9 @@ This prevents using hashes of each other and should be avoided.`); const chunkHash = createHash(hashFunction); chunkHash.update(chunk.hash); chunkHash.update(this.hash); - const chunkHashDigest = /** @type {string} */ (chunkHash.digest( - hashDigest - )); + const chunkHashDigest = /** @type {string} */ ( + chunkHash.digest(hashDigest) + ); chunk.hash = chunkHashDigest; chunk.renderedHash = chunk.hash.substr(0, hashDigestLength); this.hooks.contentHash.call(chunk); @@ -44792,11 +44797,8 @@ This prevents using hashes of each other and should be avoided.`); // Create new chunk graph, chunk and entrypoint for the build time execution const chunkGraph = new ChunkGraph(this.moduleGraph); const runtime = "build time"; - const { - hashFunction, - hashDigest, - hashDigestLength - } = this.outputOptions; + const { hashFunction, hashDigest, hashDigestLength } = + this.outputOptions; const runtimeTemplate = this.runtimeTemplate; const chunk = new Chunk("build time chunk"); @@ -44892,9 +44894,8 @@ This prevents using hashes of each other and should be avoided.`); }); this.chunkGraph = old; - const runtimeModules = chunkGraph.getChunkRuntimeModulesIterable( - chunk - ); + const runtimeModules = + chunkGraph.getChunkRuntimeModulesIterable(chunk); // Hash runtime modules for (const module of runtimeModules) { @@ -44993,7 +44994,7 @@ This prevents using hashes of each other and should be avoided.`); strictModuleErrorHandling, strictModuleExceptionHandling } = this.outputOptions; - const __nested_webpack_require_129249__ = id => { + const __nested_webpack_require_129191__ = id => { const cached = moduleCache[id]; if (cached !== undefined) { if (cached.error) throw cached.error; @@ -45002,20 +45003,20 @@ This prevents using hashes of each other and should be avoided.`); const moduleArgument = moduleArgumentsById.get(id); return __webpack_require_module__(moduleArgument, id); }; - const interceptModuleExecution = (__nested_webpack_require_129249__[ + const interceptModuleExecution = (__nested_webpack_require_129191__[ RuntimeGlobals.interceptModuleExecution.replace( "__webpack_require__.", "" ) ] = []); - const moduleCache = (__nested_webpack_require_129249__[ + const moduleCache = (__nested_webpack_require_129191__[ RuntimeGlobals.moduleCache.replace( "__webpack_require__.", "" ) ] = {}); - context.__webpack_require__ = __nested_webpack_require_129249__; + context.__webpack_require__ = __nested_webpack_require_129191__; /** * @param {ExecuteModuleArgument} moduleArgument the module argument @@ -45031,7 +45032,7 @@ This prevents using hashes of each other and should be avoided.`); loaded: false, error: undefined }, - require: __nested_webpack_require_129249__ + require: __nested_webpack_require_129191__ }; interceptModuleExecution.forEach(handler => handler(execOptions) @@ -45071,7 +45072,7 @@ This prevents using hashes of each other and should be avoided.`); moduleArgumentsMap.get(runtimeModule) ); } - exports = __nested_webpack_require_129249__(module.identifier()); + exports = __nested_webpack_require_129191__(module.identifier()); } catch (e) { const err = new WebpackError( `Execution of module code from module graph (${module.readableIdentifier( @@ -45500,6 +45501,8 @@ class Compiler { this.fileTimestamps = undefined; /** @type {Map} */ this.contextTimestamps = undefined; + /** @type {number} */ + this.fsStartTime = undefined; /** @type {ResolverFactory} */ this.resolverFactory = new ResolverFactory(); @@ -45860,9 +45863,8 @@ class Compiler { allTargetPaths.add(targetPath); // check if the target file has already been written by this Compiler - const targetFileGeneration = this._assetEmittingWrittenFiles.get( - targetPath - ); + const targetFileGeneration = + this._assetEmittingWrittenFiles.get(targetPath); // create an cache entry for this Source if not already existing let cacheEntry = this._assetEmittingSourceCache.get(source); @@ -45892,7 +45894,8 @@ class Compiler { } alreadyWritten(); } else { - const err = new WebpackError(`Prevent writing to file that only differs in casing or query string from already written file. + const err = + new WebpackError(`Prevent writing to file that only differs in casing or query string from already written file. This will lead to a race-condition and corrupted files on case-insensitive file systems. ${targetPath} ${other}`); @@ -46222,6 +46225,7 @@ ${other}`); childCompiler.removedFiles = this.removedFiles; childCompiler.fileTimestamps = this.fileTimestamps; childCompiler.contextTimestamps = this.contextTimestamps; + childCompiler.fsStartTime = this.fsStartTime; childCompiler.cache = this.cache; childCompiler.compilerPath = `${this.compilerPath}${compilerName}|${compilerIndex}|`; @@ -46414,7 +46418,8 @@ module.exports = Compiler; /** @typedef {import("./Module")} Module */ -const MODULE_REFERENCE_REGEXP = /^__WEBPACK_MODULE_REFERENCE__(\d+)_([\da-f]+|ns)(_call)?(_directImport)?(?:_asiSafe(\d))?__$/; +const MODULE_REFERENCE_REGEXP = + /^__WEBPACK_MODULE_REFERENCE__(\d+)_([\da-f]+|ns)(_call)?(_directImport)?(?:_asiSafe(\d))?__$/; const DEFAULT_EXPORT = "__WEBPACK_DEFAULT_EXPORT__"; const NAMESPACE_OBJECT_EXPORT = "__WEBPACK_NAMESPACE_OBJECT__"; @@ -48279,9 +48284,9 @@ module.exports = webpackEmptyAsyncContext;`; this.getSource(this.getSourceString(this.options.mode, context)) ); const set = new Set(); - const allDeps = /** @type {ContextElementDependency[]} */ (this.dependencies.concat( - this.blocks.map(b => b.dependencies[0]) - )); + const allDeps = /** @type {ContextElementDependency[]} */ ( + this.dependencies.concat(this.blocks.map(b => b.dependencies[0])) + ); set.add(RuntimeGlobals.module); set.add(RuntimeGlobals.hasOwnProperty); if (allDeps.length > 0) { @@ -48852,9 +48857,10 @@ class ContextReplacementPlugin { result.regExp = newContentRegExp; } if (typeof newContentCreateContextMap === "function") { - result.resolveDependencies = createResolveDependenciesFromContextMap( - newContentCreateContextMap - ); + result.resolveDependencies = + createResolveDependenciesFromContextMap( + newContentCreateContextMap + ); } if (typeof newContentCallback === "function") { const origResource = result.resource; @@ -49001,9 +49007,9 @@ class RuntimeValue { module: parser.state.module, key, get version() { - return /** @type {string} */ (valueCacheVersions.get( - VALUE_DEP_PREFIX + key - )); + return /** @type {string} */ ( + valueCacheVersions.get(VALUE_DEP_PREFIX + key) + ); } }); } @@ -49198,11 +49204,13 @@ class DefinePlugin { ); const { runtimeTemplate } = compilation; - const mainValue = /** @type {Set} */ (provide( - compilation.valueCacheVersions, - VALUE_DEP_MAIN, - () => new Set() - )); + const mainValue = /** @type {Set} */ ( + provide( + compilation.valueCacheVersions, + VALUE_DEP_MAIN, + () => new Set() + ) + ); /** * Handler @@ -49225,10 +49233,12 @@ class DefinePlugin { ); }; - const withValueDependency = (key, fn) => (...args) => { - addValueDependency(key); - return fn(...args); - }; + const withValueDependency = + (key, fn) => + (...args) => { + addValueDependency(key); + return fn(...args); + }; /** * Walk definitions @@ -51222,10 +51232,10 @@ class EntryPlugin { } ); - compiler.hooks.make.tapAsync("EntryPlugin", (compilation, callback) => { - const { entry, options, context } = this; + const { entry, options, context } = this; + const dep = EntryPlugin.createDependency(entry, options); - const dep = EntryPlugin.createDependency(entry, options); + compiler.hooks.make.tapAsync("EntryPlugin", (compilation, callback) => { compilation.addEntry(context, dep, options, err => { callback(err); }); @@ -51705,7 +51715,9 @@ class EvalSourceMapDevToolPlugin { } else if (m instanceof ConcatenatedModule) { const concatModule = /** @type {ConcatenatedModule} */ (m); if (concatModule.rootModule instanceof NormalModule) { - const module = /** @type {NormalModule} */ (concatModule.rootModule); + const module = /** @type {NormalModule} */ ( + concatModule.rootModule + ); if (!matchModule(module.resource)) { return result(source); } @@ -51945,18 +51957,22 @@ class ExportsInfo { _sortExportsMap(exports) { if (exports.size > 1) { - const entriesInOrder = Array.from(exports.values()); - if ( - entriesInOrder.length !== 2 || - entriesInOrder[0].name > entriesInOrder[1].name - ) { - entriesInOrder.sort((a, b) => { - return a.name < b.name ? -1 : 1; - }); - exports.clear(); - for (const entry of entriesInOrder) { - exports.set(entry.name, entry); - } + const namesInOrder = []; + for (const entry of exports.values()) { + namesInOrder.push(entry.name); + } + namesInOrder.sort(); + let i = 0; + for (const entry of exports.values()) { + const name = namesInOrder[i]; + if (entry.name !== name) break; + i++; + } + for (; i < namesInOrder.length; i++) { + const name = namesInOrder[i]; + const correctEntry = exports.get(name); + exports.delete(name); + exports.set(name, correctEntry); } } } @@ -52530,7 +52546,7 @@ class ExportsInfo { const otherCanMangleProvide = this._otherExportsInfo.canMangleProvide; const otherTerminalBinding = this._otherExportsInfo.terminalBinding; const exports = []; - for (const exportInfo of this._exports.values()) { + for (const exportInfo of this.orderedExports) { if ( exportInfo.provided !== otherProvided || exportInfo.canMangleProvide !== otherCanMangleProvide || @@ -52562,7 +52578,9 @@ class ExportsInfo { otherTerminalBinding, exports }) { + let wasEmpty = true; for (const exportInfo of this._exports.values()) { + wasEmpty = false; exportInfo.provided = otherProvided; exportInfo.canMangleProvide = otherCanMangleProvide; exportInfo.terminalBinding = otherTerminalBinding; @@ -52580,6 +52598,7 @@ class ExportsInfo { exportsInfo.restoreProvided(exp.exportsInfo); } } + if (wasEmpty) this._exportsAreOrdered = true; } } @@ -55381,12 +55400,8 @@ class FileSystemInfo { * @returns {void} */ resolveBuildDependencies(context, deps, callback) { - const { - resolveContext, - resolveEsm, - resolveCjs, - resolveCjsAsChild - } = this._createBuildDependenciesResolvers(); + const { resolveContext, resolveEsm, resolveCjs, resolveCjsAsChild } = + this._createBuildDependenciesResolvers(); /** @type {Set} */ const files = new Set(); @@ -55768,9 +55783,8 @@ class FileSystemInfo { break; } case RBDT_DIRECTORY_DEPENDENCIES: { - const match = /(^.+[\\/]node_modules[\\/](?:@[^\\/]+[\\/])?[^\\/]+)/.exec( - path - ); + const match = + /(^.+[\\/]node_modules[\\/](?:@[^\\/]+[\\/])?[^\\/]+)/.exec(path); const packagePath = match ? match[1] : path; const packageJson = join(this.fs, packagePath, "package.json"); this.fs.readFile(packageJson, (err, content) => { @@ -55858,12 +55872,8 @@ class FileSystemInfo { * @returns {void} */ checkResolveResultsValid(resolveResults, callback) { - const { - resolveCjs, - resolveCjsAsChild, - resolveEsm, - resolveContext - } = this._createBuildDependenciesResolvers(); + const { resolveCjs, resolveCjsAsChild, resolveEsm, resolveContext } = + this._createBuildDependenciesResolvers(); asyncLib.eachLimit( resolveResults, 20, @@ -56065,11 +56075,12 @@ class FileSystemInfo { unsharedManagedFiles ); } - const unsharedManagedContexts = this._managedContextsOptimization.optimize( - managedContexts, - undefined, - children - ); + const unsharedManagedContexts = + this._managedContextsOptimization.optimize( + managedContexts, + undefined, + children + ); if (managedContexts.size !== 0) { snapshot.setManagedContexts(managedContexts); this._managedContextsOptimization.storeUnsharedSnapshot( @@ -56077,11 +56088,12 @@ class FileSystemInfo { unsharedManagedContexts ); } - const unsharedManagedMissing = this._managedMissingOptimization.optimize( - managedMissing, - undefined, - children - ); + const unsharedManagedMissing = + this._managedMissingOptimization.optimize( + managedMissing, + undefined, + children + ); if (managedMissing.size !== 0) { snapshot.setManagedMissing(managedMissing); this._managedMissingOptimization.storeUnsharedSnapshot( @@ -56285,11 +56297,12 @@ class FileSystemInfo { } break; case 1: - unsharedContextTimestamps = this._contextTimestampsOptimization.optimize( - capturedDirectories, - startTime, - children - ); + unsharedContextTimestamps = + this._contextTimestampsOptimization.optimize( + capturedDirectories, + startTime, + children + ); for (const path of capturedDirectories) { const cache = this._contextTimestamps.get(path); if (cache !== undefined) { @@ -57564,7 +57577,8 @@ class FlagDependencyExportsPlugin { } if (exports) { - const nestedExportsInfo = exportInfo.createNestedExportsInfo(); + const nestedExportsInfo = + exportInfo.createNestedExportsInfo(); mergeExports(nestedExportsInfo, exports); } @@ -57586,12 +57600,12 @@ class FlagDependencyExportsPlugin { const target = exportInfo.getTarget(moduleGraph); let targetExportsInfo = undefined; if (target) { - const targetModuleExportsInfo = moduleGraph.getExportsInfo( - target.module - ); - targetExportsInfo = targetModuleExportsInfo.getNestedExportsInfo( - target.export - ); + const targetModuleExportsInfo = + moduleGraph.getExportsInfo(target.module); + targetExportsInfo = + targetModuleExportsInfo.getNestedExportsInfo( + target.export + ); // add dependency for this module const set = dependencies.get(target.module); if (set === undefined) { @@ -57955,10 +57969,8 @@ class FlagDependencyUsagePlugin { if (oldReferencedExports === EXPORTS_OBJECT_REFERENCED) { continue; } - const referencedExports = compilation.getDependencyReferencedExports( - dep, - runtime - ); + const referencedExports = + compilation.getDependencyReferencedExports(dep, runtime); if ( oldReferencedExports === undefined || oldReferencedExports === NO_EXPORTS_REFERENCED || @@ -58460,7 +58472,8 @@ const { keyToRuntime, forEachRuntime, mergeRuntimeOwned, - subtractRuntime + subtractRuntime, + intersectRuntime } = __webpack_require__(43478); /** @typedef {import("./Chunk")} Chunk */ @@ -58516,10 +58529,8 @@ class HotModuleReplacementPlugin { const runtimeRequirements = [RuntimeGlobals.module]; const createAcceptHandler = (parser, ParamDependency) => { - const { - hotAcceptCallback, - hotAcceptWithoutCallback - } = HotModuleReplacementPlugin.getParserHooks(parser); + const { hotAcceptCallback, hotAcceptWithoutCallback } = + HotModuleReplacementPlugin.getParserHooks(parser); return expr => { const module = parser.state.module; @@ -58735,9 +58746,7 @@ class HotModuleReplacementPlugin { } records.chunkModuleIds = {}; for (const chunk of compilation.chunks) { - records.chunkModuleIds[ - chunk.id - ] = Array.from( + records.chunkModuleIds[chunk.id] = Array.from( chunkGraph.getOrderedChunkModulesIterable( chunk, compareModulesById(chunkGraph) @@ -58770,9 +58779,8 @@ class HotModuleReplacementPlugin { return chunkGraph.getModuleHash(module, chunk.runtime); } }; - const fullHashModulesInThisChunk = chunkGraph.getChunkFullHashModulesSet( - chunk - ); + const fullHashModulesInThisChunk = + chunkGraph.getChunkFullHashModulesSet(chunk); if (fullHashModulesInThisChunk !== undefined) { for (const module of fullHashModulesInThisChunk) { fullHashModules.add(module, chunk); @@ -58880,16 +58888,14 @@ class HotModuleReplacementPlugin { allOldRuntime = mergeRuntimeOwned(allOldRuntime, runtime); } forEachRuntime(allOldRuntime, runtime => { - const { - path: filename, - info: assetInfo - } = compilation.getPathWithInfo( - compilation.outputOptions.hotUpdateMainFilename, - { - hash: records.hash, - runtime - } - ); + const { path: filename, info: assetInfo } = + compilation.getPathWithInfo( + compilation.outputOptions.hotUpdateMainFilename, + { + hash: records.hash, + runtime + } + ); hotUpdateMainContentByRuntime.set(runtime, { updatedChunkIds: new Set(), removedChunkIds: new Set(), @@ -58938,16 +58944,19 @@ class HotModuleReplacementPlugin { ); if (currentChunk) { chunkId = currentChunk.id; - newRuntime = currentChunk.runtime; + newRuntime = intersectRuntime( + currentChunk.runtime, + allOldRuntime + ); + if (newRuntime === undefined) continue; newModules = chunkGraph .getChunkModules(currentChunk) .filter(module => updatedModules.has(module, currentChunk)); newRuntimeModules = Array.from( chunkGraph.getChunkRuntimeModulesIterable(currentChunk) ).filter(module => updatedModules.has(module, currentChunk)); - const fullHashModules = chunkGraph.getChunkFullHashModulesIterable( - currentChunk - ); + const fullHashModules = + chunkGraph.getChunkFullHashModulesIterable(currentChunk); newFullHashModules = fullHashModules && Array.from(fullHashModules).filter(module => @@ -59060,13 +59069,11 @@ class HotModuleReplacementPlugin { filename = entry.filename; assetInfo = entry.info; } else { - ({ - path: filename, - info: assetInfo - } = compilation.getPathWithInfo( - entry.filenameTemplate, - entry.pathOptions - )); + ({ path: filename, info: assetInfo } = + compilation.getPathWithInfo( + entry.filenameTemplate, + entry.pathOptions + )); } const source = entry.render(); compilation.additionalChunkAssets.push(filename); @@ -59647,7 +59654,8 @@ class JavascriptMetaInfoPlugin { let topLevelDeclarations = parser.state.module.buildInfo.topLevelDeclarations; if (topLevelDeclarations === undefined) { - topLevelDeclarations = parser.state.module.buildInfo.topLevelDeclarations = new Set(); + topLevelDeclarations = + parser.state.module.buildInfo.topLevelDeclarations = new Set(); } for (const name of parser.scope.definitions.asSet()) { const freeInfo = parser.getFreeInfoFromVariable(name); @@ -60225,9 +60233,8 @@ class MainTemplate { "chunkIdExpression" ]), get jsonpScript() { - const hooks = getLoadScriptRuntimeModule().getCompilationHooks( - compilation - ); + const hooks = + getLoadScriptRuntimeModule().getCompilationHooks(compilation); return hooks.createScript; }, get linkPrefetch() { @@ -61729,14 +61736,16 @@ const ModuleFilenameHelpers = exports; // TODO webpack 6: consider removing these ModuleFilenameHelpers.ALL_LOADERS_RESOURCE = "[all-loaders][resource]"; -ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE = /\[all-?loaders\]\[resource\]/gi; +ModuleFilenameHelpers.REGEXP_ALL_LOADERS_RESOURCE = + /\[all-?loaders\]\[resource\]/gi; ModuleFilenameHelpers.LOADERS_RESOURCE = "[loaders][resource]"; ModuleFilenameHelpers.REGEXP_LOADERS_RESOURCE = /\[loaders\]\[resource\]/gi; ModuleFilenameHelpers.RESOURCE = "[resource]"; ModuleFilenameHelpers.REGEXP_RESOURCE = /\[resource\]/gi; ModuleFilenameHelpers.ABSOLUTE_RESOURCE_PATH = "[absolute-resource-path]"; // cSpell:words olute -ModuleFilenameHelpers.REGEXP_ABSOLUTE_RESOURCE_PATH = /\[abs(olute)?-?resource-?path\]/gi; +ModuleFilenameHelpers.REGEXP_ABSOLUTE_RESOURCE_PATH = + /\[abs(olute)?-?resource-?path\]/gi; ModuleFilenameHelpers.RESOURCE_PATH = "[resource-path]"; ModuleFilenameHelpers.REGEXP_RESOURCE_PATH = /\[resource-?path\]/gi; ModuleFilenameHelpers.ALL_LOADERS = "[all-loaders]"; @@ -62925,8 +62934,12 @@ class ModuleGraphConnection { module.exports = ModuleGraphConnection; module.exports.addConnectionStates = addConnectionStates; -module.exports.TRANSITIVE_ONLY = /** @type {typeof TRANSITIVE_ONLY} */ (TRANSITIVE_ONLY); -module.exports.CIRCULAR_CONNECTION = /** @type {typeof CIRCULAR_CONNECTION} */ (CIRCULAR_CONNECTION); +module.exports.TRANSITIVE_ONLY = /** @type {typeof TRANSITIVE_ONLY} */ ( + TRANSITIVE_ONLY +); +module.exports.CIRCULAR_CONNECTION = /** @type {typeof CIRCULAR_CONNECTION} */ ( + CIRCULAR_CONNECTION +); /***/ }), @@ -63159,9 +63172,8 @@ class ModuleInfoHeaderPlugin { )}` ) + "\n" ); - const optimizationBailout = moduleGraph.getOptimizationBailout( - module - ); + const optimizationBailout = + moduleGraph.getOptimizationBailout(module); if (optimizationBailout) { for (const text of optimizationBailout) { let code; @@ -64183,16 +64195,17 @@ module.exports = class MultiCompiler { * @returns {SetupResult[]} result of setup */ _runGraph(setup, run, callback) { - /** @typedef {{ compiler: Compiler, result: Stats, state: "pending" | "blocked" | "queued" | "running" | "running-outdated" | "done", children: Node[], parents: Node[] }} Node */ + /** @typedef {{ compiler: Compiler, result: Stats, state: "pending" | "blocked" | "queued" | "starting" | "running" | "running-outdated" | "done", children: Node[], parents: Node[] }} Node */ // State transitions for nodes: // -> blocked (initial) - // blocked -> queued [add to queue] (when all parents done) - // queued -> running [running++] (when processing the queue) + // blocked -> starting [running++] (when all parents done) + // queued -> starting [running++] (when processing the queue) + // starting -> running (when run has been called) // running -> done [running--] (when compilation is done) // done -> pending (when invalidated from file change) - // pending -> blocked (when invalidated from aggregated changes) - // done -> blocked (when invalidated, from parent invalidation) + // pending -> blocked [add to queue] (when invalidated from aggregated changes) + // done -> blocked [add to queue] (when invalidated, from parent invalidation) // running -> running-outdated (when invalidated, either from change or parent invalidation) // running-outdated -> blocked [running--] (when compilation is done) @@ -64216,6 +64229,7 @@ module.exports = class MultiCompiler { parent.children.push(node); } } + /** @type {ArrayQueue} */ const queue = new ArrayQueue(); for (const node of nodes) { if (node.parents.length === 0) { @@ -64253,13 +64267,13 @@ module.exports = class MultiCompiler { if (node.state === "running") { node.state = "done"; for (const child of node.children) { - checkUnblocked(child); + if (child.state === "blocked") queue.enqueue(child); } } else if (node.state === "running-outdated") { node.state = "blocked"; - checkUnblocked(node); + queue.enqueue(node); } - process.nextTick(processQueue); + processQueue(); }; /** * @param {Node} node node @@ -64298,20 +64312,9 @@ module.exports = class MultiCompiler { if (node.state === "pending") { node.state = "blocked"; } - checkUnblocked(node); - processQueue(); - }; - /** - * @param {Node} node node - * @returns {void} - */ - const checkUnblocked = node => { - if ( - node.state === "blocked" && - node.parents.every(p => p.state === "done") - ) { - node.state = "queued"; + if (node.state === "blocked") { queue.enqueue(node); + processQueue(); } }; @@ -64322,20 +64325,33 @@ module.exports = class MultiCompiler { node.compiler, i, nodeDone.bind(null, node), - () => node.state !== "done" && node.state !== "running", + () => node.state !== "starting" && node.state !== "running", () => nodeChange(node), () => nodeInvalid(node) ) ); }); + let processing = true; const processQueue = () => { + if (processing) return; + processing = true; + process.nextTick(processQueueWorker); + }; + const processQueueWorker = () => { while (running < parallelism && queue.length > 0 && !errored) { const node = queue.dequeue(); - if (node.state !== "queued") continue; - running++; - node.state = "running"; - run(node.compiler, nodeDone.bind(null, node)); + if ( + node.state === "queued" || + (node.state === "blocked" && + node.parents.every(p => p.state === "done")) + ) { + running++; + node.state = "starting"; + run(node.compiler, nodeDone.bind(null, node)); + node.state = "running"; + } } + processing = false; if ( !errored && running === 0 && @@ -64354,7 +64370,7 @@ module.exports = class MultiCompiler { } } }; - processQueue(); + processQueueWorker(); return setupResults; } @@ -65138,6 +65154,7 @@ class NormalModule extends Module { * @param {string} options.rawRequest request without resolving * @param {LoaderItem[]} options.loaders list of loaders * @param {string} options.resource path + query of the real resource + * @param {Record=} options.resourceResolveData resource resolve data * @param {string | undefined} options.matchResource path + query of the matched resource (virtual) * @param {Parser} options.parser the parser used * @param {object} options.parserOptions the options of the parser used @@ -65153,6 +65170,7 @@ class NormalModule extends Module { rawRequest, loaders, resource, + resourceResolveData, matchResource, parser, parserOptions, @@ -65179,6 +65197,7 @@ class NormalModule extends Module { this.generatorOptions = generatorOptions; /** @type {string} */ this.resource = resource; + this.resourceResolveData = resourceResolveData; /** @type {string | undefined} */ this.matchResource = matchResource; /** @type {LoaderItem[]} */ @@ -65195,6 +65214,8 @@ class NormalModule extends Module { this._source = null; /** @private @type {Map | undefined} **/ this._sourceSizes = undefined; + /** @private @type {Set} */ + this._sourceTypes = undefined; // Cache this._lastSuccessfulBuildMeta = {}; @@ -65266,12 +65287,19 @@ class NormalModule extends Module { this.resource = m.resource; this.matchResource = m.matchResource; this.loaders = m.loaders; + this._sourceTypes = m._sourceTypes; + this._sourceSizes = m._sourceSizes; } /** * Assuming this module is in the cache. Remove internal references to allow freeing some memory. */ cleanupForCache() { + // Make sure to cache types and sizes before cleanup + if (this._sourceTypes === undefined) this.getSourceTypes(); + for (const type of this._sourceTypes) { + this.size(type); + } super.cleanupForCache(); this.parser = undefined; this.parserOptions = undefined; @@ -65309,6 +65337,7 @@ class NormalModule extends Module { this.type, this.generatorOptions ); + // we assume the generator behaves identically and keep cached sourceTypes/Sizes } /** @@ -65684,7 +65713,11 @@ class NormalModule extends Module { }, (err, result) => { // Cleanup loaderContext to avoid leaking memory in ICs - loaderContext._compilation = loaderContext._compiler = loaderContext._module = loaderContext.fs = undefined; + loaderContext._compilation = + loaderContext._compiler = + loaderContext._module = + loaderContext.fs = + undefined; if (!result) { return processResult( @@ -65788,6 +65821,7 @@ class NormalModule extends Module { this._forceBuild = false; this._source = null; if (this._sourceSizes !== undefined) this._sourceSizes.clear(); + this._sourceTypes = undefined; this._ast = null; this.error = null; this.clearWarningsAndErrors(); @@ -65806,7 +65840,7 @@ class NormalModule extends Module { assetsInfo: undefined }; - const startTime = Date.now(); + const startTime = compilation.compiler.fsStartTime || Date.now(); return this.doBuild(options, compilation, resolver, fs, err => { // if we have an error mark module as failed and exit @@ -65877,7 +65911,8 @@ class NormalModule extends Module { checkDependencies(this.buildInfo.missingDependencies); checkDependencies(this.buildInfo.contextDependencies); if (nonAbsoluteDependencies !== undefined) { - const InvalidDependenciesModuleWarning = getInvalidDependenciesModuleWarning(); + const InvalidDependenciesModuleWarning = + getInvalidDependenciesModuleWarning(); this.addWarning( new InvalidDependenciesModuleWarning(this, nonAbsoluteDependencies) ); @@ -65989,7 +66024,10 @@ class NormalModule extends Module { * @returns {Set} types available (do not mutate) */ getSourceTypes() { - return this.generator.getTypes(this); + if (this._sourceTypes === undefined) { + this._sourceTypes = this.generator.getTypes(this); + } + return this._sourceTypes; } /** @@ -66178,7 +66216,6 @@ class NormalModule extends Module { const { write } = context; // deserialize write(this._source); - write(this._sourceSizes); write(this.error); write(this._lastSuccessfulBuildMeta); write(this._forceBuild); @@ -66210,7 +66247,6 @@ class NormalModule extends Module { deserialize(context) { const { read } = context; this._source = read(); - this._sourceSizes = read(); this.error = read(); this._lastSuccessfulBuildMeta = read(); this._forceBuild = read(); @@ -66399,6 +66435,7 @@ const unsafeCacheData = new WeakMap(); const ruleSetCompiler = new RuleSetCompiler([ new BasicMatcherRulePlugin("test", "resource"), + new BasicMatcherRulePlugin("scheme"), new BasicMatcherRulePlugin("mimetype"), new BasicMatcherRulePlugin("dependency"), new BasicMatcherRulePlugin("include", "resource"), @@ -66674,6 +66711,7 @@ class NormalModuleFactory extends ModuleFactory { realResource: resourceData.path, resourceQuery: resourceDataForRules.query, resourceFragment: resourceDataForRules.fragment, + scheme, mimetype: matchResourceData ? "" : resourceData.data.mimetype || "", dependency: dependencyType, descriptionData: matchResourceData @@ -68436,10 +68474,11 @@ class RecordIdsPlugin { apply(compiler) { const portableIds = this.options.portableIds; - const makePathsRelative = identifierUtils.makePathsRelative.bindContextCache( - compiler.context, - compiler.root - ); + const makePathsRelative = + identifierUtils.makePathsRelative.bindContextCache( + compiler.context, + compiler.root + ); /** * @param {Module} module the module @@ -68802,9 +68841,9 @@ const convertToResolveOptions = resolveOptionsWithDepType => { ...remaining, plugins: plugins && - /** @type {ResolvePluginInstance[]} */ (plugins.filter( - item => item !== "..." - )) + /** @type {ResolvePluginInstance[]} */ ( + plugins.filter(item => item !== "...") + ) }; if (!partialOptions.fileSystem) { @@ -68813,7 +68852,10 @@ const convertToResolveOptions = resolveOptionsWithDepType => { ); } // These weird types validate that we checked all non-optional properties - const options = /** @type {Partial & Pick} */ (partialOptions); + const options = + /** @type {Partial & Pick} */ ( + partialOptions + ); return removeOperations( resolveByProperty(options, "byDependency", dependencyType) @@ -68884,9 +68926,9 @@ module.exports = class ResolverFactory { const resolveOptions = convertToResolveOptions( this.hooks.resolveOptions.for(type).call(resolveOptionsWithDepType) ); - const resolver = /** @type {ResolverWithOptions} */ (Factory.createResolver( - resolveOptions - )); + const resolver = /** @type {ResolverWithOptions} */ ( + Factory.createResolver(resolveOptions) + ); if (!resolver) { throw new Error("No resolver created"); } @@ -71374,19 +71416,20 @@ class SourceMapDevToolPlugin { currentSourceMappingURLComment !== false && /\.css($|\?)/i.test(file) ) { - currentSourceMappingURLComment = currentSourceMappingURLComment.replace( - /^\n\/\/(.*)$/, - "\n/*$1*/" - ); + currentSourceMappingURLComment = + currentSourceMappingURLComment.replace( + /^\n\/\/(.*)$/, + "\n/*$1*/" + ); } const sourceMapString = JSON.stringify(sourceMap); if (sourceMapFilename) { let filename = file; const sourceMapContentHash = usesContentHash && - /** @type {string} */ (createHash("md4") - .update(sourceMapString) - .digest("hex")); + /** @type {string} */ ( + createHash("md4").update(sourceMapString).digest("hex") + ); const pathParams = { chunk, filename: options.fileContext @@ -71398,13 +71441,11 @@ class SourceMapDevToolPlugin { : filename, contentHash: sourceMapContentHash }; - const { - path: sourceMapFile, - info: sourceMapInfo - } = compilation.getPathWithInfo( - sourceMapFilename, - pathParams - ); + const { path: sourceMapFile, info: sourceMapInfo } = + compilation.getPathWithInfo( + sourceMapFilename, + pathParams + ); const sourceMapUrl = options.publicPath ? options.publicPath + sourceMapFile : relative( @@ -72014,8 +72055,10 @@ class Template { } module.exports = Template; -module.exports.NUMBER_OF_IDENTIFIER_START_CHARS = NUMBER_OF_IDENTIFIER_START_CHARS; -module.exports.NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS; +module.exports.NUMBER_OF_IDENTIFIER_START_CHARS = + NUMBER_OF_IDENTIFIER_START_CHARS; +module.exports.NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS = + NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS; /***/ }), @@ -72847,16 +72890,70 @@ class Watching { this._needRecords = true; this.watcher = undefined; this.pausedWatcher = undefined; + /** @type {Set} */ + this._collectedChangedFiles = undefined; + /** @type {Set} */ + this._collectedRemovedFiles = undefined; this._done = this._done.bind(this); process.nextTick(() => { if (this._initial) this._invalidate(); }); } - _go() { + _mergeWithCollected(changedFiles, removedFiles) { + if (!changedFiles) return; + if (!this._collectedChangedFiles) { + this._collectedChangedFiles = new Set(changedFiles); + this._collectedRemovedFiles = new Set(removedFiles); + } else { + for (const file of changedFiles) { + this._collectedChangedFiles.add(file); + this._collectedRemovedFiles.delete(file); + } + for (const file of removedFiles) { + this._collectedChangedFiles.delete(file); + this._collectedRemovedFiles.add(file); + } + } + } + + _go(fileTimeInfoEntries, contextTimeInfoEntries, changedFiles, removedFiles) { this._initial = false; this.startTime = Date.now(); this.running = true; + if (this.watcher) { + this.pausedWatcher = this.watcher; + this.lastWatcherStartTime = Date.now(); + this.watcher.pause(); + this.watcher = null; + } else if (!this.lastWatcherStartTime) { + this.lastWatcherStartTime = Date.now(); + } + this.compiler.fsStartTime = Date.now(); + this._mergeWithCollected( + changedFiles || + (this.pausedWatcher && + this.pausedWatcher.getAggregatedChanges && + this.pausedWatcher.getAggregatedChanges()), + (this.compiler.removedFiles = + removedFiles || + (this.pausedWatcher && + this.pausedWatcher.getAggregatedRemovals && + this.pausedWatcher.getAggregatedRemovals())) + ); + + this.compiler.modifiedFiles = this._collectedChangedFiles; + this._collectedChangedFiles = undefined; + this.compiler.removedFiles = this._collectedRemovedFiles; + this._collectedRemovedFiles = undefined; + + this.compiler.fileTimestamps = + fileTimeInfoEntries || + (this.pausedWatcher && this.pausedWatcher.getFileTimeInfoEntries()); + this.compiler.contextTimestamps = + contextTimeInfoEntries || + (this.pausedWatcher && this.pausedWatcher.getContextTimeInfoEntries()); + const run = () => { if (this.compiler.idle) { return this.compiler.cache.endIdle(err => { @@ -72949,13 +73046,16 @@ class Watching { let stats = null; - const handleError = err => { + const handleError = (err, cbs) => { this.compiler.hooks.failed.call(err); this.compiler.cache.beginIdle(); this.compiler.idle = true; this.handler(err, stats); - for (const cb of this.callbacks) cb(); - this.callbacks.length = 0; + if (!cbs) { + cbs = this.callbacks; + this.callbacks = []; + } + for (const cb of cbs) cb(err); }; if ( @@ -72987,17 +73087,19 @@ class Watching { } if (err) return handleError(err); + const cbs = this.callbacks; + this.callbacks = []; logger.time("done hook"); this.compiler.hooks.done.callAsync(stats, err => { logger.timeEnd("done hook"); - if (err) return handleError(err); + if (err) return handleError(err, cbs); this.handler(null, stats); logger.time("storeBuildDependencies"); this.compiler.cache.storeBuildDependencies( compilation.buildDependencies, err => { logger.timeEnd("storeBuildDependencies"); - if (err) return handleError(err); + if (err) return handleError(err, cbs); logger.time("beginIdle"); this.compiler.cache.beginIdle(); this.compiler.idle = true; @@ -73011,8 +73113,7 @@ class Watching { ); } }); - for (const cb of this.callbacks) cb(); - this.callbacks.length = 0; + for (const cb of cbs) cb(null); this.compiler.hooks.afterDone.call(stats); } ); @@ -73031,7 +73132,7 @@ class Watching { files, dirs, missing, - this.startTime, + this.lastWatcherStartTime, this.watchOptions, ( err, @@ -73040,25 +73141,20 @@ class Watching { changedFiles, removedFiles ) => { - this.pausedWatcher = this.watcher; - this.watcher = null; if (err) { this.compiler.modifiedFiles = undefined; this.compiler.removedFiles = undefined; this.compiler.fileTimestamps = undefined; this.compiler.contextTimestamps = undefined; + this.compiler.fsStartTime = undefined; return this.handler(err); } - this.compiler.fileTimestamps = fileTimeInfoEntries; - this.compiler.contextTimestamps = contextTimeInfoEntries; - this.compiler.removedFiles = removedFiles; - this.compiler.modifiedFiles = changedFiles; - if (this.watcher) { - this.pausedWatcher = this.watcher; - this.watcher.pause(); - this.watcher = null; - } - this._invalidate(); + this._invalidate( + fileTimeInfoEntries, + contextTimeInfoEntries, + changedFiles, + removedFiles + ); this._onChange(); }, (fileName, changeTime) => { @@ -73083,33 +73179,31 @@ class Watching { this._invalidReported = true; this.compiler.hooks.invalid.call(null, Date.now()); } + this._onChange(); this._invalidate(); } - _invalidate() { - if (this.suspended) return; - if (this._isBlocked()) { - this.blocked = true; + _invalidate( + fileTimeInfoEntries, + contextTimeInfoEntries, + changedFiles, + removedFiles + ) { + if (this.suspended || (this._isBlocked() && (this.blocked = true))) { + this._mergeWithCollected(changedFiles, removedFiles); return; } - if (this.watcher) { - this.compiler.modifiedFiles = - this.watcher.getAggregatedChanges && - this.watcher.getAggregatedChanges(); - this.compiler.removedFiles = - this.watcher.getAggregatedRemovals && - this.watcher.getAggregatedRemovals(); - this.compiler.fileTimestamps = this.watcher.getFileTimeInfoEntries(); - this.compiler.contextTimestamps = this.watcher.getContextTimeInfoEntries(); - this.pausedWatcher = this.watcher; - this.watcher.pause(); - this.watcher = null; - } if (this.running) { + this._mergeWithCollected(changedFiles, removedFiles); this.invalid = true; } else { - this._go(); + this._go( + fileTimeInfoEntries, + contextTimeInfoEntries, + changedFiles, + removedFiles + ); } } @@ -73124,14 +73218,6 @@ class Watching { } } - _checkUnblocked() { - if (this.blocked && !this._isBlocked()) { - this.blocked = false; - this._needWatcherInfo = true; - this._invalidate(); - } - } - /** * @param {Callback} callback signals when the watcher is closed * @returns {void} @@ -73152,6 +73238,7 @@ class Watching { this.compiler.removedFiles = undefined; this.compiler.fileTimestamps = undefined; this.compiler.contextTimestamps = undefined; + this.compiler.fsStartTime = undefined; const shutdown = () => { this.compiler.cache.shutdown(err => { this.compiler.hooks.watchClose.call(); @@ -74151,12 +74238,33 @@ class AssetGenerator extends Generator { } ); } else { - const encoding = this.dataUrlOptions.encoding; - const ext = path.extname(module.nameForCondition()); - const mimeType = - this.dataUrlOptions.mimetype || mimeTypes.lookup(ext); - - if (!mimeType) { + /** @type {string | false | undefined} */ + let encoding = this.dataUrlOptions.encoding; + if (encoding === undefined) { + if ( + module.resourceResolveData && + module.resourceResolveData.encoding !== undefined + ) { + encoding = module.resourceResolveData.encoding; + } + } + if (encoding === undefined) { + encoding = "base64"; + } + let ext; + let mimeType = this.dataUrlOptions.mimetype; + if (mimeType === undefined) { + ext = path.extname(module.nameForCondition()); + if ( + module.resourceResolveData && + module.resourceResolveData.mimetype !== undefined + ) { + mimeType = module.resourceResolveData.mimetype; + } else if (ext) { + mimeType = mimeTypes.lookup(ext); + } + } + if (typeof mimeType !== "string") { throw new Error( "DataUrl can't be generated automatically, " + `because there is no mimetype for "${ext}" in mimetype database. ` + @@ -74201,9 +74309,9 @@ class AssetGenerator extends Generator { hash.update(runtimeTemplate.outputOptions.hashSalt); } hash.update(originalSource.buffer()); - const fullHash = /** @type {string} */ (hash.digest( - runtimeTemplate.outputOptions.hashDigest - )); + const fullHash = /** @type {string} */ ( + hash.digest(runtimeTemplate.outputOptions.hashDigest) + ); const contentHash = fullHash.slice( 0, runtimeTemplate.outputOptions.hashDigestLength @@ -74214,26 +74322,9 @@ class AssetGenerator extends Generator { module.matchResource || module.resource, runtimeTemplate.compilation.compiler.root ).replace(/^\.\//, ""); - let { - path: filename, - info: assetInfo - } = runtimeTemplate.compilation.getAssetPathWithInfo( - assetModuleFilename, - { - module, - runtime, - filename: sourceFilename, - chunkGraph, - contentHash - } - ); - let publicPath; - if (this.publicPath) { - const { - path, - info - } = runtimeTemplate.compilation.getAssetPathWithInfo( - this.publicPath, + let { path: filename, info: assetInfo } = + runtimeTemplate.compilation.getAssetPathWithInfo( + assetModuleFilename, { module, runtime, @@ -74242,6 +74333,19 @@ class AssetGenerator extends Generator { contentHash } ); + let publicPath; + if (this.publicPath) { + const { path, info } = + runtimeTemplate.compilation.getAssetPathWithInfo( + this.publicPath, + { + module, + runtime, + filename: sourceFilename, + chunkGraph, + contentHash + } + ); publicPath = JSON.stringify(path); assetInfo = mergeAssetInfo(assetInfo, info); } else { @@ -74472,7 +74576,7 @@ class AssetModulesPlugin { dataUrl = generatorOptions.dataUrl; if (!dataUrl || typeof dataUrl === "object") { dataUrl = { - encoding: "base64", + encoding: undefined, mimetype: undefined, ...dataUrl }; @@ -75405,7 +75509,8 @@ const visitModules = ( if (skipConnectionBuffer.length > 0) { let { skippedModuleConnections } = chunkGroupInfo; if (skippedModuleConnections === undefined) { - chunkGroupInfo.skippedModuleConnections = skippedModuleConnections = new Set(); + chunkGroupInfo.skippedModuleConnections = skippedModuleConnections = + new Set(); } for (let i = skipConnectionBuffer.length - 1; i >= 0; i--) { skippedModuleConnections.add(skipConnectionBuffer[i]); @@ -75581,7 +75686,8 @@ const visitModules = ( let resultingAvailableModules; if (minAvailableModules.size > minAvailableModules.plus.size) { // resultingAvailableModules = (modules of chunk) + (minAvailableModules + minAvailableModules.plus) - resultingAvailableModules = /** @type {Set & {plus: Set}} */ (new Set()); + resultingAvailableModules = + /** @type {Set & {plus: Set}} */ (new Set()); for (const module of minAvailableModules.plus) minAvailableModules.add(module); minAvailableModules.plus = EMPTY_SET; @@ -75589,9 +75695,10 @@ const visitModules = ( chunkGroupInfo.minAvailableModulesOwned = false; } else { // resultingAvailableModules = (minAvailableModules + modules of chunk) + (minAvailableModules.plus) - resultingAvailableModules = /** @type {Set & {plus: Set}} */ (new Set( - minAvailableModules - )); + resultingAvailableModules = + /** @type {Set & {plus: Set}} */ ( + new Set(minAvailableModules) + ); resultingAvailableModules.plus = minAvailableModules.plus; } @@ -75601,7 +75708,8 @@ const visitModules = ( resultingAvailableModules.add(m); } } - return (chunkGroupInfo.resultingAvailableModules = resultingAvailableModules); + return (chunkGroupInfo.resultingAvailableModules = + resultingAvailableModules); }; const processConnectQueue = () => { @@ -75618,9 +75726,8 @@ const visitModules = ( } // 2. Calculate resulting available modules - const resultingAvailableModules = calculateResultingAvailableModules( - chunkGroupInfo - ); + const resultingAvailableModules = + calculateResultingAvailableModules(chunkGroupInfo); const runtime = chunkGroupInfo.runtime; @@ -75686,9 +75793,8 @@ const visitModules = ( if (!availableModules.has(m) && !availableModules.plus.has(m)) { // We can't remove modules from the plus part // so we need to merge plus into the normal part to allow modifying it - const iterator = cachedMinAvailableModules.plus[ - Symbol.iterator - ](); + const iterator = + cachedMinAvailableModules.plus[Symbol.iterator](); // fast forward add all modules until m /** @type {IteratorResult} */ let it; @@ -75837,13 +75943,12 @@ const visitModules = ( statForkedMergedModulesCountPlus += availableModules.plus.size; // construct a new Set as intersection of cachedMinAvailableModules and availableModules // we already know that all modules directly from cachedMinAvailableModules are in availableModules too - const newSet = /** @type {ModuleSetPlus} */ (new Set( - cachedMinAvailableModules - )); + const newSet = /** @type {ModuleSetPlus} */ ( + new Set(cachedMinAvailableModules) + ); newSet.plus = EMPTY_SET; - const iterator = cachedMinAvailableModules.plus[ - Symbol.iterator - ](); + const iterator = + cachedMinAvailableModules.plus[Symbol.iterator](); // fast forward add all modules until m /** @type {IteratorResult} */ let it; @@ -75904,9 +76009,8 @@ const visitModules = ( }; // combine minAvailableModules from all resultingAvailableModules for (const source of info.availableSources) { - const resultingAvailableModules = calculateResultingAvailableModules( - source - ); + const resultingAvailableModules = + calculateResultingAvailableModules(source); mergeSet(resultingAvailableModules); mergeSet(resultingAvailableModules.plus); } @@ -77723,7 +77827,8 @@ class PackFileCacheStrategy { if (newBuildDependencies) this.newBuildDependencies.addAll(newBuildDependencies); this.resolveResults = resolveResults; - this.resolveBuildDependenciesSnapshot = resolveBuildDependenciesSnapshot; + this.resolveBuildDependenciesSnapshot = + resolveBuildDependenciesSnapshot; return pack; } return new Pack(logger, this.maxAge); @@ -77845,10 +77950,11 @@ class PackFileCacheStrategy { ); } if (this.resolveBuildDependenciesSnapshot) { - this.resolveBuildDependenciesSnapshot = this.fileSystemInfo.mergeSnapshots( - this.resolveBuildDependenciesSnapshot, - snapshot - ); + this.resolveBuildDependenciesSnapshot = + this.fileSystemInfo.mergeSnapshots( + this.resolveBuildDependenciesSnapshot, + snapshot + ); } else { this.resolveBuildDependenciesSnapshot = snapshot; } @@ -77876,10 +77982,11 @@ class PackFileCacheStrategy { this.logger.debug("Captured build dependencies"); if (this.buildSnapshot) { - this.buildSnapshot = this.fileSystemInfo.mergeSnapshots( - this.buildSnapshot, - snapshot - ); + this.buildSnapshot = + this.fileSystemInfo.mergeSnapshots( + this.buildSnapshot, + snapshot + ); } else { this.buildSnapshot = snapshot; } @@ -79656,9 +79763,10 @@ const applyCacheDefaults = (cache, { name, mode, development }) => { const applySnapshotDefaults = (snapshot, { production }) => { A(snapshot, "managedPaths", () => { if (process.versions.pnp === "3") { - const match = /^(.+?)[\\/]cache[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(36242) - ); + const match = + /^(.+?)[\\/]cache[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( + /*require.resolve*/(36242) + ); if (match) { return [path.resolve(match[1], "unplugged")]; } @@ -79675,16 +79783,18 @@ const applySnapshotDefaults = (snapshot, { production }) => { }); A(snapshot, "immutablePaths", () => { if (process.versions.pnp === "1") { - const match = /^(.+?[\\/]v4)[\\/]npm-watchpack-[^\\/]+-[\da-f]{40}[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(36242) - ); + const match = + /^(.+?[\\/]v4)[\\/]npm-watchpack-[^\\/]+-[\da-f]{40}[\\/]node_modules[\\/]/.exec( + /*require.resolve*/(36242) + ); if (match) { return [match[1]]; } } else if (process.versions.pnp === "3") { - const match = /^(.+?)[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( - /*require.resolve*/(36242) - ); + const match = + /^(.+?)[\\/]watchpack-npm-[^\\/]+\.zip[\\/]node_modules[\\/]/.exec( + /*require.resolve*/(36242) + ); if (match) { return [match[1]]; } @@ -79813,7 +79923,15 @@ const applyModuleDefaults = ( }, { dependency: "url", - type: "asset/resource" + oneOf: [ + { + scheme: /^data$/, + type: "asset/inline" + }, + { + type: "asset/resource" + } + ] } ]; if (asyncWebAssembly) { @@ -80538,9 +80656,9 @@ const keyedNestedConfig = (value, fn, customKeys) => { ? {} : Object.keys(value).reduce( (obj, key) => ( - (obj[key] = (customKeys && key in customKeys - ? customKeys[key] - : fn)(value[key])), + (obj[key] = ( + customKeys && key in customKeys ? customKeys[key] : fn + )(value[key])), obj ), /** @type {Record} */ ({}) @@ -80609,10 +80727,10 @@ const getNormalizedWebpackOptions = config => { config.entry === undefined ? { main: {} } : typeof config.entry === "function" - ? (fn => () => - Promise.resolve().then(fn).then(getNormalizedEntryStatic))( - config.entry - ) + ? ( + fn => () => + Promise.resolve().then(fn).then(getNormalizedEntryStatic) + )(config.entry) : getNormalizedEntryStatic(config.entry), experiments: cloneObject(config.experiments), externals: config.externals, @@ -80966,14 +81084,18 @@ exports.getNormalizedWebpackOptions = getNormalizedWebpackOptions; -const browserslistTargetHandler = __webpack_require__(63047); +const memoize = __webpack_require__(18003); + +const getBrowserslistTargetHandler = memoize(() => + __webpack_require__(63047) +); /** * @param {string} context the context directory * @returns {string} default target */ const getDefaultTarget = context => { - const browsers = browserslistTargetHandler.load(null, context); + const browsers = getBrowserslistTargetHandler().load(null, context); return browsers ? "browserslist" : "web"; }; @@ -81039,6 +81161,7 @@ const TARGETS = [ "Resolve features from browserslist. Will resolve browserslist config automatically. Only browser or node queries are supported (electron is not supported). Examples: 'browserslist:modern' to use 'modern' environment from browserslist config", /^browserslist(?::(.+))?$/, (rest, context) => { + const browserslistTargetHandler = getBrowserslistTargetHandler(); const browsers = browserslistTargetHandler.load( rest ? rest.trim() : null, context @@ -83194,9 +83317,10 @@ const interceptAllParserHooks = (moduleFactory, tracer) => { const interceptAllJavascriptModulesPluginHooks = (compilation, tracer) => { interceptAllHooksFor( { - hooks: __webpack_require__(80867).getCompilationHooks( - compilation - ) + hooks: + __webpack_require__(80867).getCompilationHooks( + compilation + ) }, tracer, "JavascriptModulesPlugin" @@ -84697,9 +84821,9 @@ AMDRequireDependency.Template = class AMDRequireDependencyTemplate extends ( { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } ) { const dep = /** @type {AMDRequireDependency} */ (dependency); - const depBlock = /** @type {AsyncDependenciesBlock} */ (moduleGraph.getParentBlock( - dep - )); + const depBlock = /** @type {AsyncDependenciesBlock} */ ( + moduleGraph.getParentBlock(dep) + ); const promise = runtimeTemplate.blockPromise({ chunkGraph, block: depBlock, @@ -85307,9 +85431,8 @@ class CommonJsExportRequireDependency extends ModuleDependency { if (name === "__esModule" && isNamespaceImport) { exports.add(name); } else if (importedExportsInfo) { - const importedExportInfo = importedExportsInfo.getReadOnlyExportInfo( - name - ); + const importedExportInfo = + importedExportsInfo.getReadOnlyExportInfo(name); if (importedExportInfo.provided === false) continue; exports.add(name); if (importedExportInfo.provided === true) continue; @@ -85810,7 +85933,9 @@ class CommonJsExportsParserPlugin { parser.hooks.call .for("Object.defineProperty") .tap("CommonJsExportsParserPlugin", expression => { - const expr = /** @type {import("estree").CallExpression} */ (expression); + const expr = /** @type {import("estree").CallExpression} */ ( + expression + ); if (!parser.isStatementLevelExpression(expr)) return; if (expr.arguments.length !== 3) return; if (expr.arguments[0].type === "SpreadElement") return; @@ -86280,10 +86405,8 @@ class CommonJsImportsParserPlugin { }; const createRequireHandler = callNew => expr => { if (options.commonjsMagicComments) { - const { - options: requireOptions, - errors: commentErrors - } = parser.parseCommentOptions(expr.range); + const { options: requireOptions, errors: commentErrors } = + parser.parseCommentOptions(expr.range); if (commentErrors) { for (const e of commentErrors) { @@ -86759,13 +86882,14 @@ class NodeModuleDecoratorRuntimeModule extends RuntimeModule { generate() { const { runtimeTemplate } = this.compilation; return Template.asString([ - `${ - RuntimeGlobals.nodeModuleDecorator - } = ${runtimeTemplate.basicFunction("module", [ - "module.paths = [];", - "if (!module.children) module.children = [];", - "return module;" - ])};` + `${RuntimeGlobals.nodeModuleDecorator} = ${runtimeTemplate.basicFunction( + "module", + [ + "module.paths = [];", + "if (!module.children) module.children = [];", + "return module;" + ] + )};` ]); } } @@ -86826,7 +86950,8 @@ makeSerializable( "webpack/lib/dependencies/CommonJsRequireContextDependency" ); -CommonJsRequireContextDependency.Template = ContextDependencyTemplateAsRequireCall; +CommonJsRequireContextDependency.Template = + ContextDependencyTemplateAsRequireCall; module.exports = CommonJsRequireContextDependency; @@ -87345,10 +87470,11 @@ exports.create = (Dep, range, param, expr, options, contextOptions, parser) => { const valueRange = param.range; const { context, prefix } = splitContextFromPrefix(prefixRaw); - const { path: postfix, query, fragment } = parseResource( - postfixRaw, - parser - ); + const { + path: postfix, + query, + fragment + } = parseResource(postfixRaw, parser); // When there are more than two quasis, the generated RegExp can be more precise // We join the quasis with the expression regexp @@ -87444,10 +87570,11 @@ exports.create = (Dep, range, param, expr, options, contextOptions, parser) => { param.postfix && param.postfix.isString() ? param.postfix.range : null; const valueRange = param.range; const { context, prefix } = splitContextFromPrefix(prefixRaw); - const { path: postfix, query, fragment } = parseResource( - postfixRaw, - parser - ); + const { + path: postfix, + query, + fragment + } = parseResource(postfixRaw, parser); const regExp = new RegExp( `^${quoteMeta(prefix)}${options.wrappedContextRegExp.source}${quoteMeta( postfix @@ -89431,9 +89558,8 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency { const ignoredExports = new Set(["default", ...this.activeExports]); let hiddenExports = undefined; - const otherStarExports = this._discoverActiveExportsFromOtherStarExports( - moduleGraph - ); + const otherStarExports = + this._discoverActiveExportsFromOtherStarExports(moduleGraph); if (otherStarExports !== undefined) { hiddenExports = new Set(); for (let i = 0; i < otherStarExports.namesSlice; i++) { @@ -89461,9 +89587,8 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency { const name = exportInfo.name; if (ignoredExports.has(name)) continue; if (exportInfo.getUsed(runtime) === UsageState.Unused) continue; - const importedExportInfo = importedExportsInfo.getReadOnlyExportInfo( - name - ); + const importedExportInfo = + importedExportsInfo.getReadOnlyExportInfo(name); if (importedExportInfo.provided === false) continue; if (hiddenExports !== undefined && hiddenExports.has(name)) { hidden.add(name); @@ -89783,9 +89908,8 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency { `(reexported as '${this.name}')` ); if (ids.length === 0 && this.name === null) { - const potentialConflicts = this._discoverActiveExportsFromOtherStarExports( - moduleGraph - ); + const potentialConflicts = + this._discoverActiveExportsFromOtherStarExports(moduleGraph); if (potentialConflicts && potentialConflicts.namesSlice > 0) { const ownNames = new Set( potentialConflicts.names.slice( @@ -89822,9 +89946,8 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency { conflictingModule, exportInfo.name ); - const conflictingTarget = conflictingExportInfo.getTerminalBinding( - moduleGraph - ); + const conflictingTarget = + conflictingExportInfo.getTerminalBinding(moduleGraph); if (!conflictingTarget) continue; if (target === conflictingTarget) continue; const list = conflicts.get(conflictingDependency.request); @@ -89902,7 +90025,9 @@ HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedS apply(dependency, source, templateContext) { const { moduleGraph, runtime, concatenationScope } = templateContext; - const dep = /** @type {HarmonyExportImportedSpecifierDependency} */ (dependency); + const dep = /** @type {HarmonyExportImportedSpecifierDependency} */ ( + dependency + ); const mode = dep.getMode(moduleGraph, runtime); @@ -91097,10 +91222,8 @@ module.exports = class HarmonyImportDependencyParserPlugin { InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); return true; }); - const { - hotAcceptCallback, - hotAcceptWithoutCallback - } = HotModuleReplacementPlugin.getParserHooks(parser); + const { hotAcceptCallback, hotAcceptWithoutCallback } = + HotModuleReplacementPlugin.getParserHooks(parser); hotAcceptCallback.tap( "HarmonyImportDependencyParserPlugin", (expr, requests) => { @@ -91494,12 +91617,8 @@ HarmonyImportSpecifierDependency.Template = class HarmonyImportSpecifierDependen */ apply(dependency, source, templateContext) { const dep = /** @type {HarmonyImportSpecifierDependency} */ (dependency); - const { - moduleGraph, - module, - runtime, - concatenationScope - } = templateContext; + const { moduleGraph, module, runtime, concatenationScope } = + templateContext; const connection = moduleGraph.getConnection(dep); // Skip rendering depending when dependency is conditional if (connection && !connection.isTargetActive(runtime)) return; @@ -91538,11 +91657,8 @@ HarmonyImportSpecifierDependency.Template = class HarmonyImportSpecifierDependen } else { super.apply(dependency, source, templateContext); - const { - runtimeTemplate, - initFragments, - runtimeRequirements - } = templateContext; + const { runtimeTemplate, initFragments, runtimeRequirements } = + templateContext; exportExpr = runtimeTemplate.exportFromImport({ moduleGraph, @@ -91886,9 +92002,9 @@ ImportDependency.Template = class ImportDependencyTemplate extends ( { runtimeTemplate, module, moduleGraph, chunkGraph, runtimeRequirements } ) { const dep = /** @type {ImportDependency} */ (dependency); - const block = /** @type {AsyncDependenciesBlock} */ (moduleGraph.getParentBlock( - dep - )); + const block = /** @type {AsyncDependenciesBlock} */ ( + moduleGraph.getParentBlock(dep) + ); const content = runtimeTemplate.moduleNamespacePromise({ chunkGraph, block: block, @@ -92306,10 +92422,8 @@ class ImportParserPlugin { /** @type {RawChunkGroupOptions} */ const groupOptions = {}; - const { - options: importOptions, - errors: commentErrors - } = parser.parseCommentOptions(expr.range); + const { options: importOptions, errors: commentErrors } = + parser.parseCommentOptions(expr.range); if (commentErrors) { for (const e of commentErrors) { @@ -94417,9 +94531,8 @@ module.exports = class RequireEnsureDependenciesBlockParserPlugin { ? dependenciesExpr.items : [dependenciesExpr]; const successExpressionArg = expr.arguments[1]; - const successExpression = getFunctionExpression( - successExpressionArg - ); + const successExpression = + getFunctionExpression(successExpressionArg); if (successExpression) { parser.walkExpressions(successExpression.expressions); @@ -94569,9 +94682,9 @@ RequireEnsureDependency.Template = class RequireEnsureDependencyTemplate extends { runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements } ) { const dep = /** @type {RequireEnsureDependency} */ (dependency); - const depBlock = /** @type {AsyncDependenciesBlock} */ (moduleGraph.getParentBlock( - dep - )); + const depBlock = /** @type {AsyncDependenciesBlock} */ ( + moduleGraph.getParentBlock(dep) + ); const promise = runtimeTemplate.blockPromise({ chunkGraph, block: depBlock, @@ -96251,12 +96364,12 @@ WorkerDependency.Template = class WorkerDependencyTemplate extends ( apply(dependency, source, templateContext) { const { chunkGraph, moduleGraph, runtimeRequirements } = templateContext; const dep = /** @type {WorkerDependency} */ (dependency); - const block = /** @type {AsyncDependenciesBlock} */ (moduleGraph.getParentBlock( - dependency - )); - const entrypoint = /** @type {Entrypoint} */ (chunkGraph.getBlockChunkGroup( - block - )); + const block = /** @type {AsyncDependenciesBlock} */ ( + moduleGraph.getParentBlock(dependency) + ); + const entrypoint = /** @type {Entrypoint} */ ( + chunkGraph.getBlockChunkGroup(block) + ); const chunk = entrypoint.getEntrypointChunk(); runtimeRequirements.add(RuntimeGlobals.publicPath); @@ -96472,21 +96585,18 @@ class WorkerPlugin { spread: hasSpreadInOptions, insertType, insertLocation - } = - arg2 && arg2.type === "ObjectExpression" - ? parseObjectExpression(parser, arg2) - : { - expressions: {}, - otherElements: [], - values: {}, - spread: false, - insertType: arg2 ? "spread" : "argument", - insertLocation: arg2 ? arg2.range : arg1.range[1] - }; - const { - options: importOptions, - errors: commentErrors - } = parser.parseCommentOptions(expr.range); + } = arg2 && arg2.type === "ObjectExpression" + ? parseObjectExpression(parser, arg2) + : { + expressions: {}, + otherElements: [], + values: {}, + spread: false, + insertType: arg2 ? "spread" : "argument", + insertLocation: arg2 ? arg2.range : arg1.range[1] + }; + const { options: importOptions, errors: commentErrors } = + parser.parseCommentOptions(expr.range); if (commentErrors) { for (const e of commentErrors) { @@ -96566,9 +96676,9 @@ class WorkerPlugin { )}|${i}`; const hash = createHash(compilation.outputOptions.hashFunction); hash.update(name); - const digest = /** @type {string} */ (hash.digest( - compilation.outputOptions.hashDigest - )); + const digest = /** @type {string} */ ( + hash.digest(compilation.outputOptions.hashDigest) + ); entryOptions.runtime = digest.slice( 0, compilation.outputOptions.hashDigestLength @@ -96654,7 +96764,9 @@ class WorkerPlugin { (call ? parser.hooks.call : parser.hooks.new) .for(harmonySpecifierTag) .tap("WorkerPlugin", expr => { - const settings = /** @type {HarmonySettings} */ (parser.currentTagData); + const settings = /** @type {HarmonySettings} */ ( + parser.currentTagData + ); if ( !settings || settings.source !== source || @@ -97266,8 +97378,9 @@ class LazyCompilationProxyModule extends Module { const sources = new Map(); const runtimeRequirements = new Set(); runtimeRequirements.add(RuntimeGlobals.module); - const clientDep = /** @type {CommonJsRequireDependency} */ (this - .dependencies[0]); + const clientDep = /** @type {CommonJsRequireDependency} */ ( + this.dependencies[0] + ); const clientModule = moduleGraph.getModule(clientDep); const block = this.blocks[0]; const client = Template.asString([ @@ -97360,8 +97473,9 @@ class LazyCompilationDependencyFactory extends ModuleFactory { * @returns {void} */ create(data, callback) { - const dependency = /** @type {LazyCompilationDependency} */ (data - .dependencies[0]); + const dependency = /** @type {LazyCompilationDependency} */ ( + data.dependencies[0] + ); callback(null, { module: dependency.proxyModule.originalModule }); @@ -97868,9 +97982,9 @@ class HashedModuleIdsPlugin { const ident = getFullModuleName(module, context, compiler.root); const hash = createHash(options.hashFunction); hash.update(ident || ""); - const hashId = /** @type {string} */ (hash.digest( - options.hashDigest - )); + const hashId = /** @type {string} */ ( + hash.digest(options.hashDigest) + ); let len = options.hashDigestLength; while (usedIds.has(hashId.substr(0, len))) len++; const moduleId = hashId.substr(0, len); @@ -98781,9 +98895,8 @@ class OccurrenceModuleIdsPlugin { connections ] of moduleGraph.getIncomingConnectionsByOriginModule(module)) { if (!originModule) continue; - const chunkModules = chunkGraph.getNumberOfModuleChunks( - originModule - ); + const chunkModules = + chunkGraph.getNumberOfModuleChunks(originModule); for (const c of connections) { if (!c.isTargetActive(undefined)) continue; if (!c.dependency) continue; @@ -98898,9 +99011,11 @@ const memoize = __webpack_require__(18003); */ const lazyFunction = factory => { const fac = memoize(factory); - const f = /** @type {any} */ ((...args) => { - return fac()(...args); - }); + const f = /** @type {any} */ ( + (...args) => { + return fac()(...args); + } + ); return /** @type {T} */ (f); }; @@ -99464,9 +99579,8 @@ class ArrayPushCallbackChunkFormatPlugin { chunk instanceof HotUpdateChunk ? chunk : null; const globalObject = runtimeTemplate.outputOptions.globalObject; const source = new ConcatSource(); - const runtimeModules = chunkGraph.getChunkRuntimeModulesInOrder( - chunk - ); + const runtimeModules = + chunkGraph.getChunkRuntimeModulesInOrder(chunk); if (hotUpdateChunk) { const hotUpdateGlobal = runtimeTemplate.outputOptions.hotUpdateGlobal; @@ -99500,9 +99614,8 @@ class ArrayPushCallbackChunkFormatPlugin { chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) ); if (runtimeModules.length > 0 || entries.length > 0) { - const strictBailout = hooks.strictRuntimeBailout.call( - renderContext - ); + const strictBailout = + hooks.strictRuntimeBailout.call(renderContext); const runtime = new ConcatSource( (runtimeTemplate.supportsArrowFunction() ? "__webpack_require__ =>" @@ -100125,9 +100238,8 @@ class CommonJsChunkFormatPlugin { source.add(`exports.modules = `); source.add(modules); source.add(";\n"); - const runtimeModules = chunkGraph.getChunkRuntimeModulesInOrder( - chunk - ); + const runtimeModules = + chunkGraph.getChunkRuntimeModulesInOrder(chunk); if (runtimeModules.length > 0) { source.add("exports.runtime =\n"); source.add( @@ -100559,7 +100671,9 @@ class JavascriptGenerator extends Generator { * @returns {void} */ sourceDependency(module, dependency, initFragments, source, generateContext) { - const constructor = /** @type {new (...args: any[]) => Dependency} */ (dependency.constructor); + const constructor = /** @type {new (...args: any[]) => Dependency} */ ( + dependency.constructor + ); const template = generateContext.dependencyTemplates.get(constructor); if (!template) { throw new Error( @@ -100837,10 +100951,11 @@ class JavascriptModulesPlugin { chunk instanceof HotUpdateChunk ? chunk : null; let render; - const filenameTemplate = JavascriptModulesPlugin.getChunkFilenameTemplate( - chunk, - outputOptions - ); + const filenameTemplate = + JavascriptModulesPlugin.getChunkFilenameTemplate( + chunk, + outputOptions + ); if (hotUpdateChunk) { render = () => this.renderChunk( @@ -101003,9 +101118,8 @@ class JavascriptModulesPlugin { compilation.hooks.executeModule.tap( "JavascriptModulesPlugin", (options, context) => { - const source = options.codeGenerationResult.sources.get( - "javascript" - ); + const source = + options.codeGenerationResult.sources.get("javascript"); if (source === undefined) return; const { module, moduleObject } = options; const code = source.source(); @@ -101077,12 +101191,8 @@ class JavascriptModulesPlugin { * @returns {Source} the newly generated source from rendering */ renderModule(module, renderContext, hooks, factory) { - const { - chunk, - chunkGraph, - runtimeTemplate, - codeGenerationResults - } = renderContext; + const { chunk, chunkGraph, runtimeTemplate, codeGenerationResults } = + renderContext; try { const moduleSource = codeGenerationResults.getSource( module, @@ -101308,9 +101418,8 @@ class JavascriptModulesPlugin { ); } - const runtimeModules = renderContext.chunkGraph.getChunkRuntimeModulesInOrder( - chunk - ); + const runtimeModules = + renderContext.chunkGraph.getChunkRuntimeModulesInOrder(chunk); if (runtimeModules.length > 0) { source.add( @@ -101594,9 +101703,8 @@ class JavascriptModulesPlugin { if (chunkGraph.getNumberOfEntryModules(chunk) > 0) { /** @type {string[]} */ const buf2 = []; - const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements( - chunk - ); + const runtimeRequirements = + chunkGraph.getTreeRuntimeRequirements(chunk); buf2.push("// Load entry module and return exports"); let i = chunkGraph.getNumberOfEntryModules(chunk); for (const [ @@ -101653,10 +101761,8 @@ class JavascriptModulesPlugin { } i--; const moduleId = chunkGraph.getModuleId(entryModule); - const entryRuntimeRequirements = chunkGraph.getModuleRuntimeRequirements( - entryModule, - chunk.runtime - ); + const entryRuntimeRequirements = + chunkGraph.getModuleRuntimeRequirements(entryModule, chunk.runtime); let moduleIdExpr = JSON.stringify(moduleId); if (runtimeRequirements.has(RuntimeGlobals.entryModuleId)) { moduleIdExpr = `${RuntimeGlobals.entryModuleId} = ${moduleIdExpr}`; @@ -105222,8 +105328,10 @@ class JavascriptParser extends Parser { if (expr.superClass && !this.isPure(expr.superClass, expr.range[0])) { return false; } - const items = /** @type {(MethodDefinitionNode | PropertyDefinitionNode)[]} */ (expr - .body.body); + const items = + /** @type {(MethodDefinitionNode | PropertyDefinitionNode)[]} */ ( + expr.body.body + ); return items.every( item => (!item.computed || @@ -105509,10 +105617,8 @@ class JavascriptParser extends Parser { let callee = object.callee; let rootMembers = EMPTY_ARRAY; if (callee.type === "MemberExpression") { - ({ - object: callee, - members: rootMembers - } = this.extractMemberExpressionChain(callee)); + ({ object: callee, members: rootMembers } = + this.extractMemberExpressionChain(callee)); } const rootName = getRootName(callee); if (!rootName) return undefined; @@ -105615,8 +105721,10 @@ class JavascriptParser extends Parser { module.exports = JavascriptParser; module.exports.ALLOWED_MEMBER_TYPES_ALL = ALLOWED_MEMBER_TYPES_ALL; -module.exports.ALLOWED_MEMBER_TYPES_EXPRESSION = ALLOWED_MEMBER_TYPES_EXPRESSION; -module.exports.ALLOWED_MEMBER_TYPES_CALL_EXPRESSION = ALLOWED_MEMBER_TYPES_CALL_EXPRESSION; +module.exports.ALLOWED_MEMBER_TYPES_EXPRESSION = + ALLOWED_MEMBER_TYPES_EXPRESSION; +module.exports.ALLOWED_MEMBER_TYPES_CALL_EXPRESSION = + ALLOWED_MEMBER_TYPES_CALL_EXPRESSION; /***/ }), @@ -106721,8 +106829,10 @@ const AbstractLibraryPlugin = __webpack_require__(66269); /** @typedef {import("../util/Hash")} Hash */ /** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext} LibraryContext */ -const KEYWORD_REGEX = /^(await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|super|switch|static|this|throw|try|true|typeof|var|void|while|with|yield)$/; -const IDENTIFIER_REGEX = /^[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*$/iu; +const KEYWORD_REGEX = + /^(await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|super|switch|static|this|throw|try|true|typeof|var|void|while|with|yield)$/; +const IDENTIFIER_REGEX = + /^[\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*$/iu; /** * Validates the library name by checking for keywords and valid characters @@ -108856,6 +108966,7 @@ class NodeEnvironmentPlugin { ); compiler.hooks.beforeRun.tap("NodeEnvironmentPlugin", compiler => { if (compiler.inputFileSystem === inputFileSystem) { + compiler.fsStartTime = Date.now(); inputFileSystem.purge(); } }); @@ -109094,11 +109205,12 @@ class NodeWatchFileSystem { } this.watcher.once("aggregated", (changes, removals) => { if (this.inputFileSystem && this.inputFileSystem.purge) { + const fs = this.inputFileSystem; for (const item of changes) { - this.inputFileSystem.purge(item); + fs.purge(item); } for (const item of removals) { - this.inputFileSystem.purge(item); + fs.purge(item); } } const times = this.watcher.getTimeInfoEntries(); @@ -109123,10 +109235,24 @@ class NodeWatchFileSystem { } }, getAggregatedRemovals: () => { - return this.watcher && this.watcher.aggregatedRemovals; + const items = this.watcher && this.watcher.aggregatedRemovals; + if (items && this.inputFileSystem && this.inputFileSystem.purge) { + const fs = this.inputFileSystem; + for (const item of items) { + fs.purge(item); + } + } + return items; }, getAggregatedChanges: () => { - return this.watcher && this.watcher.aggregatedChanges; + const items = this.watcher && this.watcher.aggregatedChanges; + if (items && this.inputFileSystem && this.inputFileSystem.purge) { + const fs = this.inputFileSystem; + for (const item of items) { + fs.purge(item); + } + } + return items; }, getFileTimeInfoEntries: () => { if (this.watcher) { @@ -110213,10 +110339,11 @@ class AggressiveSplittingPlugin { // Precompute stuff const nameToModuleMap = new Map(); const moduleToNameMap = new Map(); - const makePathsRelative = identifierUtils.makePathsRelative.bindContextCache( - compiler.context, - compiler.root - ); + const makePathsRelative = + identifierUtils.makePathsRelative.bindContextCache( + compiler.context, + compiler.root + ); for (const m of compilation.modules) { const name = makePathsRelative(m.identifier()); nameToModuleMap.set(name, m); @@ -110446,6 +110573,7 @@ module.exports = AggressiveSplittingPlugin; const eslintScope = __webpack_require__(86074); +const Referencer = __webpack_require__(14186); const { CachedSource, ConcatSource, @@ -110498,6 +110626,14 @@ const { /** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */ /** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ +// fix eslint-scope to support class properties correctly +// cspell:word Referencer +const ReferencerClass = Referencer; +if (!ReferencerClass.prototype.PropertyDefinition) { + ReferencerClass.prototype.PropertyDefinition = + ReferencerClass.prototype.Property; +} + /** * @typedef {Object} ReexportInfo * @property {Module} module @@ -110821,10 +110957,9 @@ const getFinalBinding = ( } const directExport = info.exportMap && info.exportMap.get(exportId); if (directExport) { - const usedName = /** @type {string[]} */ (exportsInfo.getUsedName( - exportName, - runtime - )); + const usedName = /** @type {string[]} */ ( + exportsInfo.getUsedName(exportName, runtime) + ); if (!usedName) { return { info, @@ -110883,10 +111018,9 @@ const getFinalBinding = ( ); } if (info.namespaceExportSymbol) { - const usedName = /** @type {string[]} */ (exportsInfo.getUsedName( - exportName, - runtime - )); + const usedName = /** @type {string[]} */ ( + exportsInfo.getUsedName(exportName, runtime) + ); return { info, rawName: info.namespaceObjectName, @@ -110902,10 +111036,9 @@ const getFinalBinding = ( } case "external": { - const used = /** @type {string[]} */ (exportsInfo.getUsedName( - exportName, - runtime - )); + const used = /** @type {string[]} */ ( + exportsInfo.getUsedName(exportName, runtime) + ); if (!used) { return { info, @@ -111323,8 +111456,9 @@ class ConcatenatedModule extends Module { }) .map(connection => ({ connection, - sourceOrder: /** @type {HarmonyImportDependency} */ (connection.dependency) - .sourceOrder + sourceOrder: /** @type {HarmonyImportDependency} */ ( + connection.dependency + ).sourceOrder })); references.sort( concatComparators(bySourceOrder, keepOriginalOrder(references)) @@ -111602,13 +111736,11 @@ class ConcatenatedModule extends Module { true ); if (!binding.ids) continue; - const { - usedNames, - alreadyCheckedScopes - } = getUsedNamesInScopeInfo( - binding.info.module.identifier(), - "name" in binding ? binding.name : "" - ); + const { usedNames, alreadyCheckedScopes } = + getUsedNamesInScopeInfo( + binding.info.module.identifier(), + "name" in binding ? binding.name : "" + ); for (const expr of getSuperClassExpressions(reference.from)) { if ( expr.range[0] <= reference.identifier.range[0] && @@ -111801,9 +111933,9 @@ class ConcatenatedModule extends Module { /** @type {Set} */ const unusedExports = new Set(); - const rootInfo = /** @type {ConcatenatedModuleInfo} */ (moduleToInfoMap.get( - this.rootModule - )); + const rootInfo = /** @type {ConcatenatedModuleInfo} */ ( + moduleToInfoMap.get(this.rootModule) + ); const strictHarmonyModule = rootInfo.module.buildMeta.strictHarmonyModule; const exportsInfo = moduleGraph.getExportsInfo(rootInfo.module); for (const exportInfo of exportsInfo.orderedExports) { @@ -111971,9 +112103,8 @@ ${defineGetters}` )}\n` ); runtimeRequirements.add(RuntimeGlobals.require); - const { - runtimeCondition - } = /** @type {ExternalModuleInfo | ReferenceToModuleInfo} */ (rawInfo); + const { runtimeCondition } = + /** @type {ExternalModuleInfo | ReferenceToModuleInfo} */ (rawInfo); const condition = runtimeTemplate.runtimeConditionExpression({ chunkGraph, runtimeCondition, @@ -112434,9 +112565,8 @@ class FlagIncludedChunksPlugin { for (const chunkA of chunks) { const chunkAHash = chunkModulesHash.get(chunkA); - const chunkAModulesCount = chunkGraph.getNumberOfChunkModules( - chunkA - ); + const chunkAModulesCount = + chunkGraph.getNumberOfChunkModules(chunkA); if (chunkAModulesCount === 0) continue; let bestModule = undefined; for (const module of chunkGraph.getChunkModulesIterable(chunkA)) { @@ -112454,9 +112584,8 @@ class FlagIncludedChunksPlugin { // skip if we find ourselves if (chunkA === chunkB) continue; - const chunkBModulesCount = chunkGraph.getNumberOfChunkModules( - chunkB - ); + const chunkBModulesCount = + chunkGraph.getNumberOfChunkModules(chunkB); // ids for empty chunks are not included if (chunkBModulesCount === 0) continue; @@ -112597,10 +112726,9 @@ exports.addUsage = (state, symbol, usage) => { */ exports.addVariableUsage = (parser, name, usage) => { const symbol = - /** @type {TopLevelSymbol} */ (parser.getTagData( - name, - topLevelSymbolTag - )) || exports.tagTopLevelSymbol(parser, name); + /** @type {TopLevelSymbol} */ ( + parser.getTagData(name, topLevelSymbolTag) + ) || exports.tagTopLevelSymbol(parser, name); if (symbol) { exports.addUsage(parser.state, symbol, usage); } @@ -112673,9 +112801,9 @@ exports.inferDependencyUsage = state => { /** @type {Map>} */ for (const [symbol, callbacks] of usageCallbackMap) { - const usage = /** @type {true | Set | undefined} */ (innerGraph.get( - symbol - )); + const usage = /** @type {true | Set | undefined} */ ( + innerGraph.get(symbol) + ); for (const callback of callbacks) { callback(usage === undefined ? false : usage); } @@ -112743,10 +112871,9 @@ exports.tagTopLevelSymbol = (parser, name) => { parser.defineVariable(name); - const existingTag = /** @type {TopLevelSymbol} */ (parser.getTagData( - name, - topLevelSymbolTag - )); + const existingTag = /** @type {TopLevelSymbol} */ ( + parser.getTagData(name, topLevelSymbolTag) + ); if (existingTag) { return existingTag; } @@ -113130,7 +113257,9 @@ class InnerGraphPlugin { parser.hooks.expression .for(topLevelSymbolTag) .tap("InnerGraphPlugin", () => { - const topLevelSymbol = /** @type {TopLevelSymbol} */ (parser.currentTagData); + const topLevelSymbol = /** @type {TopLevelSymbol} */ ( + parser.currentTagData + ); const currentTopLevelSymbol = InnerGraph.getTopLevelSymbol( parser.state ); @@ -114198,9 +114327,8 @@ class ModuleConcatenationPlugin { } } else { statsEmptyConfigurations++; - const optimizationBailouts = moduleGraph.getOptimizationBailout( - currentRoot - ); + const optimizationBailouts = + moduleGraph.getOptimizationBailout(currentRoot); for (const warning of currentConfiguration.getWarningsSorted()) { optimizationBailouts.push( formatBailoutWarning(warning[0], warning[1]) @@ -114456,20 +114584,18 @@ class ModuleConcatenationPlugin { const moduleGraph = compilation.moduleGraph; - const incomingConnections = moduleGraph.getIncomingConnectionsByOriginModule( - module - ); + const incomingConnections = + moduleGraph.getIncomingConnectionsByOriginModule(module); const incomingConnectionsFromNonModules = incomingConnections.get(null) || incomingConnections.get(undefined); if (incomingConnectionsFromNonModules) { - const activeNonModulesConnections = incomingConnectionsFromNonModules.filter( - connection => { + const activeNonModulesConnections = + incomingConnectionsFromNonModules.filter(connection => { // We are not interested in inactive connections // or connections without dependency return connection.isActive(runtime) || connection.dependency; - } - ); + }); if (activeNonModulesConnections.length > 0) { const problem = requestShortener => { const importingExplanations = new Set( @@ -114949,24 +115075,22 @@ class RealContentHashPlugin { cacheAnalyse.getLazyHashedEtag(source), Array.from(hashes).join("|") ); - [ - asset.referencedHashes, - asset.ownHashes - ] = await cacheAnalyse.providePromise(name, etag, () => { - const referencedHashes = new Set(); - let ownHashes = new Set(); - const inContent = content.match(hashRegExp); - if (inContent) { - for (const hash of inContent) { - if (hashes.has(hash)) { - ownHashes.add(hash); - continue; + [asset.referencedHashes, asset.ownHashes] = + await cacheAnalyse.providePromise(name, etag, () => { + const referencedHashes = new Set(); + let ownHashes = new Set(); + const inContent = content.match(hashRegExp); + if (inContent) { + for (const hash of inContent) { + if (hashes.has(hash)) { + ownHashes.add(hash); + continue; + } + referencedHashes.add(hash); } - referencedHashes.add(hash); } - } - return [referencedHashes, ownHashes]; - }); + return [referencedHashes, ownHashes]; + }); }) ); const getDependencies = hash => { @@ -115505,11 +115629,12 @@ class SideEffectsFlagPlugin { if (module.factoryMeta === undefined) { module.factoryMeta = {}; } - const hasSideEffects = SideEffectsFlagPlugin.moduleHasSideEffects( - resolveData.relativePath, - sideEffects, - cache - ); + const hasSideEffects = + SideEffectsFlagPlugin.moduleHasSideEffects( + resolveData.relativePath, + sideEffects, + cache + ); module.factoryMeta.sideEffectFree = !hasSideEffects; } } @@ -115925,7 +116050,10 @@ const MinMaxSizeWarning = __webpack_require__(77877); const defaultGetName = /** @type {GetName} */ (() => {}); -const deterministicGroupingForModules = /** @type {function(DeterministicGroupingOptionsForModule): DeterministicGroupingGroupedItemsForModule[]} */ (deterministicGrouping); +const deterministicGroupingForModules = + /** @type {function(DeterministicGroupingOptionsForModule): DeterministicGroupingGroupedItemsForModule[]} */ ( + deterministicGrouping + ); /** @type {WeakMap} */ const getKeyCache = new WeakMap(); @@ -115936,9 +116064,11 @@ const getKeyCache = new WeakMap(); * @returns {string} hashed filename */ const hashFilename = (name, outputOptions) => { - const digest = /** @type {string} */ (createHash(outputOptions.hashFunction) - .update(name) - .digest(outputOptions.hashDigest)); + const digest = /** @type {string} */ ( + createHash(outputOptions.hashFunction) + .update(name) + .digest(outputOptions.hashDigest) + ); return digest.slice(0, 8); }; @@ -116702,10 +116832,8 @@ module.exports = class SplitChunksPlugin { const getCombinations = key => getCombinationsFactory()(key); const getExportsCombinationsFactory = memoize(() => { - const { - chunkSetsInGraph, - singleChunkSets - } = getExportsChunkSetsInGraph(); + const { chunkSetsInGraph, singleChunkSets } = + getExportsChunkSetsInGraph(); return createGetCombinations( chunkSetsInGraph, singleChunkSets, @@ -116945,13 +117073,8 @@ module.exports = class SplitChunksPlugin { chunkCombination instanceof Chunk ? 1 : chunkCombination.size; if (count < cacheGroup.minChunks) continue; // Select chunks by configuration - const { - chunks: selectedChunks, - key: selectedChunksKey - } = getSelectedChunks( - chunkCombination, - cacheGroup.chunksFilter - ); + const { chunks: selectedChunks, key: selectedChunksKey } = + getSelectedChunks(chunkCombination, cacheGroup.chunksFilter); addModuleToChunksInfoMap( cacheGroup, @@ -119399,14 +119522,15 @@ class EnsureChunkRuntimeModule extends RuntimeModule { `${handlers} = {};`, "// This file contains only the entry chunk.", "// The chunk loading function for additional chunks", - `${ - RuntimeGlobals.ensureChunk - } = ${runtimeTemplate.basicFunction("chunkId", [ - `return Promise.all(Object.keys(${handlers}).reduce(${runtimeTemplate.basicFunction( - "promises, key", - [`${handlers}[key](chunkId, promises);`, "return promises;"] - )}, []));` - ])};` + `${RuntimeGlobals.ensureChunk} = ${runtimeTemplate.basicFunction( + "chunkId", + [ + `return Promise.all(Object.keys(${handlers}).reduce(${runtimeTemplate.basicFunction( + "promises, key", + [`${handlers}[key](chunkId, promises);`, "return promises;"] + )}, []));` + ] + )};` ]); } else { // There ensureChunk is used somewhere in the tree, so we need an empty requireEnsure @@ -119998,9 +120122,8 @@ class LoadScriptRuntimeModule extends HelperRuntimeModule { } = outputOptions; const fn = RuntimeGlobals.loadScript; - const { createScript } = LoadScriptRuntimeModule.getCompilationHooks( - compilation - ); + const { createScript } = + LoadScriptRuntimeModule.getCompilationHooks(compilation); const code = Template.asString([ "script = document.createElement('script');", @@ -120165,49 +120288,50 @@ class OnChunksLoadedRuntimeModule extends RuntimeModule { const { runtimeTemplate } = compilation; return Template.asString([ "var deferred = [];", - `${ - RuntimeGlobals.onChunksLoaded - } = ${runtimeTemplate.basicFunction("result, chunkIds, fn, priority", [ - "if(chunkIds) {", - Template.indent([ - "priority = priority || 0;", - "for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];", - "deferred[i] = [chunkIds, fn, priority];", - "return;" - ]), - "}", - "var notFulfilled = Infinity;", - "for (var i = 0; i < deferred.length; i++) {", - Template.indent([ - runtimeTemplate.destructureArray( - ["chunkIds", "fn", "priority"], - "deferred[i]" - ), - "var fulfilled = true;", - "for (var j = 0; j < chunkIds.length; j++) {", + `${RuntimeGlobals.onChunksLoaded} = ${runtimeTemplate.basicFunction( + "result, chunkIds, fn, priority", + [ + "if(chunkIds) {", Template.indent([ - `if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(${ - RuntimeGlobals.onChunksLoaded - }).every(${runtimeTemplate.returningFunction( - `${RuntimeGlobals.onChunksLoaded}[key](chunkIds[j])`, - "key" - )})) {`, - Template.indent(["chunkIds.splice(j--, 1);"]), - "} else {", + "priority = priority || 0;", + "for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];", + "deferred[i] = [chunkIds, fn, priority];", + "return;" + ]), + "}", + "var notFulfilled = Infinity;", + "for (var i = 0; i < deferred.length; i++) {", + Template.indent([ + runtimeTemplate.destructureArray( + ["chunkIds", "fn", "priority"], + "deferred[i]" + ), + "var fulfilled = true;", + "for (var j = 0; j < chunkIds.length; j++) {", Template.indent([ - "fulfilled = false;", - "if(priority < notFulfilled) notFulfilled = priority;" + `if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(${ + RuntimeGlobals.onChunksLoaded + }).every(${runtimeTemplate.returningFunction( + `${RuntimeGlobals.onChunksLoaded}[key](chunkIds[j])`, + "key" + )})) {`, + Template.indent(["chunkIds.splice(j--, 1);"]), + "} else {", + Template.indent([ + "fulfilled = false;", + "if(priority < notFulfilled) notFulfilled = priority;" + ]), + "}" ]), + "}", + "if(fulfilled) {", + Template.indent(["deferred.splice(i--, 1)", "result = fn();"]), "}" ]), "}", - "if(fulfilled) {", - Template.indent(["deferred.splice(i--, 1)", "result = fn();"]), - "}" - ]), - "}", - "return result;" - ])};` + "return result;" + ] + )};` ]); } } @@ -120600,10 +120724,25 @@ module.exports = SystemContextRuntimeModule; const NormalModule = __webpack_require__(88376); -const { getMimetype, decodeDataURI } = __webpack_require__(84695); /** @typedef {import("../Compiler")} Compiler */ +// data URL scheme: "data:text/javascript;charset=utf-8;base64,some-string" +// http://www.ietf.org/rfc/rfc2397.txt +const URIRegEx = /^data:(?:[^;,]+)?(?:(?:;[^;,]+)*?)(;base64)?,(.*)$/i; +const URIMetaRegEx = /^data:([^;,]+)?(?:(?:;[^;,]+)*?)(?:;(base64))?,/i; + +const decodeDataURI = uri => { + const match = URIRegEx.exec(uri); + if (!match) return null; + + const isBase64 = match[1]; + const body = match[2]; + return isBase64 + ? Buffer.from(body, "base64") + : Buffer.from(decodeURIComponent(body), "ascii"); +}; + class DataUriPlugin { /** * Apply the plugin @@ -120617,7 +120756,11 @@ class DataUriPlugin { normalModuleFactory.hooks.resolveForScheme .for("data") .tap("DataUriPlugin", resourceData => { - resourceData.data.mimetype = getMimetype(resourceData.resource); + const match = URIMetaRegEx.exec(resourceData.resource); + if (match) { + resourceData.data.mimetype = match[1] || ""; + resourceData.data.encoding = match[2] || false; + } }); NormalModule.getCompilationHooks(compilation) .readResourceForScheme.for("data") @@ -120958,6 +121101,9 @@ const F64_SIZE = 8; const MEASURE_START_OPERATION = Symbol("MEASURE_START_OPERATION"); const MEASURE_END_OPERATION = Symbol("MEASURE_END_OPERATION"); +/** @typedef {typeof MEASURE_START_OPERATION} MEASURE_START_OPERATION_TYPE */ +/** @typedef {typeof MEASURE_END_OPERATION} MEASURE_END_OPERATION_TYPE */ + const identifyNumber = n => { if (n === (n | 0)) { if (n <= 127 && n >= -128) return 0; @@ -121059,9 +121205,8 @@ class BinaryMiddleware extends SerializerMiddleware { if (!SerializerMiddleware.isLazy(thing)) throw new Error("Unexpected function " + thing); /** @type {SerializedType | (() => SerializedType)} */ - let serializedData = SerializerMiddleware.getLazySerializedValue( - thing - ); + let serializedData = + SerializerMiddleware.getLazySerializedValue(thing); if (serializedData === undefined) { if (SerializerMiddleware.isLazy(thing, this)) { const data = this._serialize(thing(), context); @@ -121958,7 +122103,9 @@ const serialize = async (middleware, data, name, writeFile) => { const backgroundJobs = []; const resolvedData = ( await Promise.all( - /** @type {Promise[]} */ (processedData) + /** @type {Promise[]} */ ( + processedData + ) ) ).map(item => { if (Array.isArray(item) || Buffer.isBuffer(item)) return item; @@ -122872,9 +123019,8 @@ class ObjectMiddleware extends SerializerMiddleware { ); } - const { request, name, serializer } = ObjectMiddleware.getSerializerFor( - item - ); + const { request, name, serializer } = + ObjectMiddleware.getSerializerFor(item); const key = `${request}/${name}`; const lastIndex = objectTypeLookup.get(key); @@ -122922,9 +123068,8 @@ class ObjectMiddleware extends SerializerMiddleware { if (!SerializerMiddleware.isLazy(item)) throw new Error("Unexpected function " + item); /** @type {SerializedType} */ - const serializedData = SerializerMiddleware.getLazySerializedValue( - item - ); + const serializedData = + SerializerMiddleware.getLazySerializedValue(item); if (serializedData !== undefined) { if (typeof serializedData === "function") { result.push(serializedData); @@ -122961,7 +123106,13 @@ class ObjectMiddleware extends SerializerMiddleware { // This happens because the optimized code v8 generates // is optimized for our "ctx.write" method so it will reference // it from e. g. Dependency.prototype.serialize -(IC)-> ctx.write - data = result = referenceable = bufferDedupeMap = objectTypeLookup = ctx = undefined; + data = + result = + referenceable = + bufferDedupeMap = + objectTypeLookup = + ctx = + undefined; } } @@ -125534,7 +125685,6 @@ const ModuleDependency = __webpack_require__(5462); const formatLocation = __webpack_require__(82476); const { LogType } = __webpack_require__(26655); const AggressiveSplittingPlugin = __webpack_require__(13461); -const ConcatenatedModule = __webpack_require__(74233); const SizeLimitsPlugin = __webpack_require__(84693); const { countIterable } = __webpack_require__(23039); const { @@ -126602,9 +126752,8 @@ const SIMPLE_EXTRACTORS = { const { compilation, type } = context; const built = compilation.builtModules.has(module); const codeGenerated = compilation.codeGeneratedModules.has(module); - const buildTimeExecuted = compilation.buildTimeExecutedModules.has( - module - ); + const buildTimeExecuted = + compilation.buildTimeExecutedModules.has(module); /** @type {{[x: string]: number}} */ const sizes = {}; for (const sourceType of module.getSourceTypes()) { @@ -126752,11 +126901,13 @@ const SIMPLE_EXTRACTORS = { }, nestedModules: (object, module, context, options, factory) => { const { type } = context; - if (module instanceof ConcatenatedModule) { - const modules = module.modules; + const innerModules = /** @type {Module & { modules?: Module[] }} */ ( + module + ).modules; + if (Array.isArray(innerModules)) { const groupedModules = factory.create( `${type.slice(0, -8)}.modules`, - modules, + innerModules, context ); const limited = spaceLimited( @@ -129003,9 +129154,8 @@ const SIMPLE_ITEMS_JOINER = { "asset.chunkNames": itemsJoinCommaBracketsWithName("name"), "asset.auxiliaryChunkNames": itemsJoinCommaBracketsWithName("auxiliary name"), "asset.chunkIdHints": itemsJoinCommaBracketsWithName("id hint"), - "asset.auxiliaryChunkIdHints": itemsJoinCommaBracketsWithName( - "auxiliary id hint" - ), + "asset.auxiliaryChunkIdHints": + itemsJoinCommaBracketsWithName("auxiliary id hint"), "module.chunks": itemsJoinOneLine, "module.issuerPath": items => items @@ -129097,11 +129247,13 @@ const joinExplicitNewLine = (items, indenter) => { .trim(); }; -const joinError = error => (items, { red, yellow }) => - `${error ? red("ERROR") : yellow("WARNING")} in ${joinExplicitNewLine( - items, - "" - )}`; +const joinError = + error => + (items, { red, yellow }) => + `${error ? red("ERROR") : yellow("WARNING")} in ${joinExplicitNewLine( + items, + "" + )}`; /** @type {Record string>} */ const SIMPLE_ELEMENT_JOINERS = { @@ -129315,7 +129467,8 @@ const AVAILABLE_FORMATS = { format: red }, { - regExp: /\b(error|failed|unexpected|invalid|not found|not supported|not available|not possible|not implemented|doesn't support|conflict|conflicting|not existing|duplicate)\b/gi, + regExp: + /\b(error|failed|unexpected|invalid|not found|not supported|not available|not possible|not implemented|doesn't support|conflict|conflicting|not existing|duplicate)\b/gi, format: red } ]; @@ -129535,7 +129688,8 @@ class StatsFactory { getItemFactory: new HookMap(() => new SyncBailHook(["item", "context"])) }); const hooks = this.hooks; - this._caches = /** @type {Record[]>>} */ ({}); + this._caches = + /** @type {Record[]>>} */ ({}); for (const key of Object.keys(hooks)) { this._caches[key] = new Map(); } @@ -129850,9 +130004,9 @@ class StatsPrinter { * @returns {T[]} hooks */ _getAllLevelHooks(hookMap, type) { - let cache = /** @type {Map} */ (this._levelHookCache.get( - hookMap - )); + let cache = /** @type {Map} */ ( + this._levelHookCache.get(hookMap) + ); if (cache === undefined) { cache = new Map(); this._levelHookCache.set(hookMap, cache); @@ -130517,46 +130671,6 @@ class AsyncQueue { module.exports = AsyncQueue; -/***/ }), - -/***/ 84695: -/***/ (function(module) { - -"use strict"; -/* - MIT License http://www.opensource.org/licenses/mit-license.php -*/ - - - -// data URL scheme: "data:text/javascript;charset=utf-8;base64,some-string" -// http://www.ietf.org/rfc/rfc2397.txt -const URIRegEx = /^data:([^;,]+)?((?:;(?:[^;,]+))*?)(;base64)?,(.*)$/i; - -const decodeDataURI = uri => { - const match = URIRegEx.exec(uri); - if (!match) return null; - - const isBase64 = match[3]; - const body = match[4]; - return isBase64 - ? Buffer.from(body, "base64") - : Buffer.from(decodeURIComponent(body), "ascii"); -}; - -const getMimetype = uri => { - const match = URIRegEx.exec(uri); - if (!match) return ""; - - return match[1] || "text/plain"; -}; - -module.exports = { - decodeDataURI, - getMimetype -}; - - /***/ }), /***/ 32: @@ -130826,9 +130940,9 @@ class LazyBucketSortedSet { } }; } else { - const oldEntry = /** @type {LazyBucketSortedSet} */ (this._map.get( - key - )); + const oldEntry = /** @type {LazyBucketSortedSet} */ ( + this._map.get(key) + ); const finishUpdate = oldEntry.startUpdate(item); return remove => { if (remove) { @@ -132901,7 +133015,9 @@ const resolveByProperty = (obj, byProperty, ...values) => { } const { [byProperty]: _byValue, ..._remaining } = /** @type {object} */ (obj); const remaining = /** @type {T} */ (_remaining); - const byValue = /** @type {Record | function(...any[]): T} */ (_byValue); + const byValue = /** @type {Record | function(...any[]): T} */ ( + _byValue + ); if (typeof byValue === "object") { const key = values[0]; if (key in byValue) { @@ -133004,9 +133120,8 @@ const compareModulesById = (chunkGraph, a, b) => { return compareIds(chunkGraph.getModuleId(a), chunkGraph.getModuleId(b)); }; /** @type {ParameterizedComparator} */ -exports.compareModulesById = createCachedParameterizedComparator( - compareModulesById -); +exports.compareModulesById = + createCachedParameterizedComparator(compareModulesById); /** * @param {number} a number @@ -133074,9 +133189,10 @@ const compareModulesByPostOrderIndexOrIdentifier = (moduleGraph, a, b) => { return compareIds(a.identifier(), b.identifier()); }; /** @type {ParameterizedComparator} */ -exports.compareModulesByPostOrderIndexOrIdentifier = createCachedParameterizedComparator( - compareModulesByPostOrderIndexOrIdentifier -); +exports.compareModulesByPostOrderIndexOrIdentifier = + createCachedParameterizedComparator( + compareModulesByPostOrderIndexOrIdentifier + ); /** * @param {ModuleGraph} moduleGraph the module graph @@ -133093,9 +133209,10 @@ const compareModulesByPreOrderIndexOrIdentifier = (moduleGraph, a, b) => { return compareIds(a.identifier(), b.identifier()); }; /** @type {ParameterizedComparator} */ -exports.compareModulesByPreOrderIndexOrIdentifier = createCachedParameterizedComparator( - compareModulesByPreOrderIndexOrIdentifier -); +exports.compareModulesByPreOrderIndexOrIdentifier = + createCachedParameterizedComparator( + compareModulesByPreOrderIndexOrIdentifier + ); /** * @param {ChunkGraph} chunkGraph the chunk graph @@ -133220,10 +133337,9 @@ const concatComparators = (c1, c2, ...cRest) => { const [c3, ...cRest2] = cRest; return concatComparators(c1, concatComparators(c2, c3, ...cRest2)); } - const cacheEntry = /** @type {Comparator} */ (concatComparatorsCache.get( - c1, - c2 - )); + const cacheEntry = /** @type {Comparator} */ ( + concatComparatorsCache.get(c1, c2) + ); if (cacheEntry !== undefined) return cacheEntry; /** * @param {T} a first value @@ -133713,6 +133829,7 @@ class BulkUpdateDecorator extends Hash { */ digest(encoding) { let digestCache; + const buffer = this.buffer; if (this.hash === undefined) { // short data for hash, we can use caching const cacheKey = `${this.hashKey}-${encoding}`; @@ -133720,18 +133837,18 @@ class BulkUpdateDecorator extends Hash { if (digestCache === undefined) { digestCache = digestCaches[cacheKey] = new Map(); } - const cacheEntry = digestCache.get(this.buffer); + const cacheEntry = digestCache.get(buffer); if (cacheEntry !== undefined) return cacheEntry; this.hash = this.hashFactory(); } - if (this.buffer.length > 0) { - this.hash.update(this.buffer); + if (buffer.length > 0) { + this.hash.update(buffer); } const digestResult = this.hash.digest(encoding); const result = typeof digestResult === "string" ? digestResult : digestResult.toString(); if (digestCache !== undefined) { - digestCache.set(this.buffer, result); + digestCache.set(buffer, result); } return result; } @@ -135378,7 +135495,8 @@ const _absolutify = (context, request) => { const absolutify = makeCacheable(_absolutify); exports.absolutify = absolutify; -const PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; +const PATH_QUERY_FRAGMENT_REGEXP = + /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; /** @typedef {{ resource: string, path: string, query: string, fragment: string }} ParsedResource */ @@ -137373,7 +137491,7 @@ exports.satisfyRuntimeCode = runtimeTemplate => /***/ }), /***/ 29158: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* @@ -137382,75 +137500,124 @@ exports.satisfyRuntimeCode = runtimeTemplate => -const BinaryMiddleware = __webpack_require__(99795); -const FileMiddleware = __webpack_require__(84013); -const ObjectMiddleware = __webpack_require__(9814); -const Serializer = __webpack_require__(60338); -const SerializerMiddleware = __webpack_require__(54384); -const SingleItemMiddleware = __webpack_require__(1753); -const internalSerializables = __webpack_require__(60352); +const memoize = __webpack_require__(18003); +/** @typedef {import("../serialization/BinaryMiddleware").MEASURE_END_OPERATION_TYPE} MEASURE_END_OPERATION */ +/** @typedef {import("../serialization/BinaryMiddleware").MEASURE_START_OPERATION_TYPE} MEASURE_START_OPERATION */ /** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */ /** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */ +/** @typedef {import("../serialization/Serializer")} Serializer */ + +const getBinaryMiddleware = memoize(() => + __webpack_require__(99795) +); +const getObjectMiddleware = memoize(() => + __webpack_require__(9814) +); +const getSingleItemMiddleware = memoize(() => + __webpack_require__(1753) +); +const getSerializer = memoize(() => __webpack_require__(60338)); +const getSerializerMiddleware = memoize(() => + __webpack_require__(54384) +); -const { register, registerLoader, registerNotSerializable } = ObjectMiddleware; +const getBinaryMiddlewareInstance = memoize( + () => new (getBinaryMiddleware())() +); -const binaryMiddleware = new BinaryMiddleware(); +const registerSerializers = memoize(() => { + __webpack_require__(26426); -// Expose serialization API -exports.register = register; -exports.registerLoader = registerLoader; -exports.registerNotSerializable = registerNotSerializable; -exports.NOT_SERIALIZABLE = ObjectMiddleware.NOT_SERIALIZABLE; -exports.MEASURE_START_OPERATION = BinaryMiddleware.MEASURE_START_OPERATION; -exports.MEASURE_END_OPERATION = BinaryMiddleware.MEASURE_END_OPERATION; -exports.buffersSerializer = new Serializer([ - new SingleItemMiddleware(), - new ObjectMiddleware(context => { - if (context.write) { - context.writeLazy = value => { - context.write(SerializerMiddleware.createLazy(value, binaryMiddleware)); - }; + // Load internal paths with a relative require + // This allows bundling all internal serializers + const internalSerializables = __webpack_require__(60352); + getObjectMiddleware().registerLoader(/^webpack\/lib\//, req => { + const loader = internalSerializables[req.slice("webpack/lib/".length)]; + if (loader) { + loader(); + } else { + console.warn(`${req} not found in internalSerializables`); } - }), - binaryMiddleware -]); -exports.createFileSerializer = fs => { - const fileMiddleware = new FileMiddleware(fs); - return new Serializer([ - new SingleItemMiddleware(), - new ObjectMiddleware(context => { - if (context.write) { - context.writeLazy = value => { - context.write( - SerializerMiddleware.createLazy(value, binaryMiddleware) - ); - }; - context.writeSeparate = (value, options) => { - context.write( - SerializerMiddleware.createLazy(value, fileMiddleware, options) - ); - }; - } - }), - binaryMiddleware, - fileMiddleware - ]); -}; + return true; + }); +}); -__webpack_require__(26426); +/** @type {Serializer} */ +let buffersSerializer; -// Load internal paths with a relative require -// This allows bundling all internal serializers -registerLoader(/^webpack\/lib\//, req => { - const loader = internalSerializables[req.slice("webpack/lib/".length)]; - if (loader) { - loader(); - } else { - console.warn(`${req} not found in internalSerializables`); +// Expose serialization API +module.exports = { + get register() { + return getObjectMiddleware().register; + }, + get registerLoader() { + return getObjectMiddleware().registerLoader; + }, + get registerNotSerializable() { + return getObjectMiddleware().registerNotSerializable; + }, + get NOT_SERIALIZABLE() { + return getObjectMiddleware().NOT_SERIALIZABLE; + }, + /** @type {MEASURE_START_OPERATION} */ + get MEASURE_START_OPERATION() { + return getBinaryMiddleware().MEASURE_START_OPERATION; + }, + /** @type {MEASURE_END_OPERATION} */ + get MEASURE_END_OPERATION() { + return getBinaryMiddleware().MEASURE_END_OPERATION; + }, + get buffersSerializer() { + if (buffersSerializer !== undefined) return buffersSerializer; + registerSerializers(); + const Serializer = getSerializer(); + const binaryMiddleware = getBinaryMiddlewareInstance(); + const SerializerMiddleware = getSerializerMiddleware(); + const SingleItemMiddleware = getSingleItemMiddleware(); + return (buffersSerializer = new Serializer([ + new SingleItemMiddleware(), + new (getObjectMiddleware())(context => { + if (context.write) { + context.writeLazy = value => { + context.write( + SerializerMiddleware.createLazy(value, binaryMiddleware) + ); + }; + } + }), + binaryMiddleware + ])); + }, + createFileSerializer: fs => { + registerSerializers(); + const Serializer = getSerializer(); + const FileMiddleware = __webpack_require__(84013); + const fileMiddleware = new FileMiddleware(fs); + const binaryMiddleware = getBinaryMiddlewareInstance(); + const SerializerMiddleware = getSerializerMiddleware(); + const SingleItemMiddleware = getSingleItemMiddleware(); + return new Serializer([ + new SingleItemMiddleware(), + new (getObjectMiddleware())(context => { + if (context.write) { + context.writeLazy = value => { + context.write( + SerializerMiddleware.createLazy(value, binaryMiddleware) + ); + }; + context.writeSeparate = (value, options) => { + context.write( + SerializerMiddleware.createLazy(value, fileMiddleware, options) + ); + }; + } + }), + binaryMiddleware, + fileMiddleware + ]); } - return true; -}); +}; /***/ }), @@ -137765,8 +137932,7 @@ const DID_YOU_MEAN = { "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", ecmaversion: "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", - ecma: - "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", + ecma: "output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)", path: "output.path", pathinfo: "output.pathinfo", pathInfo: "output.pathinfo", @@ -137853,7 +138019,10 @@ const validateSchema = (schema, options, validationConfiguration) => { } if (error.keyword === "additionalProperties") { - const params = /** @type {import("ajv").AdditionalPropertiesParams} */ (error.params); + const params = + /** @type {import("ajv").AdditionalPropertiesParams} */ ( + error.params + ); if ( Object.prototype.hasOwnProperty.call( DID_YOU_MEAN, @@ -138359,9 +138528,8 @@ class AsyncWebAssemblyModulesPlugin { compiler.hooks.compilation.tap( "AsyncWebAssemblyModulesPlugin", (compilation, { normalModuleFactory }) => { - const hooks = AsyncWebAssemblyModulesPlugin.getCompilationHooks( - compilation - ); + const hooks = + AsyncWebAssemblyModulesPlugin.getCompilationHooks(compilation); compilation.dependencyFactories.set( WebAssemblyImportDependency, normalModuleFactory @@ -138377,7 +138545,8 @@ class AsyncWebAssemblyModulesPlugin { normalModuleFactory.hooks.createGenerator .for("webassembly/async") .tap("AsyncWebAssemblyModulesPlugin", () => { - const AsyncWebAssemblyJavascriptGenerator = getAsyncWebAssemblyJavascriptGenerator(); + const AsyncWebAssemblyJavascriptGenerator = + getAsyncWebAssemblyJavascriptGenerator(); const AsyncWebAssemblyGenerator = getAsyncWebAssemblyGenerator(); return Generator.byType({ @@ -138987,10 +139156,11 @@ class WasmFinalizeExportsPlugin { connection.originModule.type.startsWith("webassembly") === false ) { - const referencedExports = compilation.getDependencyReferencedExports( - connection.dependency, - undefined - ); + const referencedExports = + compilation.getDependencyReferencedExports( + connection.dependency, + undefined + ); for (const info of referencedExports) { const names = Array.isArray(info) ? info : info.name; @@ -139276,31 +139446,27 @@ const rewriteImportedGlobals = state => bin => { * @param {RuntimeSpec} state.runtime runtime * @returns {ArrayBufferTransform} transform */ -const rewriteExportNames = ({ - ast, - moduleGraph, - module, - externalExports, - runtime -}) => bin => { - return editWithAST(ast, bin, { - ModuleExport(path) { - const isExternal = externalExports.has(path.node.name); - if (isExternal) { - path.remove(); - return; - } - const usedName = moduleGraph - .getExportsInfo(module) - .getUsedName(path.node.name, runtime); - if (!usedName) { - path.remove(); - return; +const rewriteExportNames = + ({ ast, moduleGraph, module, externalExports, runtime }) => + bin => { + return editWithAST(ast, bin, { + ModuleExport(path) { + const isExternal = externalExports.has(path.node.name); + if (isExternal) { + path.remove(); + return; + } + const usedName = moduleGraph + .getExportsInfo(module) + .getUsedName(path.node.name, runtime); + if (!usedName) { + path.remove(); + return; + } + path.node.name = usedName; } - path.node.name = usedName; - } - }); -}; + }); + }; /** * Mangle import names and modules @@ -139309,20 +139475,22 @@ const rewriteExportNames = ({ * @param {Map} state.usedDependencyMap mappings to mangle names * @returns {ArrayBufferTransform} transform */ -const rewriteImports = ({ ast, usedDependencyMap }) => bin => { - return editWithAST(ast, bin, { - ModuleImport(path) { - const result = usedDependencyMap.get( - path.node.module + ":" + path.node.name - ); +const rewriteImports = + ({ ast, usedDependencyMap }) => + bin => { + return editWithAST(ast, bin, { + ModuleImport(path) { + const result = usedDependencyMap.get( + path.node.module + ":" + path.node.name + ); - if (result !== undefined) { - path.node.module = result.module; - path.node.name = result.name; + if (result !== undefined) { + path.node.module = result.module; + path.node.name = result.name; + } } - } - }); -}; + }); + }; /** * Add an init function. @@ -139339,63 +139507,69 @@ const rewriteImports = ({ ast, usedDependencyMap }) => bin => { * @param {t.Index} state.nextTypeIndex index of the next type * @returns {ArrayBufferTransform} transform */ -const addInitFunction = ({ - ast, - initFuncId, - startAtFuncOffset, - importedGlobals, - additionalInitCode, - nextFuncIndex, - nextTypeIndex -}) => bin => { - const funcParams = importedGlobals.map(importedGlobal => { - // used for debugging - const id = t.identifier(`${importedGlobal.module}.${importedGlobal.name}`); - - return t.funcParam(importedGlobal.descr.valtype, id); - }); +const addInitFunction = + ({ + ast, + initFuncId, + startAtFuncOffset, + importedGlobals, + additionalInitCode, + nextFuncIndex, + nextTypeIndex + }) => + bin => { + const funcParams = importedGlobals.map(importedGlobal => { + // used for debugging + const id = t.identifier( + `${importedGlobal.module}.${importedGlobal.name}` + ); - const funcBody = []; - importedGlobals.forEach((importedGlobal, index) => { - const args = [t.indexLiteral(index)]; - const body = [ - t.instruction("get_local", args), - t.instruction("set_global", args) - ]; + return t.funcParam(importedGlobal.descr.valtype, id); + }); - funcBody.push(...body); - }); + const funcBody = []; + importedGlobals.forEach((importedGlobal, index) => { + const args = [t.indexLiteral(index)]; + const body = [ + t.instruction("get_local", args), + t.instruction("set_global", args) + ]; - if (typeof startAtFuncOffset === "number") { - funcBody.push(t.callInstruction(t.numberLiteralFromRaw(startAtFuncOffset))); - } + funcBody.push(...body); + }); - for (const instr of additionalInitCode) { - funcBody.push(instr); - } + if (typeof startAtFuncOffset === "number") { + funcBody.push( + t.callInstruction(t.numberLiteralFromRaw(startAtFuncOffset)) + ); + } - funcBody.push(t.instruction("end")); + for (const instr of additionalInitCode) { + funcBody.push(instr); + } - const funcResults = []; + funcBody.push(t.instruction("end")); - // Code section - const funcSignature = t.signature(funcParams, funcResults); - const func = t.func(initFuncId, funcSignature, funcBody); + const funcResults = []; - // Type section - const functype = t.typeInstruction(undefined, funcSignature); + // Code section + const funcSignature = t.signature(funcParams, funcResults); + const func = t.func(initFuncId, funcSignature, funcBody); - // Func section - const funcindex = t.indexInFuncSection(nextTypeIndex); + // Type section + const functype = t.typeInstruction(undefined, funcSignature); - // Export section - const moduleExport = t.moduleExport( - initFuncId.value, - t.moduleExportDescr("Func", nextFuncIndex) - ); + // Func section + const funcindex = t.indexInFuncSection(nextTypeIndex); - return addWithAST(ast, bin, [func, moduleExport, funcindex, functype]); -}; + // Export section + const moduleExport = t.moduleExport( + initFuncId.value, + t.moduleExportDescr("Func", nextFuncIndex) + ); + + return addWithAST(ast, bin, [func, moduleExport, funcindex, functype]); + }; /** * Extract mangle mappings from module @@ -139483,7 +139657,9 @@ class WebAssemblyGenerator extends Generator { module.dependencies .filter(d => d instanceof WebAssemblyExportImportedDependency) .map(d => { - const wasmDep = /** @type {WebAssemblyExportImportedDependency} */ (d); + const wasmDep = /** @type {WebAssemblyExportImportedDependency} */ ( + d + ); return wasmDep.exportName; }) ); @@ -139940,7 +140116,8 @@ class WebAssemblyModulesPlugin { normalModuleFactory.hooks.createGenerator .for("webassembly/sync") .tap("WebAssemblyModulesPlugin", () => { - const WebAssemblyJavascriptGenerator = getWebAssemblyJavascriptGenerator(); + const WebAssemblyJavascriptGenerator = + getWebAssemblyJavascriptGenerator(); const WebAssemblyGenerator = getWebAssemblyGenerator(); return Generator.byType({ @@ -140117,7 +140294,8 @@ class WebAssemblyParser extends Parser { // extract imports and exports const exports = []; - let jsIncompatibleExports = (state.module.buildMeta.jsIncompatibleExports = undefined); + let jsIncompatibleExports = (state.module.buildMeta.jsIncompatibleExports = + undefined); const importedGlobals = []; t.traverse(module, { @@ -140130,13 +140308,13 @@ class WebAssemblyParser extends Parser { /** @type {t.FuncSignature} */ const funcSignature = moduleContext.getFunction(funcIdx); - const incompatibleType = getJsIncompatibleTypeOfFuncSignature( - funcSignature - ); + const incompatibleType = + getJsIncompatibleTypeOfFuncSignature(funcSignature); if (incompatibleType) { if (jsIncompatibleExports === undefined) { - jsIncompatibleExports = state.module.buildMeta.jsIncompatibleExports = {}; + jsIncompatibleExports = + state.module.buildMeta.jsIncompatibleExports = {}; } jsIncompatibleExports[node.name] = incompatibleType; } @@ -140730,10 +140908,8 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule { scriptType } } = compilation; - const { - linkPreload, - linkPrefetch - } = JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation); + const { linkPreload, linkPrefetch } = + JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation); const fn = RuntimeGlobals.ensureChunkHandlers; const withBaseURI = this._runtimeRequirements.has(RuntimeGlobals.baseURI); const withLoading = this._runtimeRequirements.has( @@ -141183,7 +141359,7 @@ const getValidateSchema = memoize(() => __webpack_require__(19651)); */ /** - * @param {WebpackOptions[]} childOptions options array + * @param {ReadonlyArray} childOptions options array * @param {MultiCompilerOptions} options options * @returns {MultiCompiler} a multi-compiler */ @@ -141239,14 +141415,14 @@ const createCompiler = rawOptions => { /** * @callback WebpackFunctionMulti - * @param {WebpackOptions[] & MultiCompilerOptions} options options objects + * @param {ReadonlyArray & MultiCompilerOptions} options options objects * @param {Callback=} callback callback * @returns {MultiCompiler} the multi compiler object */ const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ ( /** - * @param {WebpackOptions | (WebpackOptions[] & MultiCompilerOptions)} options options + * @param {WebpackOptions | (ReadonlyArray & MultiCompilerOptions)} options options * @param {Callback & Callback=} callback callback * @returns {Compiler | MultiCompiler} */ @@ -141262,14 +141438,18 @@ const webpack = /** @type {WebpackFunctionSingle & WebpackFunctionMulti} */ ( let watchOptions; if (Array.isArray(options)) { /** @type {MultiCompiler} */ - compiler = createMultiCompiler(options, options); + compiler = createMultiCompiler( + options, + /** @type {MultiCompilerOptions} */ (options) + ); watch = options.some(options => options.watch); watchOptions = options.map(options => options.watchOptions || {}); } else { + const webpackOptions = /** @type {WebpackOptions} */ (options); /** @type {Compiler} */ - compiler = createCompiler(options); - watch = options.watch; - watchOptions = options.watchOptions || {}; + compiler = createCompiler(webpackOptions); + watch = webpackOptions.watch; + watchOptions = webpackOptions.watchOptions || {}; } return { compiler, watch, watchOptions }; }; @@ -141689,7 +141869,7 @@ module.exports = WebWorkerTemplatePlugin; * DO NOT MODIFY BY HAND. * Run `yarn special-lint-fix` to update */ -const e=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;module.exports=ke,module.exports.default=ke;const t={amd:{$ref:"#/definitions/Amd"},bail:{$ref:"#/definitions/Bail"},cache:{$ref:"#/definitions/CacheOptions"},context:{$ref:"#/definitions/Context"},dependencies:{$ref:"#/definitions/Dependencies"},devServer:{$ref:"#/definitions/DevServer"},devtool:{$ref:"#/definitions/DevTool"},entry:{$ref:"#/definitions/Entry"},experiments:{$ref:"#/definitions/Experiments"},externals:{$ref:"#/definitions/Externals"},externalsPresets:{$ref:"#/definitions/ExternalsPresets"},externalsType:{$ref:"#/definitions/ExternalsType"},ignoreWarnings:{$ref:"#/definitions/IgnoreWarnings"},infrastructureLogging:{$ref:"#/definitions/InfrastructureLogging"},loader:{$ref:"#/definitions/Loader"},mode:{$ref:"#/definitions/Mode"},module:{$ref:"#/definitions/ModuleOptions"},name:{$ref:"#/definitions/Name"},node:{$ref:"#/definitions/Node"},optimization:{$ref:"#/definitions/Optimization"},output:{$ref:"#/definitions/Output"},parallelism:{$ref:"#/definitions/Parallelism"},performance:{$ref:"#/definitions/Performance"},plugins:{$ref:"#/definitions/Plugins"},profile:{$ref:"#/definitions/Profile"},recordsInputPath:{$ref:"#/definitions/RecordsInputPath"},recordsOutputPath:{$ref:"#/definitions/RecordsOutputPath"},recordsPath:{$ref:"#/definitions/RecordsPath"},resolve:{$ref:"#/definitions/Resolve"},resolveLoader:{$ref:"#/definitions/ResolveLoader"},snapshot:{$ref:"#/definitions/SnapshotOptions"},stats:{$ref:"#/definitions/StatsValue"},target:{$ref:"#/definitions/Target"},watch:{$ref:"#/definitions/Watch"},watchOptions:{$ref:"#/definitions/WatchOptions"}},n=Object.prototype.hasOwnProperty,r={allowCollectingMemory:{type:"boolean"},buildDependencies:{type:"object",additionalProperties:{type:"array",items:{type:"string",minLength:1}}},cacheDirectory:{type:"string",absolutePath:!0},cacheLocation:{type:"string",absolutePath:!0},hashAlgorithm:{type:"string"},idleTimeout:{type:"number",minimum:0},idleTimeoutForInitialStore:{type:"number",minimum:0},immutablePaths:{type:"array",items:{type:"string",absolutePath:!0,minLength:1}},managedPaths:{type:"array",items:{type:"string",absolutePath:!0,minLength:1}},maxAge:{type:"number",minimum:0},maxMemoryGenerations:{type:"number",minimum:0},name:{type:"string"},profile:{type:"boolean"},store:{enum:["pack"]},type:{enum:["filesystem"]},version:{type:"string"}};function s(t,{instancePath:o="",parentData:a,parentDataProperty:i,rootData:l=t}={}){let p=null,f=0;const u=f;let c=!1;const y=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var m=y===f;if(c=c||m,!c){const s=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let e;if(void 0===t.type&&(e="type")){const t={params:{missingProperty:e}};null===p?p=[t]:p.push(t),f++}else{const e=f;for(const e in t)if("maxGenerations"!==e&&"type"!==e){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(e===f){if(void 0!==t.maxGenerations){let e=t.maxGenerations;const n=f;if(f===n)if("number"==typeof e&&isFinite(e)){if(e<1||isNaN(e)){const e={params:{comparison:">=",limit:1}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}var h=n===f}else h=!0;if(h)if(void 0!==t.type){const e=f;if("memory"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}if(m=s===f,c=c||m,!c){const s=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let s;if(void 0===t.type&&(s="type")){const e={params:{missingProperty:s}};null===p?p=[e]:p.push(e),f++}else{const s=f;for(const e in t)if(!n.call(r,e)){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(s===f){if(void 0!==t.allowCollectingMemory){const e=f;if("boolean"!=typeof t.allowCollectingMemory){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}var d=e===f}else d=!0;if(d){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=f;if(f===r)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.idleTimeoutForInitialStore){let e=t.idleTimeoutForInitialStore;const n=f;if(f===n)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r)if(Array.isArray(n)){const t=n.length;for(let r=0;r=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.maxMemoryGenerations){let e=t.maxMemoryGenerations;const n=f;if(f===n)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.name){const e=f;if("string"!=typeof t.name){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.profile){const e=f;if("boolean"!=typeof t.profile){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.store){const e=f;if("pack"!==t.store){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.type){const e=f;if("filesystem"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d)if(void 0!==t.version){const e=f;if("string"!=typeof t.version){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0}}}}}}}}}}}}}}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}m=s===f,c=c||m}}if(!c){const e={params:{}};return null===p?p=[e]:p.push(e),f++,s.errors=p,!1}return f=u,null!==p&&(u?p.length=u:p=null),s.errors=p,0===f}function o(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:a=e}={}){let i=null,l=0;const p=l;let f=!1;const u=l;if(!0!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=u===l;if(f=f||c,!f){const o=l;s(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:a})||(i=null===i?s.errors:i.concat(s.errors),l=i.length),c=o===l,f=f||c}if(!f){const e={params:{}};return null===i?i=[e]:i.push(e),l++,o.errors=i,!1}return l=p,null!==i&&(p?i.length=p:i=null),o.errors=i,0===l}const a={chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},filename:{$ref:"#/definitions/EntryFilename"},import:{$ref:"#/definitions/EntryItem"},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}};function i(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const l=a;let p=!1;const f=a;if(!1!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var u=f===a;if(p=p||u,!p){const t=a,n=a;let r=!1;const s=a;if("jsonp"!==e&&"import-scripts"!==e&&"require"!==e&&"async-node"!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var c=s===a;if(r=r||c,!r){const t=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a,r=r||c}if(r)a=n,null!==o&&(n?o.length=n:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}u=t===a,p=p||u}if(!p){const e={params:{}};return null===o?o=[e]:o.push(e),a++,i.errors=o,!1}return a=l,null!==o&&(l?o.length=l:o=null),i.errors=o,0===a}function l(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:o=t}={}){let a=null,i=0;const p=i;let f=!1,u=null;const c=i,y=i;let m=!1;const h=i;if(i===h)if("string"==typeof t){if(t.includes("!")||!1!==e.test(t)){const e={params:{}};null===a?a=[e]:a.push(e),i++}else if(t.length<1){const e={params:{}};null===a?a=[e]:a.push(e),i++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),i++}var d=h===i;if(m=m||d,!m){const e=i;if(!(t instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),i++}d=e===i,m=m||d}if(m)i=y,null!==a&&(y?a.length=y:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),i++}if(c===i&&(f=!0,u=0),!f){const e={params:{passingSchemas:u}};return null===a?a=[e]:a.push(e),i++,l.errors=a,!1}return i=p,null!==a&&(p?a.length=p:a=null),l.errors=a,0===i}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const f=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var u=f===a;if(l=l||u,!l){const t=a;if(a==a)if(e&&"object"==typeof e&&!Array.isArray(e)){const t=a;for(const t in e)if("amd"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"root"!==t){const e={params:{additionalProperty:t}};null===o?o=[e]:o.push(e),a++;break}if(t===a){if(void 0!==e.amd){const t=a;if("string"!=typeof e.amd){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var c=t===a}else c=!0;if(c){if(void 0!==e.commonjs){const t=a;if("string"!=typeof e.commonjs){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c){if(void 0!==e.commonjs2){const t=a;if("string"!=typeof e.commonjs2){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c)if(void 0!==e.root){const t=a;if("string"!=typeof e.root){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0}}}}else{const e={params:{type:"object"}};null===o?o=[e]:o.push(e),a++}u=t===a,l=l||u}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,p.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),p.errors=o,0===a}function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(a===p)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var g=o===f;if(s=s||g,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}g=e===f,s=s||g}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,m.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.filename){const n=f;l(e.filename,{instancePath:t+"/filename",parentData:e,parentDataProperty:"filename",rootData:o})||(p=null===p?l.errors:p.concat(l.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.import){let t=e.import;const n=f,r=f;let s=!1;const o=f;if(f===o)if(Array.isArray(t))if(t.length<1){const e={params:{limit:1}};null===p?p=[e]:p.push(e),f++}else{var b=!0;const e=t.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var v=o===f;if(s=s||v,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}v=e===f,s=s||v}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,m.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.layer){let t=e.layer;const n=f,r=f;let s=!1;const o=f;if(null!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var D=o===f;if(s=s||D,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}D=e===f,s=s||D}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,m.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.library){const n=f;u(e.library,{instancePath:t+"/library",parentData:e,parentDataProperty:"library",rootData:o})||(p=null===p?u.errors:p.concat(u.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.publicPath){const n=f;c(e.publicPath,{instancePath:t+"/publicPath",parentData:e,parentDataProperty:"publicPath",rootData:o})||(p=null===p?c.errors:p.concat(c.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.runtime){let t=e.runtime;const n=f;if(f==f){if("string"!=typeof t)return m.errors=[{params:{type:"string"}}],!1;if(t.length<1)return m.errors=[{params:{}}],!1}h=n===f}else h=!0;if(h)if(void 0!==e.wasmLoading){const n=f;y(e.wasmLoading,{instancePath:t+"/wasmLoading",parentData:e,parentDataProperty:"wasmLoading",rootData:o})||(p=null===p?y.errors:p.concat(y.errors),f=p.length),h=n===f}else h=!0}}}}}}}}}}}return m.errors=p,0===f}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;if(0===a){if(!e||"object"!=typeof e||Array.isArray(e))return h.errors=[{params:{type:"object"}}],!1;for(const n in e){let r=e[n];const f=a,u=a;let c=!1;const y=a,d=a;let g=!1;const b=a;if(a===b)if(Array.isArray(r))if(r.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var i=!0;const e=r.length;for(let t=0;t1){const n={};for(;t--;){let s=r[t];if("string"==typeof s){if("number"==typeof n[s]){e=n[s];const r={params:{i:t,j:e}};null===o?o=[r]:o.push(r),a++;break}n[s]=t}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var l=b===a;if(g=g||l,!g){const e=a;if(a===e)if("string"==typeof r){if(r.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}l=e===a,g=g||l}if(g)a=d,null!==o&&(d?o.length=d:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}var p=y===a;if(c=c||p,!c){const i=a;m(r,{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?m.errors:o.concat(m.errors),a=o.length),p=i===a,c=c||p}if(!c){const e={params:{}};return null===o?o=[e]:o.push(e),a++,h.errors=o,!1}if(a=u,null!==o&&(u?o.length=u:o=null),f!==a)break}}return h.errors=o,0===a}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1,p=null;const f=a,u=a;let c=!1;const y=a;if(a===y)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var m=!0;const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=e[n];if("string"==typeof s){if("number"==typeof r[s]){t=r[s];const e={params:{i:n,j:t}};null===o?o=[e]:o.push(e),a++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var h=y===a;if(c=c||h,!c){const t=a;if(a===t)if("string"==typeof e){if(e.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}h=t===a,c=c||h}if(c)a=u,null!==o&&(u?o.length=u:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}if(f===a&&(l=!0,p=0),!l){const e={params:{passingSchemas:p}};return null===o?o=[e]:o.push(e),a++,d.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),d.errors=o,0===a}function g(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;h(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?h.errors:o.concat(h.errors),a=o.length);var f=p===a;if(l=l||f,!l){const i=a;d(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?d.errors:o.concat(d.errors),a=o.length),f=i===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,g.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),g.errors=o,0===a}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(!(e instanceof Function)){const e={params:{}};null===o?o=[e]:o.push(e),a++}var f=p===a;if(l=l||f,!l){const i=a;g(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?g.errors:o.concat(g.errors),a=o.length),f=i===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,b.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),b.errors=o,0===a}const v={validate:D};function D(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(!(e instanceof RegExp)){const e={params:{}};null===o?o=[e]:o.push(e),a++}var f=p===a;if(l=l||f,!l){const n=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}if(f=n===a,l=l||f,!l){const n=a;if(a===n)if(e&&"object"==typeof e&&!Array.isArray(e)){const n=a;for(const t in e)if("byLayer"!==t){let n=e[t];const r=a,s=a;let i=!1;const l=a;if(a===l)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var u=y===l;if(c=c||u,!c){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}u=t===l,c=c||u}if(c)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var c=a===l;if(o=o||c,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=e===l,o=o||c}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.idHint){const e=l;if("string"!=typeof t.idHint)return te.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.layer){let e=t.layer;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var y=o===l;if(s=s||y,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(y=t===l,s=s||y,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}y=t===l,s=s||y}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return te.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return te.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var m=c===l;if(u=u||m,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}m=t===l,u=u||m}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return te.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return te.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var h=c===l;if(u=u||h,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}h=t===l,u=u||h}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=c===l;if(u=u||d,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=t===l,u=u||d}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return te.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return te.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=c===l;if(u=u||g,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=t===l,u=u||g}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=c===l;if(u=u||b,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=t===l,u=u||b}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var v=o===l;if(s=s||v,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(v=t===l,s=s||v,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}v=t===l,s=s||v}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.priority){let e=t.priority;const n=l;if("number"!=typeof e||!isFinite(e))return te.errors=[{params:{type:"number"}}],!1;p=n===l}else p=!0;if(p){if(void 0!==t.reuseExistingChunk){const e=l;if("boolean"!=typeof t.reuseExistingChunk)return te.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.test){let e=t.test;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var D=o===l;if(s=s||D,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(D=t===l,s=s||D,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}D=t===l,s=s||D}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.type){let e=t.type;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var P=o===l;if(s=s||P,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(P=t===l,s=s||P,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}P=t===l,s=s||P}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,te.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return te.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}}}return te.errors=i,0===l}function ne(t,{instancePath:r="",parentData:s,parentDataProperty:o,rootData:a=t}={}){let i=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return ne.errors=[{params:{type:"object"}}],!1;{const s=l;for(const e in t)if(!n.call(Y,e))return ne.errors=[{params:{additionalProperty:e}}],!1;if(s===l){if(void 0!==t.automaticNameDelimiter){let e=t.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof e)return ne.errors=[{params:{type:"string"}}],!1;if(e.length<1)return ne.errors=[{params:{}}],!1}var p=n===l}else p=!0;if(p){if(void 0!==t.cacheGroups){let e=t.cacheGroups;const n=l,s=l,o=l;if(l===o)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.test&&(t="test")){const e={};null===i?i=[e]:i.push(e),l++}else if(void 0!==e.test){let t=e.test;const n=l;let r=!1;const s=l;if(!(t instanceof RegExp)){const e={};null===i?i=[e]:i.push(e),l++}var f=s===l;if(r=r||f,!r){const e=l;if("string"!=typeof t){const e={};null===i?i=[e]:i.push(e),l++}if(f=e===l,r=r||f,!r){const e=l;if(!(t instanceof Function)){const e={};null===i?i=[e]:i.push(e),l++}f=e===l,r=r||f}}if(r)l=n,null!==i&&(n?i.length=n:i=null);else{const e={};null===i?i=[e]:i.push(e),l++}}}else{const e={};null===i?i=[e]:i.push(e),l++}if(o===l)return ne.errors=[{params:{}}],!1;if(l=s,null!==i&&(s?i.length=s:i=null),l===n){if(!e||"object"!=typeof e||Array.isArray(e))return ne.errors=[{params:{type:"object"}}],!1;for(const t in e){let n=e[t];const s=l,o=l;let p=!1;const f=l;if(!1!==n){const e={params:{}};null===i?i=[e]:i.push(e),l++}var u=f===l;if(p=p||u,!p){const s=l;if(!(n instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;if("string"!=typeof n){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;te(n,{instancePath:r+"/cacheGroups/"+t.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:t,rootData:a})||(i=null===i?te.errors:i.concat(te.errors),l=i.length),u=s===l,p=p||u}}}}if(!p){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}if(l=o,null!==i&&(o?i.length=o:i=null),s!==l)break}}p=n===l}else p=!0;if(p){if(void 0!==t.chunks){let e=t.chunks;const n=l,r=l;let s=!1;const o=l;if("initial"!==e&&"async"!==e&&"all"!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=o===l;if(s=s||c,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=t===l,s=s||c}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.defaultSizeTypes){let e=t.defaultSizeTypes;const n=l;if(l===n){if(!Array.isArray(e))return ne.errors=[{params:{type:"array"}}],!1;if(e.length<1)return ne.errors=[{params:{limit:1}}],!1;{const t=e.length;for(let n=0;n=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var y=c===l;if(u=u||y,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}y=t===l,u=u||y}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.fallbackCacheGroup){let e=t.fallbackCacheGroup;const n=l;if(l===n){if(!e||"object"!=typeof e||Array.isArray(e))return ne.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in e)if("automaticNameDelimiter"!==t&&"maxAsyncSize"!==t&&"maxInitialSize"!==t&&"maxSize"!==t&&"minSize"!==t)return ne.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==e.automaticNameDelimiter){let t=e.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof t)return ne.errors=[{params:{type:"string"}}],!1;if(t.length<1)return ne.errors=[{params:{}}],!1}var m=n===l}else m=!0;if(m){if(void 0!==e.maxAsyncSize){let t=e.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t&&isFinite(t)){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var h=u===l;if(f=f||h,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){let n=t[e];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}h=e===l,f=f||h}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),m=n===l}else m=!0;if(m){if(void 0!==e.maxInitialSize){let t=e.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t&&isFinite(t)){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=u===l;if(f=f||d,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){let n=t[e];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=e===l,f=f||d}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),m=n===l}else m=!0;if(m){if(void 0!==e.maxSize){let t=e.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t&&isFinite(t)){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=u===l;if(f=f||g,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){let n=t[e];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=e===l,f=f||g}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),m=n===l}else m=!0;if(m)if(void 0!==e.minSize){let t=e.minSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t&&isFinite(t)){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=u===l;if(f=f||b,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){let n=t[e];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=e===l,f=f||b}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),m=n===l}else m=!0}}}}}}p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var v=a===l;if(o=o||v,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}v=e===l,o=o||v}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.hidePathInfo){const e=l;if("boolean"!=typeof t.hidePathInfo)return ne.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return ne.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return ne.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var D=c===l;if(u=u||D,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}D=t===l,u=u||D}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return ne.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return ne.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var P=c===l;if(u=u||P,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}P=t===l,u=u||P}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var A=c===l;if(u=u||A,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}A=t===l,u=u||A}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return ne.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return ne.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var x=c===l;if(u=u||x,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}x=t===l,u=u||x}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var k=c===l;if(u=u||k,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}k=t===l,u=u||k}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var j=o===l;if(s=s||j,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(j=t===l,s=s||j,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}j=t===l,s=s||j}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,ne.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return ne.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}return ne.errors=i,0===l}function re(e,{instancePath:t="",parentData:r,parentDataProperty:s,rootData:o=e}={}){let a=null,i=0;if(0===i){if(!e||"object"!=typeof e||Array.isArray(e))return re.errors=[{params:{type:"object"}}],!1;{const r=i;for(const t in e)if(!n.call(X,t))return re.errors=[{params:{additionalProperty:t}}],!1;if(r===i){if(void 0!==e.checkWasmTypes){const t=i;if("boolean"!=typeof e.checkWasmTypes)return re.errors=[{params:{type:"boolean"}}],!1;var l=t===i}else l=!0;if(l){if(void 0!==e.chunkIds){let t=e.chunkIds;const n=i;if("natural"!==t&&"named"!==t&&"deterministic"!==t&&"size"!==t&&"total-size"!==t&&!1!==t)return re.errors=[{params:{}}],!1;l=n===i}else l=!0;if(l){if(void 0!==e.concatenateModules){const t=i;if("boolean"!=typeof e.concatenateModules)return re.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.emitOnErrors){const t=i;if("boolean"!=typeof e.emitOnErrors)return re.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.flagIncludedChunks){const t=i;if("boolean"!=typeof e.flagIncludedChunks)return re.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.innerGraph){const t=i;if("boolean"!=typeof e.innerGraph)return re.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mangleExports){let t=e.mangleExports;const n=i,r=i;let s=!1;const o=i;if("size"!==t&&"deterministic"!==t){const e={params:{}};null===a?a=[e]:a.push(e),i++}var p=o===i;if(s=s||p,!s){const e=i;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===a?a=[e]:a.push(e),i++}p=e===i,s=s||p}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),i++,re.errors=a,!1}i=r,null!==a&&(r?a.length=r:a=null),l=n===i}else l=!0;if(l){if(void 0!==e.mangleWasmImports){const t=i;if("boolean"!=typeof e.mangleWasmImports)return re.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mergeDuplicateChunks){const t=i;if("boolean"!=typeof e.mergeDuplicateChunks)return re.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimize){const t=i;if("boolean"!=typeof e.minimize)return re.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimizer){let t=e.minimizer;const n=i;if(i===n){if(!Array.isArray(t))return re.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let n=0;n=",limit:1}}],!1}m=n===f}else m=!0;if(m){if(void 0!==t.hashFunction){let e=t.hashFunction;const n=f,r=f;let s=!1;const o=f;if(f===o)if("string"==typeof e){if(e.length<1){const e={params:{}};null===l?l=[e]:l.push(e),f++}}else{const e={params:{type:"string"}};null===l?l=[e]:l.push(e),f++}var v=o===f;if(s=s||v,!s){const t=f;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),f++}v=t===f,s=s||v}if(!s){const e={params:{}};return null===l?l=[e]:l.push(e),f++,ce.errors=l,!1}f=r,null!==l&&(r?l.length=r:l=null),m=n===f}else m=!0;if(m){if(void 0!==t.hashSalt){let e=t.hashSalt;const n=f;if(f==f){if("string"!=typeof e)return ce.errors=[{params:{type:"string"}}],!1;if(e.length<1)return ce.errors=[{params:{}}],!1}m=n===f}else m=!0;if(m){if(void 0!==t.hotUpdateChunkFilename){let n=t.hotUpdateChunkFilename;const r=f;if(f==f){if("string"!=typeof n)return ce.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return ce.errors=[{params:{}}],!1}m=r===f}else m=!0;if(m){if(void 0!==t.hotUpdateGlobal){const e=f;if("string"!=typeof t.hotUpdateGlobal)return ce.errors=[{params:{type:"string"}}],!1;m=e===f}else m=!0;if(m){if(void 0!==t.hotUpdateMainFilename){let n=t.hotUpdateMainFilename;const r=f;if(f==f){if("string"!=typeof n)return ce.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return ce.errors=[{params:{}}],!1}m=r===f}else m=!0;if(m){if(void 0!==t.iife){const e=f;if("boolean"!=typeof t.iife)return ce.errors=[{params:{type:"boolean"}}],!1;m=e===f}else m=!0;if(m){if(void 0!==t.importFunctionName){const e=f;if("string"!=typeof t.importFunctionName)return ce.errors=[{params:{type:"string"}}],!1;m=e===f}else m=!0;if(m){if(void 0!==t.importMetaName){const e=f;if("string"!=typeof t.importMetaName)return ce.errors=[{params:{type:"string"}}],!1;m=e===f}else m=!0;if(m){if(void 0!==t.library){const e=f;ue(t.library,{instancePath:r+"/library",parentData:t,parentDataProperty:"library",rootData:a})||(l=null===l?ue.errors:l.concat(ue.errors),f=l.length),m=e===f}else m=!0;if(m){if(void 0!==t.libraryExport){let e=t.libraryExport;const n=f,r=f;let s=!1,o=null;const a=f,i=f;let p=!1;const u=f;if(f===u)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:1}}],!1}c=t===f}else c=!0;if(c){if(void 0!==r.performance){const e=f;ye(r.performance,{instancePath:s+"/performance",parentData:r,parentDataProperty:"performance",rootData:l})||(p=null===p?ye.errors:p.concat(ye.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.plugins){const e=f;me(r.plugins,{instancePath:s+"/plugins",parentData:r,parentDataProperty:"plugins",rootData:l})||(p=null===p?me.errors:p.concat(me.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.profile){const e=f;if("boolean"!=typeof r.profile)return ke.errors=[{params:{type:"boolean"}}],!1;c=e===f}else c=!0;if(c){if(void 0!==r.recordsInputPath){let t=r.recordsInputPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var k=a===f;if(o=o||k,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}k=n===f,o=o||k}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,ke.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsOutputPath){let t=r.recordsOutputPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var j=a===f;if(o=o||j,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}j=n===f,o=o||j}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,ke.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsPath){let t=r.recordsPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var S=a===f;if(o=o||S,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}S=n===f,o=o||S}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,ke.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.resolve){const e=f;he(r.resolve,{instancePath:s+"/resolve",parentData:r,parentDataProperty:"resolve",rootData:l})||(p=null===p?he.errors:p.concat(he.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.resolveLoader){const e=f;de(r.resolveLoader,{instancePath:s+"/resolveLoader",parentData:r,parentDataProperty:"resolveLoader",rootData:l})||(p=null===p?de.errors:p.concat(de.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.snapshot){let t=r.snapshot;const n=f;if(f==f){if(!t||"object"!=typeof t||Array.isArray(t))return ke.errors=[{params:{type:"object"}}],!1;{const n=f;for(const e in t)if("buildDependencies"!==e&&"immutablePaths"!==e&&"managedPaths"!==e&&"module"!==e&&"resolve"!==e&&"resolveBuildDependencies"!==e)return ke.errors=[{params:{additionalProperty:e}}],!1;if(n===f){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n){if(!e||"object"!=typeof e||Array.isArray(e))return ke.errors=[{params:{type:"object"}}],!1;{const t=f;for(const t in e)if("hash"!==t&&"timestamp"!==t)return ke.errors=[{params:{additionalProperty:t}}],!1;if(t===f){if(void 0!==e.hash){const t=f;if("boolean"!=typeof e.hash)return ke.errors=[{params:{type:"boolean"}}],!1;var C=t===f}else C=!0;if(C)if(void 0!==e.timestamp){const t=f;if("boolean"!=typeof e.timestamp)return ke.errors=[{params:{type:"boolean"}}],!1;C=t===f}else C=!0}}}var F=n===f}else F=!0;if(F){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r){if(!Array.isArray(n))return ke.errors=[{params:{type:"array"}}],!1;{const t=n.length;for(let r=0;r=",limit:1}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}var h=n===f}else h=!0;if(h)if(void 0!==t.type){const e=f;if("memory"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}h=e===f}else h=!0}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}if(y=s===f,c=c||y,!c){const s=f;if(f==f)if(t&&"object"==typeof t&&!Array.isArray(t)){let s;if(void 0===t.type&&(s="type")){const e={params:{missingProperty:s}};null===p?p=[e]:p.push(e),f++}else{const s=f;for(const e in t)if(!n.call(r,e)){const t={params:{additionalProperty:e}};null===p?p=[t]:p.push(t),f++;break}if(s===f){if(void 0!==t.allowCollectingMemory){const e=f;if("boolean"!=typeof t.allowCollectingMemory){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}var d=e===f}else d=!0;if(d){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=f;if(f===r)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.idleTimeoutForInitialStore){let e=t.idleTimeoutForInitialStore;const n=f;if(f===n)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r)if(Array.isArray(n)){const t=n.length;for(let r=0;r=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.maxMemoryGenerations){let e=t.maxMemoryGenerations;const n=f;if(f===n)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"number"}};null===p?p=[e]:p.push(e),f++}d=n===f}else d=!0;if(d){if(void 0!==t.name){const e=f;if("string"!=typeof t.name){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.profile){const e=f;if("boolean"!=typeof t.profile){const e={params:{type:"boolean"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.store){const e=f;if("pack"!==t.store){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d){if(void 0!==t.type){const e=f;if("filesystem"!==t.type){const e={params:{}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0;if(d)if(void 0!==t.version){const e=f;if("string"!=typeof t.version){const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}d=e===f}else d=!0}}}}}}}}}}}}}}}}}else{const e={params:{type:"object"}};null===p?p=[e]:p.push(e),f++}y=s===f,c=c||y}}if(!c){const e={params:{}};return null===p?p=[e]:p.push(e),f++,s.errors=p,!1}return f=u,null!==p&&(u?p.length=u:p=null),s.errors=p,0===f}function o(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:a=e}={}){let i=null,l=0;const p=l;let f=!1;const u=l;if(!0!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=u===l;if(f=f||c,!f){const o=l;s(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:a})||(i=null===i?s.errors:i.concat(s.errors),l=i.length),c=o===l,f=f||c}if(!f){const e={params:{}};return null===i?i=[e]:i.push(e),l++,o.errors=i,!1}return l=p,null!==i&&(p?i.length=p:i=null),o.errors=i,0===l}const a={chunkLoading:{$ref:"#/definitions/ChunkLoading"},dependOn:{anyOf:[{type:"array",items:{type:"string",minLength:1},minItems:1,uniqueItems:!0},{type:"string",minLength:1}]},filename:{$ref:"#/definitions/EntryFilename"},import:{$ref:"#/definitions/EntryItem"},layer:{$ref:"#/definitions/Layer"},library:{$ref:"#/definitions/LibraryOptions"},publicPath:{$ref:"#/definitions/PublicPath"},runtime:{$ref:"#/definitions/EntryRuntime"},wasmLoading:{$ref:"#/definitions/WasmLoading"}};function i(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const l=a;let p=!1;const f=a;if(!1!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var u=f===a;if(p=p||u,!p){const t=a,n=a;let r=!1;const s=a;if("jsonp"!==e&&"import-scripts"!==e&&"require"!==e&&"async-node"!==e){const e={params:{}};null===o?o=[e]:o.push(e),a++}var c=s===a;if(r=r||c,!r){const t=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a,r=r||c}if(r)a=n,null!==o&&(n?o.length=n:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}u=t===a,p=p||u}if(!p){const e={params:{}};return null===o?o=[e]:o.push(e),a++,i.errors=o,!1}return a=l,null!==o&&(l?o.length=l:o=null),i.errors=o,0===a}function l(t,{instancePath:n="",parentData:r,parentDataProperty:s,rootData:o=t}={}){let a=null,i=0;const p=i;let f=!1,u=null;const c=i,m=i;let y=!1;const h=i;if(i===h)if("string"==typeof t){if(t.includes("!")||!1!==e.test(t)){const e={params:{}};null===a?a=[e]:a.push(e),i++}else if(t.length<1){const e={params:{}};null===a?a=[e]:a.push(e),i++}}else{const e={params:{type:"string"}};null===a?a=[e]:a.push(e),i++}var d=h===i;if(y=y||d,!y){const e=i;if(!(t instanceof Function)){const e={params:{}};null===a?a=[e]:a.push(e),i++}d=e===i,y=y||d}if(y)i=m,null!==a&&(m?a.length=m:a=null);else{const e={params:{}};null===a?a=[e]:a.push(e),i++}if(c===i&&(f=!0,u=0),!f){const e={params:{passingSchemas:u}};return null===a?a=[e]:a.push(e),i++,l.errors=a,!1}return i=p,null!==a&&(p?a.length=p:a=null),l.errors=a,0===i}function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const f=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var u=f===a;if(l=l||u,!l){const t=a;if(a==a)if(e&&"object"==typeof e&&!Array.isArray(e)){const t=a;for(const t in e)if("amd"!==t&&"commonjs"!==t&&"commonjs2"!==t&&"root"!==t){const e={params:{additionalProperty:t}};null===o?o=[e]:o.push(e),a++;break}if(t===a){if(void 0!==e.amd){const t=a;if("string"!=typeof e.amd){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}var c=t===a}else c=!0;if(c){if(void 0!==e.commonjs){const t=a;if("string"!=typeof e.commonjs){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c){if(void 0!==e.commonjs2){const t=a;if("string"!=typeof e.commonjs2){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0;if(c)if(void 0!==e.root){const t=a;if("string"!=typeof e.root){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}c=t===a}else c=!0}}}}else{const e={params:{type:"object"}};null===o?o=[e]:o.push(e),a++}u=t===a,l=l||u}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,p.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),p.errors=o,0===a}function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(a===p)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var g=o===f;if(s=s||g,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}g=e===f,s=s||g}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.filename){const n=f;l(e.filename,{instancePath:t+"/filename",parentData:e,parentDataProperty:"filename",rootData:o})||(p=null===p?l.errors:p.concat(l.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.import){let t=e.import;const n=f,r=f;let s=!1;const o=f;if(f===o)if(Array.isArray(t))if(t.length<1){const e={params:{limit:1}};null===p?p=[e]:p.push(e),f++}else{var b=!0;const e=t.length;for(let n=0;n1){const r={};for(;n--;){let s=t[n];if("string"==typeof s){if("number"==typeof r[s]){e=r[s];const t={params:{i:n,j:e}};null===p?p=[t]:p.push(t),f++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===p?p=[e]:p.push(e),f++}var v=o===f;if(s=s||v,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}v=e===f,s=s||v}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.layer){let t=e.layer;const n=f,r=f;let s=!1;const o=f;if(null!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var D=o===f;if(s=s||D,!s){const e=f;if(f===e)if("string"==typeof t){if(t.length<1){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}D=e===f,s=s||D}if(!s){const e={params:{}};return null===p?p=[e]:p.push(e),f++,y.errors=p,!1}f=r,null!==p&&(r?p.length=r:p=null),h=n===f}else h=!0;if(h){if(void 0!==e.library){const n=f;u(e.library,{instancePath:t+"/library",parentData:e,parentDataProperty:"library",rootData:o})||(p=null===p?u.errors:p.concat(u.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.publicPath){const n=f;c(e.publicPath,{instancePath:t+"/publicPath",parentData:e,parentDataProperty:"publicPath",rootData:o})||(p=null===p?c.errors:p.concat(c.errors),f=p.length),h=n===f}else h=!0;if(h){if(void 0!==e.runtime){let t=e.runtime;const n=f;if(f==f){if("string"!=typeof t)return y.errors=[{params:{type:"string"}}],!1;if(t.length<1)return y.errors=[{params:{}}],!1}h=n===f}else h=!0;if(h)if(void 0!==e.wasmLoading){const n=f;m(e.wasmLoading,{instancePath:t+"/wasmLoading",parentData:e,parentDataProperty:"wasmLoading",rootData:o})||(p=null===p?m.errors:p.concat(m.errors),f=p.length),h=n===f}else h=!0}}}}}}}}}}}return y.errors=p,0===f}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;if(0===a){if(!e||"object"!=typeof e||Array.isArray(e))return h.errors=[{params:{type:"object"}}],!1;for(const n in e){let r=e[n];const f=a,u=a;let c=!1;const m=a,d=a;let g=!1;const b=a;if(a===b)if(Array.isArray(r))if(r.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var i=!0;const e=r.length;for(let t=0;t1){const n={};for(;t--;){let s=r[t];if("string"==typeof s){if("number"==typeof n[s]){e=n[s];const r={params:{i:t,j:e}};null===o?o=[r]:o.push(r),a++;break}n[s]=t}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var l=b===a;if(g=g||l,!g){const e=a;if(a===e)if("string"==typeof r){if(r.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}l=e===a,g=g||l}if(g)a=d,null!==o&&(d?o.length=d:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}var p=m===a;if(c=c||p,!c){const i=a;y(r,{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:s})||(o=null===o?y.errors:o.concat(y.errors),a=o.length),p=i===a,c=c||p}if(!c){const e={params:{}};return null===o?o=[e]:o.push(e),a++,h.errors=o,!1}if(a=u,null!==o&&(u?o.length=u:o=null),f!==a)break}}return h.errors=o,0===a}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1,p=null;const f=a,u=a;let c=!1;const m=a;if(a===m)if(Array.isArray(e))if(e.length<1){const e={params:{limit:1}};null===o?o=[e]:o.push(e),a++}else{var y=!0;const t=e.length;for(let n=0;n1){const r={};for(;n--;){let s=e[n];if("string"==typeof s){if("number"==typeof r[s]){t=r[s];const e={params:{i:n,j:t}};null===o?o=[e]:o.push(e),a++;break}r[s]=n}}}}}else{const e={params:{type:"array"}};null===o?o=[e]:o.push(e),a++}var h=m===a;if(c=c||h,!c){const t=a;if(a===t)if("string"==typeof e){if(e.length<1){const e={params:{}};null===o?o=[e]:o.push(e),a++}}else{const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}h=t===a,c=c||h}if(c)a=u,null!==o&&(u?o.length=u:o=null);else{const e={params:{}};null===o?o=[e]:o.push(e),a++}if(f===a&&(l=!0,p=0),!l){const e={params:{passingSchemas:p}};return null===o?o=[e]:o.push(e),a++,d.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),d.errors=o,0===a}function g(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;h(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?h.errors:o.concat(h.errors),a=o.length);var f=p===a;if(l=l||f,!l){const i=a;d(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?d.errors:o.concat(d.errors),a=o.length),f=i===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,g.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),g.errors=o,0===a}function b(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(!(e instanceof Function)){const e={params:{}};null===o?o=[e]:o.push(e),a++}var f=p===a;if(l=l||f,!l){const i=a;g(e,{instancePath:t,parentData:n,parentDataProperty:r,rootData:s})||(o=null===o?g.errors:o.concat(g.errors),a=o.length),f=i===a,l=l||f}if(!l){const e={params:{}};return null===o?o=[e]:o.push(e),a++,b.errors=o,!1}return a=i,null!==o&&(i?o.length=i:o=null),b.errors=o,0===a}const v={validate:D};function D(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:s=e}={}){let o=null,a=0;const i=a;let l=!1;const p=a;if(!(e instanceof RegExp)){const e={params:{}};null===o?o=[e]:o.push(e),a++}var f=p===a;if(l=l||f,!l){const n=a;if("string"!=typeof e){const e={params:{type:"string"}};null===o?o=[e]:o.push(e),a++}if(f=n===a,l=l||f,!l){const n=a;if(a===n)if(e&&"object"==typeof e&&!Array.isArray(e)){const n=a;for(const t in e)if("byLayer"!==t){let n=e[t];const r=a,s=a;let i=!1;const l=a;if(a===l)if(Array.isArray(n)){const e=n.length;for(let t=0;t=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var u=m===l;if(c=c||u,!c){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}u=t===l,c=c||u}if(c)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var c=a===l;if(o=o||c,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=e===l,o=o||c}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.idHint){const e=l;if("string"!=typeof t.idHint)return re.errors=[{params:{type:"string"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.layer){let e=t.layer;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var m=o===l;if(s=s||m,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(m=t===l,s=s||m,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}m=t===l,s=s||m}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return re.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return re.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var y=c===l;if(u=u||y,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}y=t===l,u=u||y}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return re.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return re.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var h=c===l;if(u=u||h,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}h=t===l,u=u||h}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=c===l;if(u=u||d,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=t===l,u=u||d}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return re.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return re.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=c===l;if(u=u||g,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=t===l,u=u||g}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=c===l;if(u=u||b,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=t===l,u=u||b}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var v=o===l;if(s=s||v,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(v=t===l,s=s||v,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}v=t===l,s=s||v}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.priority){let e=t.priority;const n=l;if("number"!=typeof e||!isFinite(e))return re.errors=[{params:{type:"number"}}],!1;p=n===l}else p=!0;if(p){if(void 0!==t.reuseExistingChunk){const e=l;if("boolean"!=typeof t.reuseExistingChunk)return re.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.test){let e=t.test;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var D=o===l;if(s=s||D,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(D=t===l,s=s||D,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}D=t===l,s=s||D}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.type){let e=t.type;const n=l,r=l;let s=!1;const o=l;if(!(e instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}var P=o===l;if(s=s||P,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(P=t===l,s=s||P,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}P=t===l,s=s||P}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,re.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return re.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}}}}return re.errors=i,0===l}function se(t,{instancePath:r="",parentData:s,parentDataProperty:o,rootData:a=t}={}){let i=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return se.errors=[{params:{type:"object"}}],!1;{const s=l;for(const e in t)if(!n.call(te,e))return se.errors=[{params:{additionalProperty:e}}],!1;if(s===l){if(void 0!==t.automaticNameDelimiter){let e=t.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof e)return se.errors=[{params:{type:"string"}}],!1;if(e.length<1)return se.errors=[{params:{}}],!1}var p=n===l}else p=!0;if(p){if(void 0!==t.cacheGroups){let e=t.cacheGroups;const n=l,s=l,o=l;if(l===o)if(e&&"object"==typeof e&&!Array.isArray(e)){let t;if(void 0===e.test&&(t="test")){const e={};null===i?i=[e]:i.push(e),l++}else if(void 0!==e.test){let t=e.test;const n=l;let r=!1;const s=l;if(!(t instanceof RegExp)){const e={};null===i?i=[e]:i.push(e),l++}var f=s===l;if(r=r||f,!r){const e=l;if("string"!=typeof t){const e={};null===i?i=[e]:i.push(e),l++}if(f=e===l,r=r||f,!r){const e=l;if(!(t instanceof Function)){const e={};null===i?i=[e]:i.push(e),l++}f=e===l,r=r||f}}if(r)l=n,null!==i&&(n?i.length=n:i=null);else{const e={};null===i?i=[e]:i.push(e),l++}}}else{const e={};null===i?i=[e]:i.push(e),l++}if(o===l)return se.errors=[{params:{}}],!1;if(l=s,null!==i&&(s?i.length=s:i=null),l===n){if(!e||"object"!=typeof e||Array.isArray(e))return se.errors=[{params:{type:"object"}}],!1;for(const t in e){let n=e[t];const s=l,o=l;let p=!1;const f=l;if(!1!==n){const e={params:{}};null===i?i=[e]:i.push(e),l++}var u=f===l;if(p=p||u,!p){const s=l;if(!(n instanceof RegExp)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;if("string"!=typeof n){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}if(u=s===l,p=p||u,!p){const s=l;re(n,{instancePath:r+"/cacheGroups/"+t.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:t,rootData:a})||(i=null===i?re.errors:i.concat(re.errors),l=i.length),u=s===l,p=p||u}}}}if(!p){const e={params:{}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}if(l=o,null!==i&&(o?i.length=o:i=null),s!==l)break}}p=n===l}else p=!0;if(p){if(void 0!==t.chunks){let e=t.chunks;const n=l,r=l;let s=!1;const o=l;if("initial"!==e&&"async"!==e&&"all"!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var c=o===l;if(s=s||c,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}c=t===l,s=s||c}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.defaultSizeTypes){let e=t.defaultSizeTypes;const n=l;if(l===n){if(!Array.isArray(e))return se.errors=[{params:{type:"array"}}],!1;if(e.length<1)return se.errors=[{params:{limit:1}}],!1;{const t=e.length;for(let n=0;n=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var m=c===l;if(u=u||m,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}m=t===l,u=u||m}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.fallbackCacheGroup){let e=t.fallbackCacheGroup;const n=l;if(l===n){if(!e||"object"!=typeof e||Array.isArray(e))return se.errors=[{params:{type:"object"}}],!1;{const t=l;for(const t in e)if("automaticNameDelimiter"!==t&&"maxAsyncSize"!==t&&"maxInitialSize"!==t&&"maxSize"!==t&&"minSize"!==t)return se.errors=[{params:{additionalProperty:t}}],!1;if(t===l){if(void 0!==e.automaticNameDelimiter){let t=e.automaticNameDelimiter;const n=l;if(l===n){if("string"!=typeof t)return se.errors=[{params:{type:"string"}}],!1;if(t.length<1)return se.errors=[{params:{}}],!1}var y=n===l}else y=!0;if(y){if(void 0!==e.maxAsyncSize){let t=e.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t&&isFinite(t)){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var h=u===l;if(f=f||h,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){let n=t[e];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}h=e===l,f=f||h}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxInitialSize){let t=e.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t&&isFinite(t)){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var d=u===l;if(f=f||d,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){let n=t[e];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}d=e===l,f=f||d}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y){if(void 0!==e.maxSize){let t=e.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t&&isFinite(t)){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var g=u===l;if(f=f||g,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){let n=t[e];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}g=e===l,f=f||g}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0;if(y)if(void 0!==e.minSize){let t=e.minSize;const n=l,r=l;let s=!1,o=null;const a=l,p=l;let f=!1;const u=l;if(l===u)if("number"==typeof t&&isFinite(t)){if(t<0||isNaN(t)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var b=u===l;if(f=f||b,!f){const e=l;if(l===e)if(t&&"object"==typeof t&&!Array.isArray(t))for(const e in t){let n=t[e];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}b=e===l,f=f||b}if(f)l=p,null!==i&&(p?i.length=p:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),y=n===l}else y=!0}}}}}}p=n===l}else p=!0;if(p){if(void 0!==t.filename){let n=t.filename;const r=l,s=l;let o=!1;const a=l;if(l===a)if("string"==typeof n){if(n.includes("!")||!1!==e.test(n)){const e={params:{}};null===i?i=[e]:i.push(e),l++}else if(n.length<1){const e={params:{}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}var v=a===l;if(o=o||v,!o){const e=l;if(!(n instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}v=e===l,o=o||v}if(!o){const e={params:{}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=s,null!==i&&(s?i.length=s:i=null),p=r===l}else p=!0;if(p){if(void 0!==t.hidePathInfo){const e=l;if("boolean"!=typeof t.hidePathInfo)return se.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0;if(p){if(void 0!==t.maxAsyncRequests){let e=t.maxAsyncRequests;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return se.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return se.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxAsyncSize){let e=t.maxAsyncSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var D=c===l;if(u=u||D,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}D=t===l,u=u||D}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialRequests){let e=t.maxInitialRequests;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return se.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return se.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.maxInitialSize){let e=t.maxInitialSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var P=c===l;if(u=u||P,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}P=t===l,u=u||P}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.maxSize){let e=t.maxSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var A=c===l;if(u=u||A,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}A=t===l,u=u||A}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minChunks){let e=t.minChunks;const n=l;if(l===n){if("number"!=typeof e||!isFinite(e))return se.errors=[{params:{type:"number"}}],!1;if(e<1||isNaN(e))return se.errors=[{params:{comparison:">=",limit:1}}],!1}p=n===l}else p=!0;if(p){if(void 0!==t.minRemainingSize){let e=t.minRemainingSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var x=c===l;if(u=u||x,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}x=t===l,u=u||x}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.minSize){let e=t.minSize;const n=l,r=l;let s=!1,o=null;const a=l,f=l;let u=!1;const c=l;if(l===c)if("number"==typeof e&&isFinite(e)){if(e<0||isNaN(e)){const e={params:{comparison:">=",limit:0}};null===i?i=[e]:i.push(e),l++}}else{const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}var k=c===l;if(u=u||k,!u){const t=l;if(l===t)if(e&&"object"==typeof e&&!Array.isArray(e))for(const t in e){let n=e[t];const r=l;if("number"!=typeof n||!isFinite(n)){const e={params:{type:"number"}};null===i?i=[e]:i.push(e),l++}if(r!==l)break}else{const e={params:{type:"object"}};null===i?i=[e]:i.push(e),l++}k=t===l,u=u||k}if(u)l=f,null!==i&&(f?i.length=f:i=null);else{const e={params:{}};null===i?i=[e]:i.push(e),l++}if(a===l&&(s=!0,o=0),!s){const e={params:{passingSchemas:o}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p){if(void 0!==t.name){let e=t.name;const n=l,r=l;let s=!1;const o=l;if(!1!==e){const e={params:{}};null===i?i=[e]:i.push(e),l++}var j=o===l;if(s=s||j,!s){const t=l;if("string"!=typeof e){const e={params:{type:"string"}};null===i?i=[e]:i.push(e),l++}if(j=t===l,s=s||j,!s){const t=l;if(!(e instanceof Function)){const e={params:{}};null===i?i=[e]:i.push(e),l++}j=t===l,s=s||j}}if(!s){const e={params:{}};return null===i?i=[e]:i.push(e),l++,se.errors=i,!1}l=r,null!==i&&(r?i.length=r:i=null),p=n===l}else p=!0;if(p)if(void 0!==t.usedExports){const e=l;if("boolean"!=typeof t.usedExports)return se.errors=[{params:{type:"boolean"}}],!1;p=e===l}else p=!0}}}}}}}}}}}}}}}}}}}return se.errors=i,0===l}function oe(e,{instancePath:t="",parentData:r,parentDataProperty:s,rootData:o=e}={}){let a=null,i=0;if(0===i){if(!e||"object"!=typeof e||Array.isArray(e))return oe.errors=[{params:{type:"object"}}],!1;{const r=i;for(const t in e)if(!n.call(ee,t))return oe.errors=[{params:{additionalProperty:t}}],!1;if(r===i){if(void 0!==e.checkWasmTypes){const t=i;if("boolean"!=typeof e.checkWasmTypes)return oe.errors=[{params:{type:"boolean"}}],!1;var l=t===i}else l=!0;if(l){if(void 0!==e.chunkIds){let t=e.chunkIds;const n=i;if("natural"!==t&&"named"!==t&&"deterministic"!==t&&"size"!==t&&"total-size"!==t&&!1!==t)return oe.errors=[{params:{}}],!1;l=n===i}else l=!0;if(l){if(void 0!==e.concatenateModules){const t=i;if("boolean"!=typeof e.concatenateModules)return oe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.emitOnErrors){const t=i;if("boolean"!=typeof e.emitOnErrors)return oe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.flagIncludedChunks){const t=i;if("boolean"!=typeof e.flagIncludedChunks)return oe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.innerGraph){const t=i;if("boolean"!=typeof e.innerGraph)return oe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mangleExports){let t=e.mangleExports;const n=i,r=i;let s=!1;const o=i;if("size"!==t&&"deterministic"!==t){const e={params:{}};null===a?a=[e]:a.push(e),i++}var p=o===i;if(s=s||p,!s){const e=i;if("boolean"!=typeof t){const e={params:{type:"boolean"}};null===a?a=[e]:a.push(e),i++}p=e===i,s=s||p}if(!s){const e={params:{}};return null===a?a=[e]:a.push(e),i++,oe.errors=a,!1}i=r,null!==a&&(r?a.length=r:a=null),l=n===i}else l=!0;if(l){if(void 0!==e.mangleWasmImports){const t=i;if("boolean"!=typeof e.mangleWasmImports)return oe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.mergeDuplicateChunks){const t=i;if("boolean"!=typeof e.mergeDuplicateChunks)return oe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimize){const t=i;if("boolean"!=typeof e.minimize)return oe.errors=[{params:{type:"boolean"}}],!1;l=t===i}else l=!0;if(l){if(void 0!==e.minimizer){let t=e.minimizer;const n=i;if(i===n){if(!Array.isArray(t))return oe.errors=[{params:{type:"array"}}],!1;{const e=t.length;for(let n=0;n=",limit:1}}],!1}y=n===f}else y=!0;if(y){if(void 0!==t.hashFunction){let e=t.hashFunction;const n=f,r=f;let s=!1;const o=f;if(f===o)if("string"==typeof e){if(e.length<1){const e={params:{}};null===l?l=[e]:l.push(e),f++}}else{const e={params:{type:"string"}};null===l?l=[e]:l.push(e),f++}var v=o===f;if(s=s||v,!s){const t=f;if(!(e instanceof Function)){const e={params:{}};null===l?l=[e]:l.push(e),f++}v=t===f,s=s||v}if(!s){const e={params:{}};return null===l?l=[e]:l.push(e),f++,ye.errors=l,!1}f=r,null!==l&&(r?l.length=r:l=null),y=n===f}else y=!0;if(y){if(void 0!==t.hashSalt){let e=t.hashSalt;const n=f;if(f==f){if("string"!=typeof e)return ye.errors=[{params:{type:"string"}}],!1;if(e.length<1)return ye.errors=[{params:{}}],!1}y=n===f}else y=!0;if(y){if(void 0!==t.hotUpdateChunkFilename){let n=t.hotUpdateChunkFilename;const r=f;if(f==f){if("string"!=typeof n)return ye.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return ye.errors=[{params:{}}],!1}y=r===f}else y=!0;if(y){if(void 0!==t.hotUpdateGlobal){const e=f;if("string"!=typeof t.hotUpdateGlobal)return ye.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.hotUpdateMainFilename){let n=t.hotUpdateMainFilename;const r=f;if(f==f){if("string"!=typeof n)return ye.errors=[{params:{type:"string"}}],!1;if(n.includes("!")||!1!==e.test(n))return ye.errors=[{params:{}}],!1}y=r===f}else y=!0;if(y){if(void 0!==t.iife){const e=f;if("boolean"!=typeof t.iife)return ye.errors=[{params:{type:"boolean"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.importFunctionName){const e=f;if("string"!=typeof t.importFunctionName)return ye.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.importMetaName){const e=f;if("string"!=typeof t.importMetaName)return ye.errors=[{params:{type:"string"}}],!1;y=e===f}else y=!0;if(y){if(void 0!==t.library){const e=f;me(t.library,{instancePath:r+"/library",parentData:t,parentDataProperty:"library",rootData:a})||(l=null===l?me.errors:l.concat(me.errors),f=l.length),y=e===f}else y=!0;if(y){if(void 0!==t.libraryExport){let e=t.libraryExport;const n=f,r=f;let s=!1,o=null;const a=f,i=f;let p=!1;const u=f;if(f===u)if(Array.isArray(e)){const t=e.length;for(let n=0;n=",limit:1}}],!1}c=t===f}else c=!0;if(c){if(void 0!==r.performance){const e=f;he(r.performance,{instancePath:s+"/performance",parentData:r,parentDataProperty:"performance",rootData:l})||(p=null===p?he.errors:p.concat(he.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.plugins){const e=f;de(r.plugins,{instancePath:s+"/plugins",parentData:r,parentDataProperty:"plugins",rootData:l})||(p=null===p?de.errors:p.concat(de.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.profile){const e=f;if("boolean"!=typeof r.profile)return Se.errors=[{params:{type:"boolean"}}],!1;c=e===f}else c=!0;if(c){if(void 0!==r.recordsInputPath){let t=r.recordsInputPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var k=a===f;if(o=o||k,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}k=n===f,o=o||k}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,Se.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsOutputPath){let t=r.recordsOutputPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var j=a===f;if(o=o||j,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}j=n===f,o=o||j}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,Se.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.recordsPath){let t=r.recordsPath;const n=f,s=f;let o=!1;const a=f;if(!1!==t){const e={params:{}};null===p?p=[e]:p.push(e),f++}var S=a===f;if(o=o||S,!o){const n=f;if(f===n)if("string"==typeof t){if(t.includes("!")||!0!==e.test(t)){const e={params:{}};null===p?p=[e]:p.push(e),f++}}else{const e={params:{type:"string"}};null===p?p=[e]:p.push(e),f++}S=n===f,o=o||S}if(!o){const e={params:{}};return null===p?p=[e]:p.push(e),f++,Se.errors=p,!1}f=s,null!==p&&(s?p.length=s:p=null),c=n===f}else c=!0;if(c){if(void 0!==r.resolve){const e=f;ge(r.resolve,{instancePath:s+"/resolve",parentData:r,parentDataProperty:"resolve",rootData:l})||(p=null===p?ge.errors:p.concat(ge.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.resolveLoader){const e=f;be(r.resolveLoader,{instancePath:s+"/resolveLoader",parentData:r,parentDataProperty:"resolveLoader",rootData:l})||(p=null===p?be.errors:p.concat(be.errors),f=p.length),c=e===f}else c=!0;if(c){if(void 0!==r.snapshot){let t=r.snapshot;const n=f;if(f==f){if(!t||"object"!=typeof t||Array.isArray(t))return Se.errors=[{params:{type:"object"}}],!1;{const n=f;for(const e in t)if("buildDependencies"!==e&&"immutablePaths"!==e&&"managedPaths"!==e&&"module"!==e&&"resolve"!==e&&"resolveBuildDependencies"!==e)return Se.errors=[{params:{additionalProperty:e}}],!1;if(n===f){if(void 0!==t.buildDependencies){let e=t.buildDependencies;const n=f;if(f===n){if(!e||"object"!=typeof e||Array.isArray(e))return Se.errors=[{params:{type:"object"}}],!1;{const t=f;for(const t in e)if("hash"!==t&&"timestamp"!==t)return Se.errors=[{params:{additionalProperty:t}}],!1;if(t===f){if(void 0!==e.hash){const t=f;if("boolean"!=typeof e.hash)return Se.errors=[{params:{type:"boolean"}}],!1;var C=t===f}else C=!0;if(C)if(void 0!==e.timestamp){const t=f;if("boolean"!=typeof e.timestamp)return Se.errors=[{params:{type:"boolean"}}],!1;C=t===f}else C=!0}}}var F=n===f}else F=!0;if(F){if(void 0!==t.immutablePaths){let n=t.immutablePaths;const r=f;if(f===r){if(!Array.isArray(n))return Se.errors=[{params:{type:"array"}}],!1;{const t=n.length;for(let r=0;r { - if (eslintrcFile) { - const content = await fs.readFile(eslintrcFile, { encoding: 'utf8' }).then( - (txt) => txt.trim().replace(/\n/g, ''), - () => null - ) - - // User is setting up ESLint for the first time setup if eslint config exists but is empty - return { - firstTimeSetup: - content === '' || - content === '{}' || - content === '---' || - content === 'module.exports = {}', - } - } else if (pkgJsonEslintConfig) { - return { - firstTimeSetup: CommentJson.stringify(pkgJsonEslintConfig) === '{}', - } - } - - return false -} diff --git a/packages/next/lib/eslint/runLintCheck.ts b/packages/next/lib/eslint/runLintCheck.ts index ed05b9d18533d..5dd2e8cdb1d9f 100644 --- a/packages/next/lib/eslint/runLintCheck.ts +++ b/packages/next/lib/eslint/runLintCheck.ts @@ -1,13 +1,14 @@ -import { promises } from 'fs' -import { extname } from 'path' +import { promises as fs } from 'fs' +import chalk from 'chalk' import findUp from 'next/dist/compiled/find-up' import semver from 'next/dist/compiled/semver' +import * as CommentJson from 'next/dist/compiled/comment-json' import { formatResults } from './customFormatter' -import { getLintIntent } from './getLintIntent' import { writeDefaultConfig } from './writeDefaultConfig' import { getPackageVersion } from '../get-package-version' +import { findPagesDir } from '../find-pages-dir' import { CompileError } from '../compile-error' import { @@ -22,12 +23,14 @@ type Config = { rules: { [key: string]: Array } } -const linteableFileTypes = ['jsx', 'js', 'ts', 'tsx'] +const linteableFiles = (dir: string) => { + return `${dir}/**/*.{${['jsx', 'js', 'ts', 'tsx'].join(',')}}` +} async function lint( deps: NecessaryDependencies, baseDir: string, - pagesDir: string, + lintDirs: string[] | null, eslintrcFile: string | null, pkgJsonPath: string | null ): Promise { @@ -41,8 +44,8 @@ async function lint( }) if (eslintVersion && semver.lt(eslintVersion, '7.0.0')) { - Log.warn( - `Your project has an older version of ESLint installed (${eslintVersion}). Please upgrade to v7 or later to run ESLint during the build process.` + Log.error( + `Your project has an older version of ESLint installed (${eslintVersion}). Please upgrade to v7 or later` ) } return null @@ -70,6 +73,8 @@ async function lint( } } + const pagesDir = findPagesDir(baseDir) + if (nextEslintPluginIsEnabled) { let updatedPagesDir = false @@ -93,9 +98,12 @@ async function lint( } } - const results = await eslint.lintFiles([ - `${pagesDir}/**/*.{${linteableFileTypes.join(',')}}`, - ]) + // If no directories to lint are provided, only the pages directory will be linted + const filesToLint = lintDirs + ? lintDirs.map(linteableFiles) + : linteableFiles(pagesDir) + + const results = await eslint.lintFiles(filesToLint) if (ESLint.getErrorResults(results)?.length > 0) { throw new CompileError(await formatResults(baseDir, results)) @@ -105,19 +113,10 @@ async function lint( export async function runLintCheck( baseDir: string, - pagesDir: string + lintDirs: string[] | null, + lintDuringBuild: boolean = false ): Promise { try { - // Check if any pages exist that can be linted - const pages = await promises.readdir(pagesDir) - if ( - !pages.some((page) => - linteableFileTypes.includes(extname(page).replace('.', '')) - ) - ) { - return null - } - // Find user's .eslintrc file const eslintrcFile = (await findUp( @@ -134,33 +133,39 @@ export async function runLintCheck( )) ?? null const pkgJsonPath = (await findUp('package.json', { cwd: baseDir })) ?? null + let packageJsonConfig = null + if (pkgJsonPath) { + const pkgJsonContent = await fs.readFile(pkgJsonPath, { + encoding: 'utf8', + }) + packageJsonConfig = CommentJson.parse(pkgJsonContent) + } - const { eslintConfig: pkgJsonEslintConfig = null } = !!pkgJsonPath - ? await import(pkgJsonPath!) - : {} - - // Check if the project uses ESLint - const eslintIntent = await getLintIntent(eslintrcFile, pkgJsonEslintConfig) - - if (!eslintIntent) { + // Warning displayed if no ESLint configuration is present during build + if (lintDuringBuild && !eslintrcFile && !packageJsonConfig.eslintConfig) { + Log.warn( + `No ESLint configuration detected. Run ${chalk.bold.cyan( + 'next lint' + )} to begin setup` + ) return null } - const firstTimeSetup = eslintIntent.firstTimeSetup - // Ensure ESLint and necessary plugins and configs are installed: const deps: NecessaryDependencies = await hasNecessaryDependencies( baseDir, false, - !!eslintIntent, - eslintrcFile + true, + eslintrcFile ?? '', + !!packageJsonConfig.eslintConfig, + lintDuringBuild ) - // Create the user's eslintrc config for them - if (firstTimeSetup) await writeDefaultConfig(eslintrcFile, pkgJsonPath) + // Write default ESLint config if none is present + await writeDefaultConfig(eslintrcFile, pkgJsonPath, packageJsonConfig) // Run ESLint - return await lint(deps, baseDir, pagesDir, eslintrcFile, pkgJsonPath) + return await lint(deps, baseDir, lintDirs, eslintrcFile, pkgJsonPath) } catch (err) { throw err } diff --git a/packages/next/lib/eslint/writeDefaultConfig.ts b/packages/next/lib/eslint/writeDefaultConfig.ts index 2e24b27ab125c..96a244d217670 100644 --- a/packages/next/lib/eslint/writeDefaultConfig.ts +++ b/packages/next/lib/eslint/writeDefaultConfig.ts @@ -7,58 +7,79 @@ import * as CommentJson from 'next/dist/compiled/comment-json' export async function writeDefaultConfig( eslintrcFile: string | null, - pkgJsonPath: string | null + pkgJsonPath: string | null, + packageJsonConfig: { eslintConfig: any } | null ) { const defaultConfig = { extends: 'next', } if (eslintrcFile) { - const ext = path.extname(eslintrcFile) + const content = await fs.readFile(eslintrcFile, { encoding: 'utf8' }).then( + (txt) => txt.trim().replace(/\n/g, ''), + () => null + ) + + if ( + content === '' || + content === '{}' || + content === '---' || + content === 'module.exports = {}' + ) { + const ext = path.extname(eslintrcFile) - let fileContent - if (ext === '.yaml' || ext === '.yml') { - fileContent = "extends: 'next'" - } else { - fileContent = CommentJson.stringify(defaultConfig, null, 2) + let newFileContent + if (ext === '.yaml' || ext === '.yml') { + newFileContent = "extends: 'next'" + } else { + newFileContent = CommentJson.stringify(defaultConfig, null, 2) - if (ext === '.js') { - fileContent = 'module.exports = ' + fileContent + if (ext === '.js') { + newFileContent = 'module.exports = ' + newFileContent + } } - } - await fs.writeFile(eslintrcFile, fileContent + os.EOL) + await fs.writeFile(eslintrcFile, newFileContent + os.EOL) - console.log( - '\n' + + console.log( chalk.green( - `We detected ESLint in your project and updated the ${chalk.bold( + `We detected an empty ESLint configuration file (${chalk.bold( path.basename(eslintrcFile) - )} file for you.` - ) + - '\n' - ) - } else if (pkgJsonPath) { - const pkgJsonContent = await fs.readFile(pkgJsonPath, { - encoding: 'utf8', - }) - let packageJsonConfig = CommentJson.parse(pkgJsonContent) - + )}) and updated it for you to include the base Next.js ESLint configuration.` + ) + ) + } + } else if ( + packageJsonConfig?.eslintConfig && + Object.entries(packageJsonConfig?.eslintConfig).length === 0 + ) { packageJsonConfig.eslintConfig = defaultConfig + if (pkgJsonPath) + await fs.writeFile( + pkgJsonPath, + CommentJson.stringify(packageJsonConfig, null, 2) + os.EOL + ) + + console.log( + chalk.green( + `We detected an empty ${chalk.bold( + 'eslintConfig' + )} field in package.json and updated it for you to include the base Next.js ESLint configuration.` + ) + ) + } else { await fs.writeFile( - pkgJsonPath, - CommentJson.stringify(packageJsonConfig, null, 2) + os.EOL + '.eslintrc', + CommentJson.stringify(defaultConfig, null, 2) + os.EOL ) console.log( - '\n' + - chalk.green( - `We detected ESLint in your project and updated the ${chalk.bold( - 'eslintConfig' - )} field for you in package.json...` - ) + - '\n' + chalk.green( + `We created the ${chalk.bold( + '.eslintrc' + )} file for you and included the base Next.js ESLint configuration.` + ) ) } } diff --git a/packages/next/lib/has-necessary-dependencies.ts b/packages/next/lib/has-necessary-dependencies.ts index ecbd4748cd483..9d6abff18d371 100644 --- a/packages/next/lib/has-necessary-dependencies.ts +++ b/packages/next/lib/has-necessary-dependencies.ts @@ -1,5 +1,5 @@ import chalk from 'chalk' -import path from 'path' +import { basename, join } from 'path' import { fileExists } from './file-exists' import { getOxfordCommaList } from './oxford-comma-list' @@ -24,7 +24,9 @@ export async function hasNecessaryDependencies( baseDir: string, checkTSDeps: boolean, checkESLintDeps: boolean, - eslintrcFile: string | null = null + eslintrcFile: string = '', + pkgJsonEslintConfig: boolean = false, + lintDuringBuild: boolean = false ): Promise { if (!checkTSDeps && !checkESLintDeps) { return { resolved: undefined! } @@ -55,28 +57,39 @@ export async function hasNecessaryDependencies( const packagesHuman = getOxfordCommaList(missingPackages.map((p) => p.pkg)) const packagesCli = missingPackages.map((p) => p.pkg).join(' ') - const yarnLockFile = path.join(baseDir, 'yarn.lock') + const yarnLockFile = join(baseDir, 'yarn.lock') const isYarn = await fileExists(yarnLockFile).catch(() => false) - const removalMsg = checkTSDeps - ? chalk.bold( - 'If you are not trying to use TypeScript, please remove the ' + - chalk.cyan('tsconfig.json') + - ' file from your package root (and any TypeScript files in your pages directory).' - ) - : chalk.bold( - `If you are not trying to use ESLint, please remove the ${ - eslintrcFile - ? chalk.cyan(path.basename(eslintrcFile)) + - ' file from your application' - : chalk.cyan('eslintConfig') + ' field from your package.json file' - }.` - ) + + const removalTSMsg = + '\n\n' + + chalk.bold( + 'If you are not trying to use TypeScript, please remove the ' + + chalk.cyan('tsconfig.json') + + ' file from your package root (and any TypeScript files in your pages directory).' + ) + const removalLintMsg = + `\n\n` + + (lintDuringBuild + ? `If you do not want to run ESLint during builds, run ${chalk.bold.cyan( + 'next build --no-lint' + )}` + + (!!eslintrcFile + ? ` or remove the ${chalk.bold( + basename(eslintrcFile) + )} file from your package root.` + : pkgJsonEslintConfig + ? ` or remove the ${chalk.bold( + 'eslintConfig' + )} field from package.json.` + : '') + : `Once installed, run ${chalk.bold.cyan('next lint')} again.`) + const removalMsg = checkTSDeps ? removalTSMsg : removalLintMsg throw new FatalError( chalk.bold.red( - `It looks like you're trying to use ${ - checkTSDeps ? 'TypeScript' : 'ESLint' - } but do not have the required package(s) installed.` + checkTSDeps + ? `It looks like you're trying to use TypeScript but do not have the required package(s) installed.` + : `To use ESLint, additional required package(s) must be installed.` ) + '\n\n' + chalk.bold(`Please install ${chalk.bold(packagesHuman)} by running:`) + @@ -86,7 +99,6 @@ export async function hasNecessaryDependencies( ' ' + packagesCli )}` + - '\n\n' + removalMsg + '\n' ) diff --git a/packages/next/lib/verifyAndLint.ts b/packages/next/lib/verifyAndLint.ts index 523bf9339d70b..3b0a48a56157f 100644 --- a/packages/next/lib/verifyAndLint.ts +++ b/packages/next/lib/verifyAndLint.ts @@ -3,7 +3,6 @@ import { Worker } from 'jest-worker' export async function verifyAndLint( dir: string, - pagesDir: string, numWorkers: number | undefined, enableWorkerThreads: boolean | undefined ): Promise { @@ -18,7 +17,7 @@ export async function verifyAndLint( lintWorkers.getStdout().pipe(process.stdout) lintWorkers.getStderr().pipe(process.stderr) - const lintResults = await lintWorkers.runLintCheck(dir, pagesDir) + const lintResults = await lintWorkers.runLintCheck(dir, null, true) if (lintResults) { console.log(lintResults) } diff --git a/packages/next/lib/verifyTypeScriptSetup.ts b/packages/next/lib/verifyTypeScriptSetup.ts index c2c36b2d0934e..140c871240f23 100644 --- a/packages/next/lib/verifyTypeScriptSetup.ts +++ b/packages/next/lib/verifyTypeScriptSetup.ts @@ -4,8 +4,10 @@ import { hasNecessaryDependencies, NecessaryDependencies, } from './has-necessary-dependencies' +import semver from 'next/dist/compiled/semver' import { CompileError } from './compile-error' import { FatalError } from './fatal-error' +import * as log from '../build/output/log' import { getTypeScriptIntent } from './typescript/getTypeScriptIntent' import { TypeCheckResult } from './typescript/runTypeCheck' @@ -38,6 +40,12 @@ export async function verifyTypeScriptSetup( // Load TypeScript after we're sure it exists: const ts = (await import(deps.resolved)) as typeof import('typescript') + if (semver.lt(ts.version, '4.3.2')) { + log.warn( + `Minimum recommended TypeScript version is v4.3.2, older versions can potentially be incompatible with Next.js. Detected: ${ts.version}` + ) + } + // Reconfigure (or create) the user's `tsconfig.json` for them: await writeConfigurationDefaults(ts, tsConfigPath, firstTimeSetup) // Write out the necessary `next-env.d.ts` file to correctly register diff --git a/packages/next/next-server/lib/constants.ts b/packages/next/next-server/lib/constants.ts index eed0b3877ba92..8d2dc6ba86db4 100644 --- a/packages/next/next-server/lib/constants.ts +++ b/packages/next/next-server/lib/constants.ts @@ -37,8 +37,9 @@ export const TEMPORARY_REDIRECT_STATUS = 307 export const PERMANENT_REDIRECT_STATUS = 308 export const STATIC_PROPS_ID = '__N_SSG' export const SERVER_PROPS_ID = '__N_SSP' +export const GOOGLE_FONT_PROVIDER = 'https://fonts.googleapis.com/css' export const OPTIMIZED_FONT_PROVIDERS = [ - 'https://fonts.googleapis.com/css', - 'https://use.typekit.net/', + { url: GOOGLE_FONT_PROVIDER, preconnect: 'https://fonts.gstatic.com' }, + { url: 'https://use.typekit.net', preconnect: 'https://use.typekit.net' }, ] export const STATIC_STATUS_PAGES = ['/500'] diff --git a/packages/next/next-server/lib/dynamic.tsx b/packages/next/next-server/lib/dynamic.tsx index 53931abde0782..0b260d19e9641 100644 --- a/packages/next/next-server/lib/dynamic.tsx +++ b/packages/next/next-server/lib/dynamic.tsx @@ -33,16 +33,9 @@ export type LoadableBaseOptions

= LoadableGeneratedOptions & { ssr?: boolean } -export type LoadableOptions

= LoadableBaseOptions

& { - render?(loader: any, props: any): JSX.Element -} +export type LoadableOptions

= LoadableBaseOptions

-export type DynamicOptions

= LoadableBaseOptions

& { - /** - * @deprecated the modules option has been planned for removal - */ - render?(props: P, loaded: any): JSX.Element -} +export type DynamicOptions

= LoadableBaseOptions

export type LoadableFn

= ( opts: LoadableOptions

@@ -117,40 +110,6 @@ export default function dynamic

( // Support for passing options, eg: dynamic(import('../hello-world'), {loading: () =>

Loading something

}) loadableOptions = { ...loadableOptions, ...options } - if ( - typeof dynamicOptions === 'object' && - !(dynamicOptions instanceof Promise) - ) { - // show deprecation warning for `modules` key in development - if (process.env.NODE_ENV !== 'production') { - if (dynamicOptions.modules) { - console.warn( - 'The modules option for next/dynamic has been deprecated. See here for more info https://nextjs.org/docs/messages/next-dynamic-modules' - ) - } - } - // Support for `render` when using a mapping, eg: `dynamic({ modules: () => {return {HelloWorld: import('../hello-world')}, render(props, loaded) {} } }) - if (dynamicOptions.render) { - loadableOptions.render = (loaded, props) => - dynamicOptions.render!(props, loaded) - } - // Support for `modules` when using a mapping, eg: `dynamic({ modules: () => {return {HelloWorld: import('../hello-world')}, render(props, loaded) {} } }) - if (dynamicOptions.modules) { - loadableFn = Loadable.Map - const loadModules: LoaderMap = {} - const modules = dynamicOptions.modules() - Object.keys(modules).forEach((key) => { - const value: any = modules[key] - if (typeof value.then === 'function') { - loadModules[key] = () => value.then((mod: any) => mod.default || mod) - return - } - loadModules[key] = value - }) - loadableOptions.loader = loadModules - } - } - // coming from build/babel/plugins/react-loadable-plugin.js if (loadableOptions.loadableGenerated) { loadableOptions = { diff --git a/packages/next/next-server/lib/loadable.js b/packages/next/next-server/lib/loadable.js index a81d792610ed3..3b2381b319dfb 100644 --- a/packages/next/next-server/lib/loadable.js +++ b/packages/next/next-server/lib/loadable.js @@ -53,61 +53,10 @@ function load(loader) { return state } -function loadMap(obj) { - let state = { - loading: false, - loaded: {}, - error: null, - } - - let promises = [] - - try { - Object.keys(obj).forEach((key) => { - let result = load(obj[key]) - - if (!result.loading) { - state.loaded[key] = result.loaded - state.error = result.error - } else { - state.loading = true - } - - promises.push(result.promise) - - result.promise - .then((res) => { - state.loaded[key] = res - }) - .catch((err) => { - state.error = err - }) - }) - } catch (err) { - state.error = err - } - - state.promise = Promise.all(promises) - .then((res) => { - state.loading = false - return res - }) - .catch((err) => { - state.loading = false - throw err - }) - - return state -} - function resolve(obj) { return obj && obj.__esModule ? obj.default : obj } -function render(loaded, props) { - return React.createElement(resolve(loaded), props) -} - function createLoadableComponent(loadFn, options) { let opts = Object.assign( { @@ -115,7 +64,6 @@ function createLoadableComponent(loadFn, options) { loading: null, delay: 200, timeout: null, - render: render, webpack: null, modules: null, }, @@ -188,7 +136,7 @@ function createLoadableComponent(loadFn, options) { retry: subscription.retry, }) } else if (state.loaded) { - return opts.render(state.loaded, props) + return React.createElement(resolve(state.loaded), props) } else { return null } @@ -291,16 +239,6 @@ function Loadable(opts) { return createLoadableComponent(load, opts) } -function LoadableMap(opts) { - if (typeof opts.render !== 'function') { - throw new Error('LoadableMap requires a `render(loaded, props)` function') - } - - return createLoadableComponent(loadMap, opts) -} - -Loadable.Map = LoadableMap - function flushInitializers(initializers, ids) { let promises = [] diff --git a/packages/next/next-server/lib/post-process.ts b/packages/next/next-server/lib/post-process.ts index 2a448f64bab56..04c9ad8225720 100644 --- a/packages/next/next-server/lib/post-process.ts +++ b/packages/next/next-server/lib/post-process.ts @@ -82,7 +82,7 @@ class FontOptimizerMiddleware implements PostProcessMiddleware { (tag: HTMLElement) => tag.getAttribute('rel') === 'stylesheet' && tag.hasAttribute('data-href') && - OPTIMIZED_FONT_PROVIDERS.some((url) => { + OPTIMIZED_FONT_PROVIDERS.some(({ url }) => { const dataHref = tag.getAttribute('data-href') return dataHref ? dataHref.startsWith(url) : false }) @@ -104,6 +104,8 @@ class FontOptimizerMiddleware implements PostProcessMiddleware { options: renderOptions ) => { let result = markup + let preconnectUrls = new Set() + if (!options.getFontDefinition) { return markup } @@ -132,9 +134,27 @@ class FontOptimizerMiddleware implements PostProcessMiddleware { '', `` ) + + const provider = OPTIMIZED_FONT_PROVIDERS.find((p) => + url.startsWith(p.url) + ) + + if (provider) { + preconnectUrls.add(provider.preconnect) + } } }) + let preconnectTag = '' + preconnectUrls.forEach((url) => { + preconnectTag += `` + }) + + result = result.replace( + '', + preconnectTag + ) + return result } } diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index 739d06597b945..54397b7475b81 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -650,11 +650,14 @@ export default class Router implements BaseRouter { if (as.substr(0, 2) !== '//') { // in order for `e.state` to work on the `onpopstate` event // we have to register the initial route upon initialization + const options: TransitionOptions = { locale } + ;(options as any)._shouldResolveHref = as !== pathname + this.changeState( 'replaceState', formatWithValidation({ pathname: addBasePath(pathname), query }), getURL(), - { locale } + options ) } @@ -804,7 +807,8 @@ export default class Router implements BaseRouter { window.location.href = url return false } - const shouldResolveHref = url === as || (options as any)._h + const shouldResolveHref = + url === as || (options as any)._h || (options as any)._shouldResolveHref // for static pages with query params in the URL we delay // marking the router ready until after the query is updated @@ -982,6 +986,8 @@ export default class Router implements BaseRouter { : pathname if (shouldResolveHref && pathname !== '/_error') { + ;(options as any)._shouldResolveHref = true + if (process.env.__NEXT_HAS_REWRITES && as.startsWith('/')) { const rewritesResult = resolveRewrites( addBasePath(addLocale(cleanedAs, this.locale)), diff --git a/packages/next/next-server/server/config-shared.ts b/packages/next/next-server/server/config-shared.ts index 7234dfeda8af2..5f7c52c1ad757 100644 --- a/packages/next/next-server/server/config-shared.ts +++ b/packages/next/next-server/server/config-shared.ts @@ -27,15 +27,17 @@ export type NextConfig = { [key: string]: any } & { } > redirects?: () => Promise - trailingSlash?: boolean + webpack5?: false future: { + /** + * @deprecated this options was moved to the top level + */ + webpack5?: false strictPostcssConfiguration?: boolean excludeDefaultMomentLocales?: boolean - webpack5?: boolean } - experimental: { cpus?: number plugins?: boolean @@ -47,20 +49,15 @@ export type NextConfig = { [key: string]: any } & { optimizeImages?: boolean optimizeCss?: boolean scrollRestoration?: boolean - scriptLoader?: boolean stats?: boolean externalDir?: boolean - serialWebpackBuild?: boolean conformance?: boolean amp?: { optimizer?: any validator?: string skipValidation?: boolean } - turboMode?: boolean - eslint?: boolean reactRoot?: boolean - enableBlurryPlaceholder?: boolean disableOptimizedLoading?: boolean gzipSize?: boolean } @@ -112,21 +109,17 @@ export const defaultConfig: NextConfig = { optimizeImages: false, optimizeCss: false, scrollRestoration: false, - scriptLoader: false, stats: false, externalDir: false, - serialWebpackBuild: false, - turboMode: false, - eslint: false, reactRoot: Number(process.env.NEXT_PRIVATE_REACT_ROOT) > 0, - enableBlurryPlaceholder: false, disableOptimizedLoading: true, gzipSize: true, }, + webpack5: + Number(process.env.NEXT_PRIVATE_TEST_WEBPACK4_MODE) > 0 ? false : undefined, future: { strictPostcssConfiguration: false, excludeDefaultMomentLocales: false, - webpack5: Number(process.env.NEXT_PRIVATE_TEST_WEBPACK5_MODE) > 0, }, serverRuntimeConfig: {}, publicRuntimeConfig: {}, diff --git a/packages/next/next-server/server/config-utils-worker.ts b/packages/next/next-server/server/config-utils-worker.ts index 7897d460c2629..3842f0e34a054 100644 --- a/packages/next/next-server/server/config-utils-worker.ts +++ b/packages/next/next-server/server/config-utils-worker.ts @@ -22,11 +22,9 @@ export function install(useWebpack5: boolean) { export type CheckReasons = | 'test-mode' - | 'no-config' + | 'default' + | 'flag-disabled' | 'future-flag' - | 'no-future-flag' - | 'no-webpack-config' - | 'webpack-config' export type CheckResult = { enabled: boolean @@ -43,20 +41,18 @@ export async function shouldLoadWithWebpack5( cwd: dir, }) - if (Number(process.env.NEXT_PRIVATE_TEST_WEBPACK5_MODE) > 0) { + if (Number(process.env.NEXT_PRIVATE_TEST_WEBPACK4_MODE) > 0) { return { - enabled: true, + enabled: false, reason: 'test-mode', } } - // No `next.config.js`: + // Use webpack 5 by default in apps that do not have next.config.js if (!path?.length) { - // Uncomment to add auto-enable when there is no next.config.js - // Use webpack 5 by default in new apps: return { enabled: true, - reason: 'no-config', + reason: 'default', } } @@ -69,33 +65,21 @@ export async function shouldLoadWithWebpack5( userConfigModule.default || userConfigModule ) - // Opted-in manually - if (userConfig.future?.webpack5 === true) { + if (userConfig.future?.webpack5) { return { - enabled: true, + enabled: false, reason: 'future-flag', } } - - // Opted-out manually - if (userConfig.future?.webpack5 === false) { + if (userConfig.webpack5 === false) { return { enabled: false, - reason: 'no-future-flag', - } - } - - // Uncomment to add auto-enable when there is no custom webpack config - // The user isn't configuring webpack - if (!userConfig.webpack) { - return { - enabled: true, - reason: 'no-webpack-config', + reason: 'flag-disabled', } } return { - enabled: false, - reason: 'webpack-config', + enabled: true, + reason: 'default', } } diff --git a/packages/next/next-server/server/config-utils.ts b/packages/next/next-server/server/config-utils.ts index 77f34ff05fb57..36aa99cba830e 100644 --- a/packages/next/next-server/server/config-utils.ts +++ b/packages/next/next-server/server/config-utils.ts @@ -3,21 +3,16 @@ import { Worker } from 'jest-worker' import * as Log from '../../build/output/log' import { CheckReasons, CheckResult } from './config-utils-worker' import { install, shouldLoadWithWebpack5 } from './config-utils-worker' +import { PHASE_PRODUCTION_SERVER } from '../lib/constants' export { install, shouldLoadWithWebpack5 } function reasonMessage(reason: CheckReasons) { switch (reason) { - case 'future-flag': - return 'future.webpack5 option enabled' - case 'no-future-flag': - return 'future.webpack5 option disabled' - case 'no-config': - return 'no next.config.js' - case 'webpack-config': - return 'custom webpack configuration in next.config.js' - case 'no-webpack-config': - return 'no custom webpack configuration in next.config.js' + case 'default': + return 'Enabled by default' + case 'flag-disabled': + return 'webpack5 flag is set to false in next.config.js' case 'test-mode': return 'internal test mode' default: @@ -26,21 +21,37 @@ function reasonMessage(reason: CheckReasons) { } export async function loadWebpackHook(phase: string, dir: string) { - let useWebpack5 = false - const worker: any = new Worker( + let useWebpack5 = true + let usesRemovedFlag = false + const worker = new Worker( path.resolve(__dirname, './config-utils-worker.js'), { enableWorkerThreads: false, numWorkers: 1, + forkOptions: { + env: { + ...process.env, + NODE_OPTIONS: '', + }, + }, } - ) + ) as Worker & { + shouldLoadWithWebpack5: typeof import('./config-utils-worker').shouldLoadWithWebpack5 + } try { const result: CheckResult = await worker.shouldLoadWithWebpack5(phase, dir) - Log.info( - `Using webpack ${result.enabled ? '5' : '4'}. Reason: ${reasonMessage( - result.reason - )} https://nextjs.org/docs/messages/webpack5` - ) + if (result.reason === 'future-flag') { + usesRemovedFlag = true + } else { + if (phase !== PHASE_PRODUCTION_SERVER) { + Log.info( + `Using webpack ${result.enabled ? '5' : '4'}. Reason: ${reasonMessage( + result.reason + )} https://nextjs.org/docs/messages/webpack5` + ) + } + } + useWebpack5 = Boolean(result.enabled) } catch { // If this errors, it likely will do so again upon boot, so we just swallow @@ -49,5 +60,11 @@ export async function loadWebpackHook(phase: string, dir: string) { worker.end() } + if (usesRemovedFlag) { + throw new Error( + '`future.webpack5` in `next.config.js` has moved to the top level `webpack5` flag https://nextjs.org/docs/messages/future-webpack5-moved-to-webpack5' + ) + } + install(useWebpack5) } diff --git a/packages/next/next-server/server/font-utils.ts b/packages/next/next-server/server/font-utils.ts index 4d4b25dbe9425..6e2b9cfee6a3a 100644 --- a/packages/next/next-server/server/font-utils.ts +++ b/packages/next/next-server/server/font-utils.ts @@ -1,4 +1,5 @@ import * as Log from '../../build/output/log' +import { GOOGLE_FONT_PROVIDER } from '../lib/constants' const https = require('https') const CHROME_UA = @@ -10,6 +11,10 @@ export type FontManifest = Array<{ content: string }> +function isGoogleFont(url: string): boolean { + return url.startsWith(GOOGLE_FONT_PROVIDER) +} + function getFontForUA(url: string, UA: string): Promise { return new Promise((resolve, reject) => { let rawData: any = '' @@ -45,7 +50,9 @@ export async function getFontDefinitionFromNetwork( * CSS cascading 🤷‍♂️. */ try { - result += await getFontForUA(url, IE_UA) + if (isGoogleFont(url)) { + result += await getFontForUA(url, IE_UA) + } result += await getFontForUA(url, CHROME_UA) } catch (e) { Log.warn( diff --git a/packages/next/next-server/server/image-config.ts b/packages/next/next-server/server/image-config.ts index db88d2c516b6d..84473e7503eee 100644 --- a/packages/next/next-server/server/image-config.ts +++ b/packages/next/next-server/server/image-config.ts @@ -13,7 +13,7 @@ export type ImageConfig = { loader: LoaderValue path: string domains?: string[] - enableBlurryPlaceholder: boolean + disableStaticImages: boolean } export const imageConfigDefault: ImageConfig = { @@ -22,5 +22,5 @@ export const imageConfigDefault: ImageConfig = { path: '/_next/image', loader: 'default', domains: [], - enableBlurryPlaceholder: false, + disableStaticImages: false, } diff --git a/packages/next/next-server/server/image-optimizer.ts b/packages/next/next-server/server/image-optimizer.ts index 527201f213c9b..9cb514b8ed3f0 100644 --- a/packages/next/next-server/server/image-optimizer.ts +++ b/packages/next/next-server/server/image-optimizer.ts @@ -46,7 +46,7 @@ export async function imageOptimizer( } const { headers } = req - const { url, w, q } = parsedUrl.query + const { url, w, q, s } = parsedUrl.query const mimeType = getSupportedMimeType(MODERN_TYPES, headers.accept) let href: string @@ -111,6 +111,14 @@ export async function imageOptimizer( return { finished: true } } + if (s && s !== '1') { + res.statusCode = 400 + res.end('"s" parameter must be "1" or omitted') + return { finished: true } + } + + const isStatic = !!s + const width = parseInt(w, 10) if (!width || isNaN(width)) { @@ -261,7 +269,7 @@ export async function imageOptimizer( ANIMATABLE_TYPES.includes(upstreamType) && isAnimated(upstreamBuffer) if (vector || animate) { await writeToCacheDir(hashDir, upstreamType, expireAt, upstreamBuffer) - sendResponse(req, res, upstreamType, upstreamBuffer) + sendResponse(req, res, upstreamType, upstreamBuffer, isStatic) return { finished: true } } @@ -333,12 +341,12 @@ export async function imageOptimizer( if (optimizedBuffer) { await writeToCacheDir(hashDir, contentType, expireAt, optimizedBuffer) - sendResponse(req, res, contentType, optimizedBuffer) + sendResponse(req, res, contentType, optimizedBuffer, isStatic) } else { throw new Error('Unable to optimize buffer') } } catch (error) { - sendResponse(req, res, upstreamType, upstreamBuffer) + sendResponse(req, res, upstreamType, upstreamBuffer, isStatic) } return { finished: true } @@ -366,10 +374,16 @@ function sendResponse( req: IncomingMessage, res: ServerResponse, contentType: string | null, - buffer: Buffer + buffer: Buffer, + isStatic: boolean ) { const etag = getHash([buffer]) - res.setHeader('Cache-Control', 'public, max-age=0, must-revalidate') + res.setHeader( + 'Cache-Control', + isStatic + ? 'public, immutable, max-age=315360000' + : 'public, max-age=0, must-revalidate' + ) if (sendEtagResponse(req, res, etag)) { return } diff --git a/packages/next/next-server/server/lib/squoosh/impl.ts b/packages/next/next-server/server/lib/squoosh/impl.ts index a814249ea89d3..b9efc9859114f 100644 --- a/packages/next/next-server/server/lib/squoosh/impl.ts +++ b/packages/next/next-server/server/lib/squoosh/impl.ts @@ -29,7 +29,12 @@ export async function rotate( return await m(image.data, image.width, image.height, { numRotations }) } -export async function resize(image: ImageData, width: number) { +type ResizeOpts = { image: ImageData } & ( + | { width: number; height?: never } + | { height: number; width?: never } +) + +export async function resize({ image, width, height }: ResizeOpts) { image = ImageData.from(image) const p = preprocessors['resize'] @@ -37,6 +42,7 @@ export async function resize(image: ImageData, width: number) { return await m(image.data, image.width, image.height, { ...p.defaultOptions, width, + height, }) } diff --git a/packages/next/next-server/server/lib/squoosh/main.ts b/packages/next/next-server/server/lib/squoosh/main.ts index 8fbcb89212a47..4b885764481ab 100644 --- a/packages/next/next-server/server/lib/squoosh/main.ts +++ b/packages/next/next-server/server/lib/squoosh/main.ts @@ -9,8 +9,7 @@ type RotateOperation = { } type ResizeOperation = { type: 'resize' - width: number -} +} & ({ width: number; height?: never } | { height: number; width?: never }) export type Operation = RotateOperation | ResizeOperation export type Encoding = 'jpeg' | 'png' | 'webp' @@ -38,8 +37,24 @@ export async function processBuffer( if (operation.type === 'rotate') { imageData = await worker.rotate(imageData, operation.numRotations) } else if (operation.type === 'resize') { - if (imageData.width && imageData.width > operation.width) { - imageData = await worker.resize(imageData, operation.width) + if ( + operation.width && + imageData.width && + imageData.width > operation.width + ) { + imageData = await worker.resize({ + image: imageData, + width: operation.width, + }) + } else if ( + operation.height && + imageData.height && + imageData.height > operation.height + ) { + imageData = await worker.resize({ + image: imageData, + height: operation.height, + }) } } } diff --git a/packages/next/package.json b/packages/next/package.json index 9d56f79c409a1..d5afac5a7b574 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "10.2.4-canary.0", + "version": "10.2.4-canary.7", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -28,8 +28,8 @@ "dynamic.d.ts", "error.js", "error.d.ts", - "experimental-script.js", - "experimental-script.d.ts", + "script.js", + "script.d.ts", "head.js", "head.d.ts", "image.js", @@ -64,10 +64,10 @@ "dependencies": { "@babel/runtime": "7.12.5", "@hapi/accept": "5.0.2", - "@next/env": "10.2.4-canary.0", - "@next/polyfill-module": "10.2.4-canary.0", - "@next/react-dev-overlay": "10.2.4-canary.0", - "@next/react-refresh-utils": "10.2.4-canary.0", + "@next/env": "10.2.4-canary.7", + "@next/polyfill-module": "10.2.4-canary.7", + "@next/react-dev-overlay": "10.2.4-canary.7", + "@next/react-refresh-utils": "10.2.4-canary.7", "@opentelemetry/api": "0.14.0", "assert": "2.0.0", "ast-types": "0.13.2", @@ -86,6 +86,7 @@ "find-cache-dir": "3.3.1", "get-orientation": "1.1.2", "https-browserify": "1.0.0", + "image-size": "1.0.0", "jest-worker": "27.0.0-next.5", "native-url": "0.3.4", "node-fetch": "2.6.1", @@ -100,7 +101,7 @@ "prop-types": "15.7.2", "querystring-es3": "0.2.1", "raw-body": "2.4.1", - "react-is": "16.13.1", + "react-is": "17.0.2", "react-refresh": "0.8.3", "stream-browserify": "3.0.0", "stream-http": "3.1.1", @@ -116,8 +117,8 @@ "peerDependencies": { "fibers": ">= 3.1.0", "node-sass": "^4.0.0 || ^5.0.0", - "react": "^16.6.0 || ^17", - "react-dom": "^16.6.0 || ^17", + "react": "^17.0.2", + "react-dom": "^17.0.2", "sass": "^1.3.0" }, "peerDependenciesMeta": { @@ -151,7 +152,7 @@ "@babel/preset-typescript": "7.12.7", "@babel/traverse": "^7.12.10", "@babel/types": "7.12.12", - "@next/polyfill-nomodule": "10.2.4-canary.0", + "@next/polyfill-nomodule": "10.2.4-canary.7", "@taskr/clear": "1.1.0", "@taskr/esnext": "1.1.0", "@taskr/watch": "1.1.0", @@ -248,6 +249,6 @@ "webpack-sources": "1.4.3" }, "engines": { - "node": ">=10.13.0" + "node": ">=12.0.0" } } diff --git a/packages/next/pages/_app.tsx b/packages/next/pages/_app.tsx index 0a2e8e80d8ab4..4036cfd89674e 100644 --- a/packages/next/pages/_app.tsx +++ b/packages/next/pages/_app.tsx @@ -1,6 +1,5 @@ -import React, { ErrorInfo } from 'react' +import React from 'react' import { - execOnce, loadGetInitialProps, AppContextType, AppInitialProps, @@ -36,94 +35,9 @@ export default class App

extends React.Component< static origGetInitialProps = appGetInitialProps static getInitialProps = appGetInitialProps - // Kept here for backwards compatibility. - // When someone ended App they could call `super.componentDidCatch`. - // @deprecated This method is no longer needed. Errors are caught at the top level - componentDidCatch(error: Error, _errorInfo: ErrorInfo): void { - throw error - } - render() { - const { router, Component, pageProps, __N_SSG, __N_SSP } = this - .props as AppProps - - return ( - - ) - } -} - -let warnContainer: () => void -let warnUrl: () => void - -if (process.env.NODE_ENV !== 'production') { - warnContainer = execOnce(() => { - console.warn( - `Warning: the \`Container\` in \`_app\` has been deprecated and should be removed. https://nextjs.org/docs/messages/app-container-deprecated` - ) - }) - - warnUrl = execOnce(() => { - console.error( - `Warning: the 'url' property is deprecated. https://nextjs.org/docs/messages/url-deprecated` - ) - }) -} - -// @deprecated noop for now until removal -export function Container(p: any) { - if (process.env.NODE_ENV !== 'production') warnContainer() - return p.children -} - -export function createUrl(router: Router) { - // This is to make sure we don't references the router object at call time - const { pathname, asPath, query } = router - return { - get query() { - if (process.env.NODE_ENV !== 'production') warnUrl() - return query - }, - get pathname() { - if (process.env.NODE_ENV !== 'production') warnUrl() - return pathname - }, - get asPath() { - if (process.env.NODE_ENV !== 'production') warnUrl() - return asPath - }, - back: () => { - if (process.env.NODE_ENV !== 'production') warnUrl() - router.back() - }, - push: (url: string, as?: string) => { - if (process.env.NODE_ENV !== 'production') warnUrl() - return router.push(url, as) - }, - pushTo: (href: string, as?: string) => { - if (process.env.NODE_ENV !== 'production') warnUrl() - const pushRoute = as ? href : '' - const pushUrl = as || href - - return router.push(pushRoute, pushUrl) - }, - replace: (url: string, as?: string) => { - if (process.env.NODE_ENV !== 'production') warnUrl() - return router.replace(url, as) - }, - replaceTo: (href: string, as?: string) => { - if (process.env.NODE_ENV !== 'production') warnUrl() - const replaceRoute = as ? href : '' - const replaceUrl = as || href + const { Component, pageProps } = this.props as AppProps - return router.replace(replaceRoute, replaceUrl) - }, + return } } diff --git a/packages/next/pages/_document.tsx b/packages/next/pages/_document.tsx index d3a486a0e4de9..19ef353bb41f7 100644 --- a/packages/next/pages/_document.tsx +++ b/packages/next/pages/_document.tsx @@ -17,9 +17,7 @@ import { } from '../next-server/server/get-page-files' import { cleanAmpPath } from '../next-server/server/utils' import { htmlEscapeJsonString } from '../server/htmlescape' -import Script, { - Props as ScriptLoaderProps, -} from '../client/experimental-script' +import Script, { Props as ScriptLoaderProps } from '../client/script' export { DocumentContext, DocumentInitialProps, DocumentProps } @@ -447,7 +445,9 @@ export class Head extends Component< if ( c.type === 'link' && c.props['href'] && - OPTIMIZED_FONT_PROVIDERS.some((url) => c.props['href'].startsWith(url)) + OPTIMIZED_FONT_PROVIDERS.some(({ url }) => + c.props['href'].startsWith(url) + ) ) { const newProps = { ...(c.props || {}) } newProps['data-href'] = newProps['href'] @@ -534,9 +534,7 @@ export class Head extends Component< children = this.makeStylesheetInert(children) } - if (process.env.__NEXT_SCRIPT_LOADER) { - children = this.handleDocumentScriptLoaderItems(children) - } + children = this.handleDocumentScriptLoaderItems(children) let hasAmphtmlRel = false let hasCanonicalRel = false @@ -639,6 +637,9 @@ export class Head extends Component< )} {children} + {process.env.__NEXT_OPTIMIZE_FONTS && ( + + )} {head} { + if (NON_CONCURRENT_TESTS.includes(testName)) { + nonConcurrentTestNames.push(testName) + return false + } + return true + }) + + // run non-concurrent test names separately and before + // concurrent ones + for (const test of nonConcurrentTestNames) { + let passed = false + + for (let i = 0; i < NUM_RETRIES + 1; i++) { + try { + const time = await runTest(test, i > 0) + timings.push({ + file: test, + time, + }) + passed = true + break + } catch (err) { + if (i < NUM_RETRIES) { + try { + const testDir = path.dirname(path.join(__dirname, test)) + console.log('Cleaning test files at', testDir) + await exec(`git clean -fdx "${testDir}"`) + await exec(`git checkout "${testDir}"`) + } catch (err) {} + } + } + } + if (!passed) { + console.error(`${test} failed to pass within ${NUM_RETRIES} retries`) + children.forEach((child) => child.kill()) + + if (isTestJob) { + try { + const testsOutput = await fs.readFile(`${test}${RESULTS_EXT}`, 'utf8') + console.log( + `--test output start--`, + testsOutput, + `--test output end--` + ) + } catch (err) { + console.log(`Failed to load test output`, err) + } + } + process.exit(1) + } + } + await Promise.all( testNames.map(async (test) => { await sema.acquire() diff --git a/test-pnp.sh b/test-pnp.sh index 29874580db9b4..2bf265c728ab6 100755 --- a/test-pnp.sh +++ b/test-pnp.sh @@ -39,5 +39,5 @@ do yarn config set enableGlobalCache true yarn link --all --private -r ../.. - yarn build + yarn build --no-lint done diff --git a/test/.stats-app/stats-config.js b/test/.stats-app/stats-config.js index 407e334252bd7..c806b346f4c37 100644 --- a/test/.stats-app/stats-config.js +++ b/test/.stats-app/stats-config.js @@ -65,9 +65,6 @@ module.exports = { content: ` module.exports = { generateBuildId: () => 'BUILD_ID', - future: { - webpack5: true - }, webpack(config) { config.optimization.minimize = false config.optimization.minimizer = undefined @@ -138,9 +135,7 @@ module.exports = { content: ` module.exports = { generateBuildId: () => 'BUILD_ID', - future: { - webpack5: false - }, + webpack5: false, webpack(config) { config.optimization.minimize = false config.optimization.minimizer = undefined @@ -157,9 +152,7 @@ module.exports = { content: ` module.exports = { generateBuildId: () => 'BUILD_ID', - future: { - webpack5: false - } + webpack5: false } `, }, diff --git a/test/acceptance/ReactRefreshLogBox.dev.test.js b/test/acceptance/ReactRefreshLogBox.dev.test.js index b93db3fc9b43f..ea77a59096a2e 100644 --- a/test/acceptance/ReactRefreshLogBox.dev.test.js +++ b/test/acceptance/ReactRefreshLogBox.dev.test.js @@ -1099,6 +1099,34 @@ test('logbox: anchors links in error messages', async () => { await cleanup() }) +test(' with multiple children', async () => { + const [session, cleanup] = await sandbox() + + console.log({ SANDBOX: session.sandboxDirectory }) + await session.patch( + 'index.js', + ` + import Link from 'next/link' + + export default function Index() { + return ( + +

One

+

Two

+ + ) + } + ` + ) + + expect(await session.hasRedbox(true)).toBe(true) + expect(await session.getRedboxDescription()).toMatchInlineSnapshot( + `"Error: Multiple children were passed to with \`href\` of \`/\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"` + ) + + await cleanup() +}) + test(' component props errors', async () => { const [session, cleanup] = await sandbox() diff --git a/test/eslint-plugin-next/no-document-import-in-page.unit.test.js b/test/eslint-plugin-next/no-document-import-in-page.unit.test.js index cc0fba94d1070..72c93e420a422 100644 --- a/test/eslint-plugin-next/no-document-import-in-page.unit.test.js +++ b/test/eslint-plugin-next/no-document-import-in-page.unit.test.js @@ -44,6 +44,20 @@ ruleTester.run('no-document-import-in-page', rule, { `, filename: 'pages/_document.tsx', }, + { + code: `import Document from "next/document" + + export default class MyDocument extends Document { + render() { + return ( + + + ); + } + } + `, + filename: 'pages/_document.page.tsx', + }, ], invalid: [ { diff --git a/test/eslint-plugin-next/no-head-import-in-document.unit.test.js b/test/eslint-plugin-next/no-head-import-in-document.unit.test.js index 3b2b84024c9b6..edfcb1514c63b 100644 --- a/test/eslint-plugin-next/no-head-import-in-document.unit.test.js +++ b/test/eslint-plugin-next/no-head-import-in-document.unit.test.js @@ -84,5 +84,35 @@ ruleTester.run('no-head-import-in-document', rule, { }, ], }, + { + code: ` + import Document, { Html, Main, NextScript } from 'next/document' + import Head from 'next/head' + + class MyDocument extends Document { + render() { + return ( + + + +
+ + + + ) + } + } + + export default MyDocument + `, + filename: 'pages/_document.page.tsx', + errors: [ + { + message: + 'next/head should not be imported in pages/_document.page.tsx. Import Head from next/document instead. See https://nextjs.org/docs/messages/no-head-import-in-document.', + type: 'ImportDeclaration', + }, + ], + }, ], }) diff --git a/test/eslint-plugin-next/no-sync-scripts.unit.test.js b/test/eslint-plugin-next/no-sync-scripts.unit.test.js index d89c67914d949..934b89b311ef7 100644 --- a/test/eslint-plugin-next/no-sync-scripts.unit.test.js +++ b/test/eslint-plugin-next/no-sync-scripts.unit.test.js @@ -60,7 +60,7 @@ ruleTester.run('sync-scripts', rule, { errors: [ { message: - 'Synchronous scripts are forbidden. See: https://nextjs.org/docs/messages/no-sync-scripts.', + 'External synchronous scripts are forbidden. See: https://nextjs.org/docs/messages/no-sync-scripts.', type: 'JSXOpeningElement', }, ], @@ -82,7 +82,7 @@ ruleTester.run('sync-scripts', rule, { errors: [ { message: - 'Synchronous scripts are forbidden. See: https://nextjs.org/docs/messages/no-sync-scripts.', + 'External synchronous scripts are forbidden. See: https://nextjs.org/docs/messages/no-sync-scripts.', type: 'JSXOpeningElement', }, ], diff --git a/test/integration/babel-custom/fixtures/babel-env/.babelrc b/test/integration/babel-custom/fixtures/babel-env/.babelrc new file mode 100644 index 0000000000000..3aa1c2a5c286a --- /dev/null +++ b/test/integration/babel-custom/fixtures/babel-env/.babelrc @@ -0,0 +1,22 @@ +{ + "env": { + "development": { + "presets": ["next/babel"] + }, + "production": { + "presets": ["next/babel"] + }, + "test": { + "presets": [ + [ + "next/babel", + { + "preset-env": { + "modules": "commonjs" + } + } + ] + ] + } + } +} diff --git a/test/integration/babel-custom/fixtures/babel-env/pages/index.js b/test/integration/babel-custom/fixtures/babel-env/pages/index.js new file mode 100644 index 0000000000000..69192c68a0ce5 --- /dev/null +++ b/test/integration/babel-custom/fixtures/babel-env/pages/index.js @@ -0,0 +1 @@ +export default () =>

Hello World

diff --git a/test/integration/babel-custom/test/index.test.js b/test/integration/babel-custom/test/index.test.js index 1f224c3915fdc..b502b31aeb75a 100644 --- a/test/integration/babel-custom/test/index.test.js +++ b/test/integration/babel-custom/test/index.test.js @@ -6,6 +6,10 @@ import { nextBuild } from 'next-test-utils' jest.setTimeout(1000 * 60 * 5) describe('Babel', () => { + it('should allow setting babelrc env', async () => { + await nextBuild(join(__dirname, '../fixtures/babel-env')) + }) + it('should allow setting targets.browsers', async () => { await nextBuild(join(__dirname, '../fixtures/targets-browsers')) }) diff --git a/test/integration/basic/pages/dynamic/bundle.js b/test/integration/basic/pages/dynamic/bundle.js deleted file mode 100644 index 81750ce977e9f..0000000000000 --- a/test/integration/basic/pages/dynamic/bundle.js +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react' -import dynamic from 'next/dynamic' -import Router from 'next/router' -import PropTypes from 'prop-types' - -const HelloBundle = dynamic({ - modules: (props) => { - const components = { - HelloContext: import('../../components/hello-context'), - Hello1: import('../../components/hello1'), - Hello2: import('../../components/hello2'), - } - - return components - }, - render: (props, { HelloContext, Hello1, Hello2 }) => ( -
-

{props.title}

- - - {props.showMore ? : null} -
- ), -}) - -export default class Bundle extends React.Component { - static childContextTypes = { - data: PropTypes.object, - } - - static getInitialProps({ query }) { - return { showMore: Boolean(query.showMore) } - } - - getChildContext() { - return { - data: { title: 'Vercel Rocks' }, - } - } - - toggleShowMore() { - if (this.props.showMore) { - Router.push('/dynamic/bundle') - return - } - - Router.push('/dynamic/bundle?showMore=1') - } - - render() { - const { showMore } = this.props - - return ( -
- - -
- ) - } -} diff --git a/test/integration/basic/test/dynamic.js b/test/integration/basic/test/dynamic.js index fcce8c706dfcc..c7600d7ea1505 100644 --- a/test/integration/basic/test/dynamic.js +++ b/test/integration/basic/test/dynamic.js @@ -1,7 +1,7 @@ /* eslint-env jest */ import webdriver from 'next-webdriver' import cheerio from 'cheerio' -import { waitFor, check } from 'next-test-utils' +import { check } from 'next-test-utils' export default (context, render) => { async function get$(path, query) { @@ -227,76 +227,5 @@ export default (context, render) => { } }) }) - - describe('Import mapping', () => { - it('should render dynamic imports bundle', async () => { - const $ = await get$('/dynamic/bundle') - const bodyText = $('body').text() - expect(/Dynamic Bundle/.test(bodyText)).toBe(true) - expect(/Hello World 1/.test(bodyText)).toBe(true) - expect(/Hello World 2/.test(bodyText)).toBe(false) - }) - - it('should render dynamic imports bundle with additional components', async () => { - const $ = await get$('/dynamic/bundle?showMore=1') - const bodyText = $('body').text() - expect(/Dynamic Bundle/.test(bodyText)).toBe(true) - expect(/Hello World 1/.test(bodyText)).toBe(true) - expect(/Hello World 2/.test(bodyText)).toBe(true) - }) - - it('should render components', async () => { - const browser = await webdriver(context.appPort, '/dynamic/bundle') - - while (true) { - const bodyText = await browser.elementByCss('body').text() - if ( - /Dynamic Bundle/.test(bodyText) && - /Hello World 1/.test(bodyText) && - !/Hello World 2/.test(bodyText) - ) { - break - } - await waitFor(1000) - } - - await browser.close() - }) - - it('should render support React context', async () => { - const browser = await webdriver(context.appPort, '/dynamic/bundle') - - while (true) { - const bodyText = await browser.elementByCss('body').text() - if (/Vercel Rocks/.test(bodyText)) break - await waitFor(1000) - } - - await browser.close() - }) - - it('should load new components and render for prop changes', async () => { - const browser = await webdriver(context.appPort, '/dynamic/bundle') - - await browser - .waitForElementByCss('#toggle-show-more') - .elementByCss('#toggle-show-more') - .click() - - while (true) { - const bodyText = await browser.elementByCss('body').text() - if ( - /Dynamic Bundle/.test(bodyText) && - /Hello World 1/.test(bodyText) && - /Hello World 2/.test(bodyText) - ) { - break - } - await waitFor(1000) - } - - await browser.close() - }) - }) }) } diff --git a/test/integration/basic/test/index.test.js b/test/integration/basic/test/index.test.js index 6ec889952e62f..e605903b21e61 100644 --- a/test/integration/basic/test/index.test.js +++ b/test/integration/basic/test/index.test.js @@ -36,6 +36,12 @@ describe('Basic Features', () => { it('should polyfill Node.js modules', async () => { const browser = await webdriver(context.appPort, '/node-browser-polyfills') + + console.error({ + logs: await browser.log('browser'), + content: await browser.eval('document.documentElement.innerHTML'), + }) + await browser.waitForCondition('window.didRender') const data = await browser diff --git a/test/integration/build-output/test/index.test.js b/test/integration/build-output/test/index.test.js index 50ddbf813d28f..b92d80a2c4347 100644 --- a/test/integration/build-output/test/index.test.js +++ b/test/integration/build-output/test/index.test.js @@ -123,33 +123,33 @@ describe('Build Output', () => { ) expect(indexSize.endsWith('B')).toBe(true) - expect(parseFloat(indexFirstLoad)).toBeCloseTo(gz ? 63.6 : 195, 1) + expect(parseFloat(indexFirstLoad)).toBeCloseTo(gz ? 64 : 196, 1) expect(indexFirstLoad.endsWith('kB')).toBe(true) expect(parseFloat(err404Size)).toBeCloseTo(gz ? 3.06 : 8.15, 1) expect(err404Size.endsWith('kB')).toBe(true) - expect(parseFloat(err404FirstLoad)).toBeCloseTo(gz ? 66.45 : 203, 1) + expect(parseFloat(err404FirstLoad)).toBeCloseTo(gz ? 66.8 : 204, 1) expect(err404FirstLoad.endsWith('kB')).toBe(true) - expect(parseFloat(sharedByAll)).toBeCloseTo(gz ? 63.4 : 195, 1) + expect(parseFloat(sharedByAll)).toBeCloseTo(gz ? 63.7 : 196, 1) expect(sharedByAll.endsWith('kB')).toBe(true) const appSizeValue = _appSize.endsWith('kB') ? parseFloat(_appSize) : parseFloat(_appSize) / 1000 - expect(appSizeValue).toBeCloseTo(gz ? 1.0 : 2.18, 1) + expect(appSizeValue).toBeCloseTo(gz ? 0.799 : 1.63, 1) expect(_appSize.endsWith('kB') || _appSize.endsWith(' B')).toBe(true) const webpackSizeValue = webpackSize.endsWith('kB') ? parseFloat(webpackSize) : parseFloat(webpackSize) / 1000 - expect(webpackSizeValue).toBeCloseTo(gz ? 0.95 : 1.81, 2) + expect(webpackSizeValue).toBeCloseTo(gz ? 0.76 : 1.45, 2) expect(webpackSize.endsWith('kB') || webpackSize.endsWith(' B')).toBe( true ) - expect(parseFloat(mainSize)).toBeCloseTo(gz ? 19.4 : 60.4, 1) + expect(parseFloat(mainSize)).toBeCloseTo(gz ? 20.1 : 62.8, 1) expect(mainSize.endsWith('kB')).toBe(true) expect(parseFloat(frameworkSize)).toBeCloseTo(gz ? 42.0 : 130, 1) diff --git a/test/integration/client-navigation/pages/nav/shallow-routing.js b/test/integration/client-navigation/pages/nav/shallow-routing.js index 728467f9afde4..5703ae7f0c76a 100644 --- a/test/integration/client-navigation/pages/nav/shallow-routing.js +++ b/test/integration/client-navigation/pages/nav/shallow-routing.js @@ -1,6 +1,6 @@ import { Component } from 'react' import Link from 'next/link' -import Router from 'next/router' +import Router, { withRouter } from 'next/router' let getInitialPropsRunCount = 1 @@ -8,60 +8,62 @@ const linkStyle = { marginRight: 10, } -export default class extends Component { - static getInitialProps({ res }) { - if (res) return { getInitialPropsRunCount: 1 } - getInitialPropsRunCount++ +export default withRouter( + class extends Component { + static getInitialProps({ res }) { + if (res) return { getInitialPropsRunCount: 1 } + getInitialPropsRunCount++ - return { getInitialPropsRunCount } - } + return { getInitialPropsRunCount } + } - getCurrentCounter() { - const { url } = this.props - return url.query.counter ? parseInt(url.query.counter) : 0 - } + getCurrentCounter() { + const { router } = this.props + return router.query.counter ? parseInt(router.query.counter) : 0 + } - increase() { - const counter = this.getCurrentCounter() - const href = `/nav/shallow-routing?counter=${counter + 1}` - Router.push(href, href, { shallow: true }) - } + increase() { + const counter = this.getCurrentCounter() + const href = `/nav/shallow-routing?counter=${counter + 1}` + Router.push(href, href, { shallow: true }) + } - increaseNonShallow() { - const counter = this.getCurrentCounter() - const href = `/nav/shallow-routing?counter=${counter + 1}` - Router.push(href, href, {}) - } + increaseNonShallow() { + const counter = this.getCurrentCounter() + const href = `/nav/shallow-routing?counter=${counter + 1}` + Router.push(href, href, {}) + } - gotoNavShallow() { - const href = `/nav` - Router.push(href, href, { shallow: true }) - } + gotoNavShallow() { + const href = `/nav` + Router.push(href, href, { shallow: true }) + } - render() { - return ( -
- - - Home - - -
- Counter: {this.getCurrentCounter()} -
-
- getInitialProps run count: {this.props.getInitialPropsRunCount} + render() { + return ( +
+ + + Home + + +
+ Counter: {this.getCurrentCounter()} +
+
+ getInitialProps run count: {this.props.getInitialPropsRunCount} +
+ + +
- - - -
- ) + ) + } } -} +) diff --git a/test/integration/client-navigation/pages/nav/url-prop-change.js b/test/integration/client-navigation/pages/nav/url-prop-change.js deleted file mode 100644 index 0b2a1095f70cc..0000000000000 --- a/test/integration/client-navigation/pages/nav/url-prop-change.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react' -import Link from 'next/link' - -export default class UrlPropChange extends React.Component { - constructor(props) { - super(props) - this.state = { - previousUrl: {}, - url: props.url, - } - } - - componentDidUpdate(prevProps) { - if (prevProps.url !== this.props.url) { - this.setState(() => { - return { - previousUrl: prevProps.url, - url: this.props.url, - } - }) - } - } - - render() { - const { previousUrl, url } = this.state - return ( -
- Current: -
{JSON.stringify(url)}
-
-
- Previous: -
{JSON.stringify(previousUrl)}
- - Add querystring - -
- ) - } -} diff --git a/test/integration/client-navigation/pages/url-prop-override.js b/test/integration/client-navigation/pages/url-prop-override.js deleted file mode 100644 index 68d5067c8943c..0000000000000 --- a/test/integration/client-navigation/pages/url-prop-override.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react' -export default class extends React.Component { - static getInitialProps() { - return { - url: 'test', // This gets overridden by Next in lib/_app.js - } - } - render() { - const { url } = this.props - return ( -
-

{url.pathname}

-

{Object.keys(url.query).length}

-

{url.asPath}

-
- ) - } -} diff --git a/test/integration/client-navigation/pages/url-prop.js b/test/integration/client-navigation/pages/url-prop.js deleted file mode 100644 index 465d963d26722..0000000000000 --- a/test/integration/client-navigation/pages/url-prop.js +++ /dev/null @@ -1,13 +0,0 @@ -const Page = ({ url }) => { - return ( -
-

{url.pathname}

-

{Object.keys(url.query).length}

-

{url.asPath}

-
- ) -} - -Page.getInitialProps = () => ({}) - -export default Page diff --git a/test/integration/client-navigation/test/index.test.js b/test/integration/client-navigation/test/index.test.js index 3e73719dd690d..5f666b5a00648 100644 --- a/test/integration/client-navigation/test/index.test.js +++ b/test/integration/client-navigation/test/index.test.js @@ -42,7 +42,6 @@ describe('Client Navigation', () => { '/styled-jsx-external', '/with-cdm', '/url-prop', - '/url-prop-override', '/dynamic/ssr', '/dynamic/[slug]/route', @@ -57,7 +56,6 @@ describe('Client Navigation', () => { '/nav/redirect', '/nav/as-path', '/nav/as-path-using-router', - '/nav/url-prop-change', '/nested-cdm', ] @@ -169,30 +167,6 @@ describe('Client Navigation', () => { }) }) - describe('With url property', () => { - it('Should keep immutable pathname, asPath and query', async () => { - const browser = await webdriver(context.appPort, '/nav/url-prop-change') - await browser.elementByCss('#add-query').click() - const urlResult = await browser.elementByCss('#url-result').text() - const previousUrlResult = await browser - .elementByCss('#previous-url-result') - .text() - - expect(JSON.parse(urlResult)).toMatchObject({ - query: { added: 'yes' }, - pathname: '/nav/url-prop-change', - asPath: '/nav/url-prop-change?added=yes', - }) - expect(JSON.parse(previousUrlResult)).toMatchObject({ - query: {}, - pathname: '/nav/url-prop-change', - asPath: '/nav/url-prop-change', - }) - - await browser.close() - }) - }) - describe('with tag inside the ', () => { it('should navigate the page', async () => { const browser = await webdriver(context.appPort, '/nav/about') diff --git a/test/integration/client-navigation/test/rendering.js b/test/integration/client-navigation/test/rendering.js index a8eb14a3893e9..b991454c2fa09 100644 --- a/test/integration/client-navigation/test/rendering.js +++ b/test/integration/client-navigation/test/rendering.js @@ -209,7 +209,7 @@ export default function (render, fetch, ctx) { }) it('should render the page without `nextExport` property', async () => { - const html = await render('/url-prop') + const html = await render('/async-props') expect(html).not.toContain('"nextExport"') }) @@ -376,22 +376,6 @@ export default function (render, fetch, ctx) { expect($('.as-path-content').text()).toBe('/nav/as-path?aa=10') }) - describe('Url prop', () => { - it('should provide pathname, query and asPath', async () => { - const $ = await get$('/url-prop') - expect($('#pathname').text()).toBe('/url-prop') - expect($('#query').text()).toBe('0') - expect($('#aspath').text()).toBe('/url-prop') - }) - - it('should override props.url, even when getInitialProps returns url as property', async () => { - const $ = await get$('/url-prop-override') - expect($('#pathname').text()).toBe('/url-prop-override') - expect($('#query').text()).toBe('0') - expect($('#aspath').text()).toBe('/url-prop-override') - }) - }) - describe('404', () => { it('should 404 on not existent page', async () => { const $ = await get$('/non-existent') diff --git a/test/integration/config/next.config.js b/test/integration/config/next.config.js index d84bc31845d4e..5a3d8352404ee 100644 --- a/test/integration/config/next.config.js +++ b/test/integration/config/next.config.js @@ -3,6 +3,8 @@ const withSass = require('@zeit/next-sass') const path = require('path') module.exports = withCSS( withSass({ + // @zeit/next-sass is not supported with webpack 5 + webpack5: false, onDemandEntries: { // Make sure entries are not getting disposed. maxInactiveAge: 1000 * 60 * 60, diff --git a/test/integration/config/test/index.test.js b/test/integration/config/test/index.test.js index 896e1c20ada75..7fa398c93b792 100644 --- a/test/integration/config/test/index.test.js +++ b/test/integration/config/test/index.test.js @@ -19,8 +19,20 @@ jest.setTimeout(1000 * 60 * 5) describe('Configuration', () => { beforeAll(async () => { + context.output = '' + + const handleOutput = (msg) => { + context.output += msg + } + context.appPort = await findPort() - context.server = await launchApp(join(__dirname, '../'), context.appPort) + context.server = await launchApp(join(__dirname, '../'), context.appPort, { + env: { + NODE_OPTIONS: '--inspect', + }, + onStdout: handleOutput, + onStderr: handleOutput, + }) // pre-build all pages at the start await Promise.all([ @@ -40,6 +52,12 @@ describe('Configuration', () => { return cheerio.load(html) } + it('should log webpack version correctly', async () => { + expect(context.output).toContain( + `Using webpack 4. Reason: webpack5 flag is set to false in next.config.js` + ) + }) + it('should disable X-Powered-By header support', async () => { const url = `http://localhost:${context.appPort}/` const header = (await fetch(url)).headers.get('X-Powered-By') diff --git a/test/integration/create-next-app/index.test.js b/test/integration/create-next-app/index.test.js index 1a7672570d3ca..2ed045c99a834 100644 --- a/test/integration/create-next-app/index.test.js +++ b/test/integration/create-next-app/index.test.js @@ -52,6 +52,9 @@ describe('create next app', () => { expect( fs.existsSync(path.join(cwd, projectName, 'pages/index.js')) ).toBeTruthy() + expect( + fs.existsSync(path.join(cwd, projectName, '.eslintrc')) + ).toBeTruthy() expect( fs.existsSync(path.join(cwd, projectName, 'node_modules/next')) ).toBe(true) @@ -121,6 +124,9 @@ describe('create next app', () => { expect( fs.existsSync(path.join(cwd, projectName, 'next-env.d.ts')) ).toBeTruthy() + expect( + fs.existsSync(path.join(cwd, projectName, '.eslintrc')) + ).toBeTruthy() expect( fs.existsSync(path.join(cwd, projectName, 'node_modules/next')) ).toBe(true) @@ -138,6 +144,8 @@ describe('create next app', () => { ]) expect(Object.keys(pkgJSON.devDependencies)).toEqual([ '@types/react', + 'eslint', + 'eslint-config-next', 'typescript', ]) }) @@ -242,7 +250,12 @@ describe('create next app', () => { ) expect(res.exitCode).toBe(0) - const files = ['package.json', 'pages/index.js', '.gitignore'] + const files = [ + 'package.json', + 'pages/index.js', + '.gitignore', + '.eslintrc', + ] files.forEach((file) => expect(fs.existsSync(path.join(cwd, projectName, file))).toBeTruthy() ) @@ -309,6 +322,7 @@ describe('create next app', () => { 'pages/index.js', '.gitignore', 'node_modules/next', + '.eslintrc', ] files.forEach((file) => expect(fs.existsSync(path.join(cwd, file))).toBeTruthy() @@ -327,6 +341,7 @@ describe('create next app', () => { 'pages/index.js', '.gitignore', 'node_modules/next', + '.eslintrc', ] files.forEach((file) => expect(fs.existsSync(path.join(cwd, projectName, file))).toBeTruthy() @@ -344,6 +359,7 @@ describe('create next app', () => { 'package.json', 'pages/index.js', '.gitignore', + '.eslintrc', 'package-lock.json', 'node_modules/next', ] diff --git a/test/integration/css-fixtures/custom-configuration-legacy/next.config.js b/test/integration/css-fixtures/custom-configuration-legacy/next.config.js index 7cf31f9c903e7..8920cee5f9b3e 100644 --- a/test/integration/css-fixtures/custom-configuration-legacy/next.config.js +++ b/test/integration/css-fixtures/custom-configuration-legacy/next.config.js @@ -1,6 +1,8 @@ const withCSS = require('@zeit/next-css') module.exports = withCSS({ + // @zeit/next-css is not supported with webpack 5 + webpack5: false, onDemandEntries: { // Make sure entries are not getting disposed. maxInactiveAge: 1000 * 60 * 60, diff --git a/test/integration/custom-routes/pages/multi-rewrites.js b/test/integration/custom-routes/pages/multi-rewrites.js index 516c8ad7c29ac..aff869dcc74d8 100644 --- a/test/integration/custom-routes/pages/multi-rewrites.js +++ b/test/integration/custom-routes/pages/multi-rewrites.js @@ -1 +1,3 @@ -export default () => 'multi-rewrites' +const Page = () => 'multi-rewrites' + +export default Page diff --git a/test/integration/custom-routes/pages/nav.js b/test/integration/custom-routes/pages/nav.js index 88ca61b02404c..2be4ac0870eac 100644 --- a/test/integration/custom-routes/pages/nav.js +++ b/test/integration/custom-routes/pages/nav.js @@ -1,6 +1,6 @@ import Link from 'next/link' -export default () => ( +const Page = () => ( <> @@ -42,3 +42,4 @@ export default () => (
) +export default Page diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index 461774b7a799a..9453a19eb5fd5 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -20,6 +20,7 @@ import { normalizeRegEx, initNextServerScript, nextExport, + hasRedbox, } from 'next-test-utils' jest.setTimeout(1000 * 60 * 2) @@ -38,6 +39,42 @@ let appPort let app const runTests = (isDev = false) => { + it('should resolveHref correctly navigating through history', async () => { + const browser = await webdriver(appPort, '/') + await browser.eval('window.beforeNav = 1') + + expect(await browser.eval('document.documentElement.innerHTML')).toContain( + 'multi-rewrites' + ) + + await browser.eval('next.router.push("/rewriting-to-auto-export")') + await browser.waitForElementByCss('#auto-export') + + expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({ + slug: 'hello', + rewrite: '1', + }) + expect(await browser.eval('window.beforeNav')).toBe(1) + + await browser.eval('next.router.push("/nav")') + await browser.waitForElementByCss('#nav') + + expect(await browser.elementByCss('#nav').text()).toBe('Nav') + + await browser.back() + await browser.waitForElementByCss('#auto-export') + + expect(JSON.parse(await browser.elementByCss('#query').text())).toEqual({ + slug: 'hello', + rewrite: '1', + }) + expect(await browser.eval('window.beforeNav')).toBe(1) + + if (isDev) { + expect(await hasRedbox(browser, false)).toBe(false) + } + }) + it('should continue in beforeFiles rewrites', async () => { const res = await fetchViaHTTP(appPort, '/old-blog/about') expect(res.status).toBe(200) diff --git a/test/integration/eslint/custom-config/next.config.js b/test/integration/eslint/custom-config/next.config.js deleted file mode 100644 index fa70d79c18529..0000000000000 --- a/test/integration/eslint/custom-config/next.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { experimental: { eslint: true } } diff --git a/test/integration/eslint/custom-config/package.json b/test/integration/eslint/custom-config/package.json deleted file mode 100644 index ecc0b774b6ba2..0000000000000 --- a/test/integration/eslint/custom-config/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "eslint-custom-config", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "devDependencies": { - "eslint-config-next": "*", - "eslint": "7.23.0" - } -} diff --git a/test/integration/eslint/first-time-setup/next.config.js b/test/integration/eslint/first-time-setup/next.config.js deleted file mode 100644 index fa70d79c18529..0000000000000 --- a/test/integration/eslint/first-time-setup/next.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { experimental: { eslint: true } } diff --git a/test/integration/eslint/first-time-setup/package.json b/test/integration/eslint/first-time-setup/package.json deleted file mode 100644 index e786fb4fba286..0000000000000 --- a/test/integration/eslint/first-time-setup/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "devDependencies": { - "eslint-config-next": "*" - } -} diff --git a/test/integration/eslint/test/index.test.js b/test/integration/eslint/test/index.test.js index 74059886b691b..7a4a71d9e6102 100644 --- a/test/integration/eslint/test/index.test.js +++ b/test/integration/eslint/test/index.test.js @@ -1,5 +1,5 @@ import { join } from 'path' -import { runNextCommand } from 'next-test-utils' +import { nextBuild, nextLint } from 'next-test-utils' import { writeFile, readFile } from 'fs-extra' import semver from 'next/dist/compiled/semver' @@ -19,50 +19,87 @@ async function eslintVersion() { } describe('ESLint', () => { - it('should populate eslint config automatically for first time setup', async () => { - const eslintrc = join(dirFirstTimeSetup, '.eslintrc') - await writeFile(eslintrc, '') + describe('Next Build', () => { + test('first time setup', async () => { + const eslintrc = join(dirFirstTimeSetup, '.eslintrc') + await writeFile(eslintrc, '') - const { stdout } = await runNextCommand(['build', dirFirstTimeSetup], { - stdout: true, + const { stdout, stderr } = await nextBuild(dirFirstTimeSetup, [], { + stdout: true, + stderr: true, + }) + const output = stdout + stderr + const eslintrcContent = await readFile(eslintrc, 'utf8') + + expect(output).toContain( + 'We detected an empty ESLint configuration file (.eslintrc) and updated it for you to include the base Next.js ESLint configuration.' + ) + expect(eslintrcContent.trim().replace(/\s/g, '')).toMatch( + '{"extends":"next"}' + ) }) - const eslintrcContent = await readFile(eslintrc, 'utf8') + test('shows warnings and errors', async () => { + const { stdout, stderr } = await nextBuild(dirCustomConfig, [], { + stdout: true, + stderr: true, + }) + + const output = stdout + stderr + const version = await eslintVersion() - expect(stdout).toContain( - 'We detected ESLint in your project and updated the .eslintrc file for you.' - ) - expect(eslintrcContent.trim().replace(/\s/g, '')).toMatch( - '{"extends":"next"}' - ) + if (!version || (version && semver.lt(version, '7.0.0'))) { + expect(output).toContain( + 'Your project has an older version of ESLint installed' + ) + expect(output).toContain('Please upgrade to v7 or later') + } else { + expect(output).toContain( + 'Error: Comments inside children section of tag should be placed inside braces' + ) + } + }) }) - test('shows warnings and errors', async () => { - let output = '' + describe('Next Lint', () => { + test('first time setup', async () => { + const eslintrc = join(dirFirstTimeSetup, '.eslintrc') + await writeFile(eslintrc, '') - const { stdout, stderr } = await runNextCommand( - ['build', dirCustomConfig], - { + const { stdout, stderr } = await nextLint(dirFirstTimeSetup, [], { stdout: true, stderr: true, - } - ) + }) + const output = stdout + stderr + const eslintrcContent = await readFile(eslintrc, 'utf8') - output = stdout + stderr - const version = await eslintVersion() - - if (!version || (version && semver.lt(version, '7.0.0'))) { - expect(output).toContain( - 'Your project has an older version of ESLint installed' - ) expect(output).toContain( - 'Please upgrade to v7 or later to run ESLint during the build process' + 'We detected an empty ESLint configuration file (.eslintrc) and updated it for you to include the base Next.js ESLint configuration.' ) - } else { - expect(output).toContain('Failed to compile') - expect(output).toContain( - 'Error: Comments inside children section of tag should be placed inside braces' + expect(eslintrcContent.trim().replace(/\s/g, '')).toMatch( + '{"extends":"next"}' ) - } + }) + + test('shows warnings and errors', async () => { + const { stdout, stderr } = await nextLint(dirCustomConfig, [], { + stdout: true, + stderr: true, + }) + + const output = stdout + stderr + const version = await eslintVersion() + + if (!version || (version && semver.lt(version, '7.0.0'))) { + expect(output).toContain( + 'Your project has an older version of ESLint installed' + ) + expect(output).toContain('Please upgrade to v7 or later') + } else { + expect(output).toContain( + 'Error: Comments inside children section of tag should be placed inside braces' + ) + } + }) }) }) diff --git a/test/integration/externals/next.config.js b/test/integration/externals/next.config.js index 5989f6fd7b01f..826c3454030d2 100644 --- a/test/integration/externals/next.config.js +++ b/test/integration/externals/next.config.js @@ -7,7 +7,4 @@ module.exports = { return config }, - future: { - webpack5: true, - }, } diff --git a/test/integration/fallback-modules/test/index.test.js b/test/integration/fallback-modules/test/index.test.js index 63d175fbbaaa6..57558d4eef5e3 100644 --- a/test/integration/fallback-modules/test/index.test.js +++ b/test/integration/fallback-modules/test/index.test.js @@ -48,7 +48,9 @@ describe('Build Output', () => { expect(parseFloat(indexSize)).toBeGreaterThanOrEqual(2) expect(indexSize.endsWith('kB')).toBe(true) - expect(parseFloat(indexFirstLoad)).toBeLessThanOrEqual(67.9) + expect(parseFloat(indexFirstLoad)).toBeLessThanOrEqual( + process.env.NEXT_PRIVATE_TEST_WEBPACK4_MODE ? 68 : 67.9 + ) expect(parseFloat(indexFirstLoad)).toBeGreaterThanOrEqual(60) expect(indexFirstLoad.endsWith('kB')).toBe(true) }) diff --git a/test/integration/font-optimization/fixtures/with-google/pages/_document.js b/test/integration/font-optimization/fixtures/with-google/pages/_document.js index f3f300181f324..6b1db914b491f 100644 --- a/test/integration/font-optimization/fixtures/with-google/pages/_document.js +++ b/test/integration/font-optimization/fixtures/with-google/pages/_document.js @@ -1,7 +1,6 @@ import * as React from 'react' /// @ts-ignore import Document, { Main, NextScript, Head } from 'next/document' - export default class MyDocument extends Document { constructor(props) { super(props) diff --git a/test/integration/font-optimization/fixtures/with-typekit/manifest-snapshot.json b/test/integration/font-optimization/fixtures/with-typekit/manifest-snapshot.json index 42681af1533b5..cb517f819778c 100644 --- a/test/integration/font-optimization/fixtures/with-typekit/manifest-snapshot.json +++ b/test/integration/font-optimization/fixtures/with-typekit/manifest-snapshot.json @@ -1,14 +1,14 @@ [ { "url": "https://use.typekit.net/plm1izr.css", - "content": "@import url(\"https://p.typekit.net/p.css?s=1&k=plm1izr&ht=tk&f=32266&a=23152309&app=typekit&e=css\");@font-face{font-family:\"birra-2\";src:url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:700}.tk-birra-2{font-family:\"birra-2\",serif}@import url(\"https://p.typekit.net/p.css?s=1&k=plm1izr&ht=tk&f=32266&a=23152309&app=typekit&e=css\");@font-face{font-family:\"birra-2\";src:url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:700}.tk-birra-2{font-family:\"birra-2\",serif}" + "content": "@import url(\"https://p.typekit.net/p.css?s=1&k=plm1izr&ht=tk&f=32266&a=23152309&app=typekit&e=css\");@font-face{font-family:\"birra-2\";src:url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/23e0ad/00000000000000003b9b410c/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:700}.tk-birra-2{font-family:\"birra-2\",serif}" }, { "url": "https://use.typekit.net/ucs7mcf.css", - "content": "@import url(\"https://p.typekit.net/p.css?s=1&k=ucs7mcf&ht=tk&f=43886&a=23152309&app=typekit&e=css\");@font-face{font-family:\"flegrei\";src:url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:400}.tk-flegrei{font-family:\"flegrei\",sans-serif}@import url(\"https://p.typekit.net/p.css?s=1&k=ucs7mcf&ht=tk&f=43886&a=23152309&app=typekit&e=css\");@font-face{font-family:\"flegrei\";src:url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:400}.tk-flegrei{font-family:\"flegrei\",sans-serif}" + "content": "@import url(\"https://p.typekit.net/p.css?s=1&k=ucs7mcf&ht=tk&f=43886&a=23152309&app=typekit&e=css\");@font-face{font-family:\"flegrei\";src:url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/74a5d1/00000000000000003b9b3d6e/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:400}.tk-flegrei{font-family:\"flegrei\",sans-serif}" }, { "url": "https://use.typekit.net/erd0sed.css", - "content": "@import url(\"https://p.typekit.net/p.css?s=1&k=erd0sed&ht=tk&f=43885&a=23152309&app=typekit&e=css\");@font-face{font-family:\"pantelleria\";src:url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:400}.tk-pantelleria{font-family:\"pantelleria\",sans-serif}@import url(\"https://p.typekit.net/p.css?s=1&k=erd0sed&ht=tk&f=43885&a=23152309&app=typekit&e=css\");@font-face{font-family:\"pantelleria\";src:url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:400}.tk-pantelleria{font-family:\"pantelleria\",sans-serif}" + "content": "@import url(\"https://p.typekit.net/p.css?s=1&k=erd0sed&ht=tk&f=43885&a=23152309&app=typekit&e=css\");@font-face{font-family:\"pantelleria\";src:url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff2\"),url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"woff\"),url(\"https://use.typekit.net/af/1f141c/00000000000000003b9b3d6f/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3\") format(\"opentype\");font-display:auto;font-style:normal;font-weight:400}.tk-pantelleria{font-family:\"pantelleria\",sans-serif}" } ] diff --git a/test/integration/font-optimization/test/index.test.js b/test/integration/font-optimization/test/index.test.js index da01c47350f83..6ac704e066be8 100644 --- a/test/integration/font-optimization/test/index.test.js +++ b/test/integration/font-optimization/test/index.test.js @@ -54,6 +54,7 @@ describe('Font Optimization', () => { /