diff --git a/package.json b/package.json index 68e71f55f5dcfc9..cea308b687beb6a 100644 --- a/package.json +++ b/package.json @@ -200,7 +200,7 @@ "turbo": "1.3.2-canary.1", "typescript": "4.6.3", "wait-port": "0.2.2", - "webpack": "link:packages/next/node_modules/webpack5", + "webpack": "5.74.0", "webpack-bundle-analyzer": "4.3.0" }, "resolutions": { diff --git a/packages/next/build/babel/loader/types.d.ts b/packages/next/build/babel/loader/types.d.ts index 92ac32b954dbc46..896d2bf55e83557 100644 --- a/packages/next/build/babel/loader/types.d.ts +++ b/packages/next/build/babel/loader/types.d.ts @@ -1,8 +1,9 @@ -import { loader } from 'next/dist/compiled/webpack/webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' import { Span } from '../../../trace' -export interface NextJsLoaderContext extends loader.LoaderContext { +export interface NextJsLoaderContext extends webpack.LoaderContext<{}> { currentTraceSpan: Span + target: string } export interface NextBabelLoaderOptions { diff --git a/packages/next/build/compiler.ts b/packages/next/build/compiler.ts index 41c7202ac9bff24..6f56d4bcaee2d5c 100644 --- a/packages/next/build/compiler.ts +++ b/packages/next/build/compiler.ts @@ -1,16 +1,15 @@ import { webpack } from 'next/dist/compiled/webpack/webpack' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' import { Span } from '../trace' export type CompilerResult = { - errors: webpack5.StatsError[] - warnings: webpack5.StatsError[] - stats: webpack5.Stats | undefined + errors: webpack.StatsError[] + warnings: webpack.StatsError[] + stats: webpack.Stats | undefined } function generateStats( result: CompilerResult, - stat: webpack5.Stats + stat: webpack.Stats ): CompilerResult { const { errors, warnings } = stat.toJson({ preset: 'errors-warnings', @@ -29,7 +28,7 @@ function generateStats( // Webpack 5 requires the compiler to be closed (to save caches) // Webpack 4 does not have this close method so in order to be backwards compatible we check if it exists -function closeCompiler(compiler: webpack5.Compiler | webpack5.MultiCompiler) { +function closeCompiler(compiler: webpack.Compiler | webpack.MultiCompiler) { return new Promise((resolve, reject) => { // @ts-ignore Close only exists on the compiler in webpack 5 return compiler.close((err: any) => (err ? reject(err) : resolve())) @@ -41,7 +40,7 @@ export function runCompiler( { runWebpackSpan }: { runWebpackSpan: Span } ): Promise { return new Promise((resolve, reject) => { - const compiler = webpack(config) as unknown as webpack5.Compiler + const compiler = webpack(config) as unknown as webpack.Compiler compiler.run((err, stats) => { const webpackCloseSpan = runWebpackSpan.traceChild('webpack-close', { name: config.name, diff --git a/packages/next/build/entries.ts b/packages/next/build/entries.ts index 4bea5cdfce4e1bd..50132451edcdaef 100644 --- a/packages/next/build/entries.ts +++ b/packages/next/build/entries.ts @@ -3,7 +3,7 @@ import type { MiddlewareLoaderOptions } from './webpack/loaders/next-middleware- import type { EdgeSSRLoaderQuery } from './webpack/loaders/next-edge-ssr-loader' import type { NextConfigComplete } from '../server/config-shared' import type { ServerlessLoaderQuery } from './webpack/loaders/next-serverless-loader' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import type { LoadedEnvFiles } from '@next/env' import chalk from 'next/dist/compiled/chalk' import { posix, join } from 'path' @@ -231,7 +231,7 @@ export function getServerlessEntry(opts: { page: string previewMode: __ApiPreviewProps pages: { [page: string]: string } -}): ObjectValue { +}): ObjectValue { const loaderParams: ServerlessLoaderQuery = { absolute404Path: opts.pages['/404'] || '', absoluteAppPath: opts.pages['/_app'], @@ -339,9 +339,9 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { appPaths, pageExtensions, } = params - const edgeServer: webpack5.EntryObject = {} - const server: webpack5.EntryObject = {} - const client: webpack5.EntryObject = {} + const edgeServer: webpack.EntryObject = {} + const server: webpack.EntryObject = {} + const client: webpack.EntryObject = {} const nestedMiddleware: string[] = [] let middlewareRegex: string | undefined = undefined @@ -490,10 +490,10 @@ export function finalizeEntrypoint({ }: { compilerType?: CompilerNameValues name: string - value: ObjectValue + value: ObjectValue isServerComponent?: boolean appDir?: boolean -}): ObjectValue { +}): ObjectValue { const entry = typeof value !== 'object' || Array.isArray(value) ? { import: value } diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 458d733c858358a..e07653513653891 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -1,4 +1,4 @@ -import type { webpack5 as webpack } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import { loadEnvConfig } from '@next/env' import chalk from 'next/dist/compiled/chalk' import crypto from 'crypto' diff --git a/packages/next/build/output/index.ts b/packages/next/build/output/index.ts index da24db9a541b78b..0161b35086f19a7 100644 --- a/packages/next/build/output/index.ts +++ b/packages/next/build/output/index.ts @@ -4,16 +4,16 @@ import textTable from 'next/dist/compiled/text-table' import createStore from 'next/dist/compiled/unistore' import formatWebpackMessages from '../../client/dev/error-overlay/format-webpack-messages' import { OutputState, store as consoleStore } from './store' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import { CompilerNameValues, COMPILER_NAMES } from '../../shared/lib/constants' export function startedDevelopmentServer(appUrl: string, bindAddr: string) { consoleStore.setState({ appUrl, bindAddr }) } -let previousClient: webpack5.Compiler | null = null -let previousServer: webpack5.Compiler | null = null -let previousEdgeServer: webpack5.Compiler | null = null +let previousClient: webpack.Compiler | null = null +let previousServer: webpack.Compiler | null = null +let previousEdgeServer: webpack.Compiler | null = null type CompilerDiagnostics = { modules: number @@ -219,9 +219,9 @@ export function ampValidation( } export function watchCompilers( - client: webpack5.Compiler, - server: webpack5.Compiler, - edgeServer: webpack5.Compiler + client: webpack.Compiler, + server: webpack.Compiler, + edgeServer: webpack.Compiler ) { if ( previousClient === client && @@ -240,14 +240,14 @@ export function watchCompilers( function tapCompiler( key: CompilerNameValues, - compiler: webpack5.Compiler, + compiler: webpack.Compiler, onEvent: (status: WebpackStatus) => void ) { compiler.hooks.invalid.tap(`NextJsInvalid-${key}`, () => { onEvent({ loading: true }) }) - compiler.hooks.done.tap(`NextJsDone-${key}`, (stats: webpack5.Stats) => { + compiler.hooks.done.tap(`NextJsDone-${key}`, (stats: webpack.Stats) => { buildStore.setState({ amp: {} }) const { errors, warnings } = formatWebpackMessages( diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index d8d74a63658909a..646fb93e2eca691 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -2,7 +2,6 @@ import ReactRefreshWebpackPlugin from 'next/dist/compiled/@next/react-refresh-ut import chalk from 'next/dist/compiled/chalk' import crypto from 'crypto' import { webpack } from 'next/dist/compiled/webpack/webpack' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' import path, { dirname, join as pathJoin, relative as relativePath } from 'path' import { escapeStringRegexp } from '../shared/lib/escape-regexp' import { @@ -332,27 +331,29 @@ export function attachReactRefresh( const reactRefreshLoaderName = 'next/dist/compiled/@next/react-refresh-utils/dist/loader' const reactRefreshLoader = require.resolve(reactRefreshLoaderName) - webpackConfig.module?.rules.forEach((rule) => { - const curr = rule.use - // When the user has configured `defaultLoaders.babel` for a input file: - if (curr === targetLoader) { - ++injections - rule.use = [reactRefreshLoader, curr as webpack.RuleSetUseItem] - } else if ( - Array.isArray(curr) && - curr.some((r) => r === targetLoader) && - // Check if loader already exists: - !curr.some( - (r) => r === reactRefreshLoader || r === reactRefreshLoaderName - ) - ) { - ++injections - const idx = curr.findIndex((r) => r === targetLoader) - // Clone to not mutate user input - rule.use = [...curr] + webpackConfig.module?.rules?.forEach((rule) => { + if (rule && typeof rule === 'object' && 'use' in rule) { + const curr = rule.use + // When the user has configured `defaultLoaders.babel` for a input file: + if (curr === targetLoader) { + ++injections + rule.use = [reactRefreshLoader, curr as webpack.RuleSetUseItem] + } else if ( + Array.isArray(curr) && + curr.some((r) => r === targetLoader) && + // Check if loader already exists: + !curr.some( + (r) => r === reactRefreshLoader || r === reactRefreshLoaderName + ) + ) { + ++injections + const idx = curr.findIndex((r) => r === targetLoader) + // Clone to not mutate user input + rule.use = [...curr] - // inject / input: [other, babel] output: [other, refresh, babel]: - rule.use.splice(idx, 0, reactRefreshLoader) + // inject / input: [other, babel] output: [other, refresh, babel]: + rule.use.splice(idx, 0, reactRefreshLoader) + } } }) @@ -515,7 +516,7 @@ export default async function getBaseWebpackConfig( config: NextConfigComplete compilerType: CompilerNameValues dev?: boolean - entrypoints: webpack5.EntryObject + entrypoints: webpack.EntryObject hasReactRoot: boolean isDevFallback?: boolean pagesDir: string @@ -1245,7 +1246,9 @@ export default async function getBaseWebpackConfig( moduleIds: isClient ? 'deterministic' : 'named', } : {}), - splitChunks: ((): webpack.Options.SplitChunksOptions | false => { + splitChunks: ((): + | Required['optimization']['splitChunks'] + | false => { // For the edge runtime, we have to bundle all dependencies inside without dynamic `require`s. // To make some dependencies like `react` to be shared between entrypoints, we use a special // cache group here even under dev mode. @@ -1293,12 +1296,13 @@ export default async function getBaseWebpackConfig( // as we don't need a separate vendor chunk from that // and all other chunk depend on them so there is no // duplication that need to be pulled out. - chunks: (chunk) => !/^(polyfills|main|pages\/_app)$/.test(chunk.name), + chunks: (chunk: any) => + !/^(polyfills|main|pages\/_app)$/.test(chunk.name), cacheGroups: { framework: { chunks: 'all', name: 'framework', - test(module) { + test(module: any) { const resource = module.nameForCondition?.() return resource ? topLevelFrameworkPaths.some((pkgPath) => @@ -1833,7 +1837,7 @@ export default async function getBaseWebpackConfig( ) } - const webpack5Config = webpackConfig as webpack5.Configuration + const webpack5Config = webpackConfig as webpack.Configuration if (isEdgeServer) { webpack5Config.module?.rules?.unshift({ @@ -2010,7 +2014,7 @@ export default async function getBaseWebpackConfig( } if (logDefault || profile) { - webpack5Config.plugins!.push((compiler: webpack5.Compiler) => { + webpack5Config.plugins!.push((compiler: webpack.Compiler) => { compiler.hooks.done.tap('next-webpack-logging', (stats) => { console.log( stats.toString({ @@ -2021,7 +2025,7 @@ export default async function getBaseWebpackConfig( }) }) } else if (summary) { - webpack5Config.plugins!.push((compiler: webpack5.Compiler) => { + webpack5Config.plugins!.push((compiler: webpack.Compiler) => { compiler.hooks.done.tap('next-webpack-logging', (stats) => { console.log( stats.toString({ @@ -2036,7 +2040,7 @@ export default async function getBaseWebpackConfig( if (profile) { const ProgressPlugin = - webpack.ProgressPlugin as unknown as typeof webpack5.ProgressPlugin + webpack.ProgressPlugin as unknown as typeof webpack.ProgressPlugin webpack5Config.plugins!.push( new ProgressPlugin({ profile: true, @@ -2098,7 +2102,7 @@ export default async function getBaseWebpackConfig( } // eslint-disable-next-line no-shadow - const webpack5Config = webpackConfig as webpack5.Configuration + const webpack5Config = webpackConfig as webpack.Configuration // disable lazy compilation of entries as next.js has it's own method here if (webpack5Config.experiments?.lazyCompilation === true) { @@ -2123,15 +2127,23 @@ export default async function getBaseWebpackConfig( const rules = webpackConfig.module?.rules || [] const hasCustomSvg = rules.some( (rule) => + rule && + typeof rule === 'object' && rule.loader !== 'next-image-loader' && 'test' in rule && rule.test instanceof RegExp && rule.test.test('.svg') ) const nextImageRule = rules.find( - (rule) => rule.loader === 'next-image-loader' + (rule) => + rule && typeof rule === 'object' && rule.loader === 'next-image-loader' ) - if (hasCustomSvg && nextImageRule) { + if ( + hasCustomSvg && + nextImageRule && + nextImageRule && + typeof nextImageRule === 'object' + ) { // Exclude svg if the user already defined it in custom // webpack config such as `@svgr/webpack` plugin or // the `babel-plugin-inline-react-svg` plugin. @@ -2158,6 +2170,7 @@ export default async function getBaseWebpackConfig( const innerRules = [] for (const rule of webpackConfig.module.rules) { + if (!rule || typeof rule !== 'object') continue if (rule.resolve) { topRules.push(rule) } else { @@ -2230,8 +2243,8 @@ export default async function getBaseWebpackConfig( } const hasUserCssConfig = - webpackConfig.module?.rules.some( - (rule) => canMatchCss(rule.test) || canMatchCss(rule.include) + webpackConfig.module?.rules?.some( + (rule: any) => canMatchCss(rule.test) || canMatchCss(rule.include) ) ?? false if (hasUserCssConfig) { @@ -2246,9 +2259,10 @@ export default async function getBaseWebpackConfig( ) } - if (webpackConfig.module?.rules.length) { + if (webpackConfig.module?.rules?.length) { // Remove default CSS Loaders webpackConfig.module.rules.forEach((r) => { + if (!r || typeof r !== 'object') return if (Array.isArray(r.oneOf)) { r.oneOf = r.oneOf.filter( (o) => (o as any)[Symbol.for('__next_css_remove')] !== true @@ -2286,6 +2300,7 @@ export default async function getBaseWebpackConfig( webpackConfig.module.rules = webpackConfig.module.rules.filter( (rule): boolean => { + if (!rule || typeof rule !== 'object') return true if (!(rule.test instanceof RegExp)) return true if ('noop.ts'.match(rule.test) && !'noop.js'.match(rule.test)) { // remove if it matches @zeit/next-typescript @@ -2402,7 +2417,7 @@ export default async function getBaseWebpackConfig( const originalEntry: any = webpackConfig.entry if (typeof originalEntry !== 'undefined') { const updatedEntry = async () => { - const entry: webpack5.EntryObject = + const entry: webpack.EntryObject = typeof originalEntry === 'function' ? await originalEntry() : originalEntry @@ -2437,9 +2452,9 @@ export default async function getBaseWebpackConfig( webpackConfig.entry = updatedEntry } - if (!dev) { + if (!dev && typeof webpackConfig.entry === 'function') { // entry is always a function - webpackConfig.entry = await (webpackConfig.entry as webpack.EntryFunc)() + webpackConfig.entry = await webpackConfig.entry() } return webpackConfig diff --git a/packages/next/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts b/packages/next/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts index c02a1ccb5207f54..43e91f14aef6992 100644 --- a/packages/next/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts +++ b/packages/next/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts @@ -5,7 +5,7 @@ import { webpack } from 'next/dist/compiled/webpack/webpack' const regexLikeIndexModule = /(?, _: any, exportName: string, options: object diff --git a/packages/next/build/webpack/config/helpers.ts b/packages/next/build/webpack/config/helpers.ts index dad7b07de12d462..b4cfabd59757ebe 100644 --- a/packages/next/build/webpack/config/helpers.ts +++ b/packages/next/build/webpack/config/helpers.ts @@ -10,14 +10,17 @@ export const loader = curry(function loader( } if (rule.oneOf) { - const existing = config.module.rules.find((arrayRule) => arrayRule.oneOf) - if (existing) { + const existing = config.module.rules?.find( + (arrayRule) => + arrayRule && typeof arrayRule === 'object' && arrayRule.oneOf + ) + if (existing && typeof existing === 'object') { existing.oneOf!.push(...rule.oneOf) return config } } - config.module.rules.push(rule) + config.module.rules?.push(rule) return config }) @@ -30,19 +33,22 @@ export const unshiftLoader = curry(function unshiftLoader( } if (rule.oneOf) { - const existing = config.module.rules.find((arrayRule) => arrayRule.oneOf) - if (existing) { - existing.oneOf!.unshift(...rule.oneOf) + const existing = config.module.rules?.find( + (arrayRule) => + arrayRule && typeof arrayRule === 'object' && arrayRule.oneOf + ) + if (existing && typeof existing === 'object') { + existing.oneOf?.unshift(...rule.oneOf) return config } } - config.module.rules.unshift(rule) + config.module.rules?.unshift(rule) return config }) export const plugin = curry(function plugin( - p: webpack.Plugin, + p: webpack.WebpackPluginInstance, config: webpack.Configuration ) { if (!config.plugins) { diff --git a/packages/next/build/webpack/loaders/error-loader.ts b/packages/next/build/webpack/loaders/error-loader.ts index f5957a03946177c..acc9c8be2088ef4 100644 --- a/packages/next/build/webpack/loaders/error-loader.ts +++ b/packages/next/build/webpack/loaders/error-loader.ts @@ -2,12 +2,13 @@ import chalk from 'next/dist/compiled/chalk' import path from 'path' import { webpack } from 'next/dist/compiled/webpack/webpack' -const ErrorLoader: webpack.loader.Loader = function () { +const ErrorLoader: webpack.LoaderDefinitionFunction = function () { // @ts-ignore exists - const options = this.getOptions() || {} + const options = this.getOptions() || ({} as any) const { reason = 'An unknown error has occurred' } = options + // @ts-expect-error const resource = this._module?.issuer?.resource ?? null const context = this.rootContext ?? this._compiler?.context diff --git a/packages/next/build/webpack/loaders/get-module-build-info.ts b/packages/next/build/webpack/loaders/get-module-build-info.ts index e96894a278930ff..2e5365d7b3fe1ad 100644 --- a/packages/next/build/webpack/loaders/get-module-build-info.ts +++ b/packages/next/build/webpack/loaders/get-module-build-info.ts @@ -1,10 +1,10 @@ -import { webpack5 } from 'next/dist/compiled/webpack/webpack' +import { webpack } from 'next/dist/compiled/webpack/webpack' /** * A getter for module build info that casts to the type it should have. * We also expose here types to make easier to use it. */ -export function getModuleBuildInfo(webpackModule: webpack5.Module) { +export function getModuleBuildInfo(webpackModule: webpack.Module) { return webpackModule.buildInfo as { nextEdgeMiddleware?: EdgeMiddlewareMeta nextEdgeApiFunction?: EdgeMiddlewareMeta diff --git a/packages/next/build/webpack/loaders/next-app-loader.ts b/packages/next/build/webpack/loaders/next-app-loader.ts index dce12a991f5f4a4..2f1e9ed84e75b26 100644 --- a/packages/next/build/webpack/loaders/next-app-loader.ts +++ b/packages/next/build/webpack/loaders/next-app-loader.ts @@ -1,4 +1,4 @@ -import type webpack from 'webpack5' +import type webpack from 'webpack' import { NODE_RESOLVE_OPTIONS } from '../../webpack-config' import { getModuleBuildInfo } from './get-module-build-info' diff --git a/packages/next/build/webpack/loaders/next-serverless-loader/index.ts b/packages/next/build/webpack/loaders/next-serverless-loader/index.ts index 879260d278c1549..f11541a03a2666b 100644 --- a/packages/next/build/webpack/loaders/next-serverless-loader/index.ts +++ b/packages/next/build/webpack/loaders/next-serverless-loader/index.ts @@ -33,7 +33,7 @@ export type ServerlessLoaderQuery = { i18n: string } -const nextServerlessLoader: webpack.loader.Loader = function () { +const nextServerlessLoader: webpack.LoaderDefinitionFunction = function () { const { distDir, absolutePagePath, @@ -52,8 +52,9 @@ const nextServerlessLoader: webpack.loader.Loader = function () { previewProps, loadedEnvFiles, i18n, - }: ServerlessLoaderQuery = + }: ServerlessLoaderQuery = ( typeof this.query === 'string' ? parse(this.query.slice(1)) : this.query + ) as any const buildManifest = join(distDir, BUILD_MANIFEST).replace(/\\/g, '/') const reactLoadableManifest = join(distDir, REACT_LOADABLE_MANIFEST).replace( diff --git a/packages/next/build/webpack/loaders/noop-loader.ts b/packages/next/build/webpack/loaders/noop-loader.ts index 258fd1667d592ef..debcaebcdcdefed 100644 --- a/packages/next/build/webpack/loaders/noop-loader.ts +++ b/packages/next/build/webpack/loaders/noop-loader.ts @@ -1,4 +1,4 @@ import { webpack } from 'next/dist/compiled/webpack/webpack' -const NoopLoader: webpack.loader.Loader = (source) => source +const NoopLoader: webpack.LoaderDefinitionFunction = (source) => source export default NoopLoader diff --git a/packages/next/build/webpack/plugins/app-build-manifest-plugin.ts b/packages/next/build/webpack/plugins/app-build-manifest-plugin.ts index f13b8901f4bca92..307595c3ce5010d 100644 --- a/packages/next/build/webpack/plugins/app-build-manifest-plugin.ts +++ b/packages/next/build/webpack/plugins/app-build-manifest-plugin.ts @@ -6,7 +6,6 @@ import { CLIENT_STATIC_FILES_RUNTIME_MAIN_APP, CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH, } from '../../../shared/lib/constants' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' import { getEntrypointFiles } from './build-manifest-plugin' import getAppRouteFromEntrypoint from '../../../server/get-app-route-from-entrypoint' @@ -54,7 +53,7 @@ export class AppBuildManifestPlugin { }) } - private createAsset(assets: any, compilation: webpack5.Compilation) { + private createAsset(assets: any, compilation: webpack.Compilation) { const manifest: AppBuildManifest = { pages: {}, } diff --git a/packages/next/build/webpack/plugins/css-minimizer-plugin.ts b/packages/next/build/webpack/plugins/css-minimizer-plugin.ts index 4a8c28030643a4d..b83c9418b67a877 100644 --- a/packages/next/build/webpack/plugins/css-minimizer-plugin.ts +++ b/packages/next/build/webpack/plugins/css-minimizer-plugin.ts @@ -2,7 +2,6 @@ import cssnanoSimple from 'next/dist/compiled/cssnano-simple' import postcssScss from 'next/dist/compiled/postcss-scss' import postcss, { Parser } from 'postcss' import { webpack, sources } from 'next/dist/compiled/webpack/webpack' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' import { spans } from './profiling-plugin' // https://github.com/NMFR/optimize-css-assets-webpack-plugin/blob/0a410a9bf28c7b0e81a3470a13748e68ca2f50aa/src/index.js#L20 @@ -55,7 +54,7 @@ export class CssMinimizerPlugin { }) } - apply(compiler: webpack5.Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap('CssMinimizerPlugin', (compilation: any) => { const cache = compilation.getCache('CssMinimizerPlugin') compilation.hooks.processAssets.tapPromise( diff --git a/packages/next/build/webpack/plugins/flight-client-entry-plugin.ts b/packages/next/build/webpack/plugins/flight-client-entry-plugin.ts index b4812db7f1c0b58..3a396aabf87e602 100644 --- a/packages/next/build/webpack/plugins/flight-client-entry-plugin.ts +++ b/packages/next/build/webpack/plugins/flight-client-entry-plugin.ts @@ -1,7 +1,6 @@ import { stringify } from 'querystring' import path from 'path' import { webpack, sources } from 'next/dist/compiled/webpack/webpack' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' import { clientComponentRegex } from '../loaders/utils' import { normalizePagePath } from '../../../shared/lib/page-path/normalize-page-path' import { denormalizePagePath } from '../../../shared/lib/page-path/denormalize-page-path' @@ -46,7 +45,7 @@ export class FlightClientEntryPlugin { this.isEdgeServer = options.isEdgeServer } - apply(compiler: webpack5.Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap( PLUGIN_NAME, (compilation, { normalModuleFactory }) => { @@ -91,7 +90,7 @@ export class FlightClientEntryPlugin { } // TODO-APP: create client-side entrypoint per layout/page. - // const entryModule: webpack5.NormalModule = + // const entryModule: webpack.NormalModule = // compilation.moduleGraph.getResolvedModule(entryDependency) // for (const connection of compilation.moduleGraph.getOutgoingConnections( @@ -148,10 +147,10 @@ export class FlightClientEntryPlugin { // @ts-ignore TODO: Remove ignore when webpack 5 is stable stage: webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH, }, - (assets: webpack5.Compilation['assets']) => { + (assets: webpack.Compilation['assets']) => { assets[FLIGHT_SERVER_CSS_MANIFEST + '.json'] = new sources.RawSource( JSON.stringify(flightCSSManifest) - ) as unknown as webpack5.sources.RawSource + ) as unknown as webpack.sources.RawSource } ) @@ -181,7 +180,7 @@ export class FlightClientEntryPlugin { dependencyToFilter: any, segmentPath: string ): void => { - const mod: webpack5.NormalModule = + const mod: webpack.NormalModule = compilation.moduleGraph.getResolvedModule(dependencyToFilter) if (!mod) return diff --git a/packages/next/build/webpack/plugins/flight-manifest-plugin.ts b/packages/next/build/webpack/plugins/flight-manifest-plugin.ts index eff81722042d2b0..0cf8f816557c373 100644 --- a/packages/next/build/webpack/plugins/flight-manifest-plugin.ts +++ b/packages/next/build/webpack/plugins/flight-manifest-plugin.ts @@ -9,7 +9,6 @@ import { webpack, sources } from 'next/dist/compiled/webpack/webpack' import { FLIGHT_MANIFEST } from '../../../shared/lib/constants' import { clientComponentRegex } from '../loaders/utils' import { relative } from 'path' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' // This is the module that will be used to anchor all client references to. // I.e. it will have all the client files as async deps from this point on. @@ -74,7 +73,7 @@ export class FlightManifestPlugin { this.pageExtensions = options.pageExtensions } - apply(compiler: webpack5.Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap( PLUGIN_NAME, (compilation, { normalModuleFactory }) => { @@ -104,8 +103,8 @@ export class FlightManifestPlugin { } createAsset( - assets: webpack5.Compilation['assets'], - compilation: webpack5.Compilation, + assets: webpack.Compilation['assets'], + compilation: webpack.Compilation, context: string ) { const manifest: FlightManifest = { @@ -116,9 +115,9 @@ export class FlightManifestPlugin { compilation.chunkGroups.forEach((chunkGroup) => { function recordModule( - chunk: webpack5.Chunk, + chunk: webpack.Chunk, id: ModuleId, - mod: webpack5.NormalModule + mod: webpack.NormalModule ) { // if appDir is enabled we shouldn't process chunks from // the pages dir @@ -192,7 +191,6 @@ export class FlightManifestPlugin { ...mod.dependencies.map((dep) => { // Match CommonJsSelfReferenceDependency if (dep.type === 'cjs self exports reference') { - // `module.exports = ...` // @ts-expect-error: TODO: Fix Dependency type if (dep.base === 'module.exports') { return 'default' @@ -253,7 +251,7 @@ export class FlightManifestPlugin { moduleExportedKeys.forEach((name) => { let requiredChunks: ManifestChunks = [] if (!moduleExports[name]) { - const isRelatedChunk = (c: webpack5.Chunk) => + const isRelatedChunk = (c: webpack.Chunk) => // If current chunk is a page, it should require the related page chunk; // If current chunk is a component, it should filter out the related page chunk; chunk.name?.startsWith('pages/') || !c.name?.startsWith('pages/') @@ -261,7 +259,7 @@ export class FlightManifestPlugin { if (appDir) { requiredChunks = chunkGroup.chunks .filter(isRelatedChunk) - .map((requiredChunk: webpack5.Chunk) => { + .map((requiredChunk: webpack.Chunk) => { return ( requiredChunk.id + ':' + @@ -291,11 +289,11 @@ export class FlightManifestPlugin { manifest.__ssr_module_mapping__ = moduleIdMapping } - chunkGroup.chunks.forEach((chunk: webpack5.Chunk) => { + chunkGroup.chunks.forEach((chunk: webpack.Chunk) => { const chunkModules = compilation.chunkGraph.getChunkModulesIterable( chunk // TODO: Update type so that it doesn't have to be cast. - ) as Iterable + ) as Iterable for (const mod of chunkModules) { const modId = compilation.chunkGraph.getModuleId(mod) @@ -320,11 +318,11 @@ export class FlightManifestPlugin { 'self.__RSC_MANIFEST=' + json // Work around webpack 4 type of RawSource being used // TODO: use webpack 5 type by default - ) as unknown as webpack5.sources.RawSource + ) as unknown as webpack.sources.RawSource assets[file + '.json'] = new sources.RawSource( json // Work around webpack 4 type of RawSource being used // TODO: use webpack 5 type by default - ) as unknown as webpack5.sources.RawSource + ) as unknown as webpack.sources.RawSource } } 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 a35d3124da2d71d..50138e281da0bf4 100644 --- a/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts +++ b/packages/next/build/webpack/plugins/font-stylesheet-gathering-plugin.ts @@ -58,7 +58,7 @@ export class FontStylesheetGatheringPlugin { } private parserHandler = ( - factory: webpack.compilation.NormalModuleFactory + factory: ReturnType ): void => { const JS_TYPES = ['auto', 'esm', 'dynamic'] // Do an extra walk per module and add interested visitors to the walk. @@ -230,6 +230,7 @@ export class FontStylesheetGatheringPlugin { } } + // @ts-expect-error invalid assets type compilation.assets[FONT_MANIFEST] = new sources.RawSource( JSON.stringify(this.manifestContent, null, ' ') ) diff --git a/packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts b/packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts index 43b2f594de47156..287a07ffb7821ef 100644 --- a/packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts +++ b/packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts @@ -166,7 +166,7 @@ type Paths = { [match: string]: string[] } * Largely based on how the TypeScript compiler handles it: * https://github.com/microsoft/TypeScript/blob/1a9c8197fffe3dace5f8dca6633d450a88cba66d/src/compiler/moduleNameResolver.ts#L1362 */ -export class JsConfigPathsPlugin implements webpack.ResolvePlugin { +export class JsConfigPathsPlugin implements webpack.ResolvePluginInstance { paths: Paths resolvedBaseUrl: string constructor(paths: Paths, resolvedBaseUrl: string) { diff --git a/packages/next/build/webpack/plugins/middleware-plugin.ts b/packages/next/build/webpack/plugins/middleware-plugin.ts index 3678b8a960a05f8..48bc6528bc880fb 100644 --- a/packages/next/build/webpack/plugins/middleware-plugin.ts +++ b/packages/next/build/webpack/plugins/middleware-plugin.ts @@ -6,7 +6,7 @@ import type { EdgeSSRMeta } from '../loaders/get-module-build-info' import { getNamedMiddlewareRegex } from '../../../shared/lib/router/utils/route-regex' import { getModuleBuildInfo } from '../loaders/get-module-build-info' import { getSortedRoutes } from '../../../shared/lib/router/utils' -import { webpack, sources, webpack5 } from 'next/dist/compiled/webpack/webpack' +import { webpack, sources } from 'next/dist/compiled/webpack/webpack' import { EDGE_RUNTIME_WEBPACK, EDGE_UNSUPPORTED_NODE_APIS, @@ -57,11 +57,11 @@ const middlewareManifest: MiddlewareManifest = { * simply truthy it will return true. */ function isUsingIndirectEvalAndUsedByExports(args: { - entryModule: webpack5.Module - moduleGraph: webpack5.ModuleGraph + entryModule: webpack.Module + moduleGraph: webpack.ModuleGraph runtime: any usingIndirectEval: true | Set - wp: typeof webpack5 + wp: typeof webpack }): boolean { const { moduleGraph, runtime, entryModule, usingIndirectEval, wp } = args if (typeof usingIndirectEval === 'boolean') { @@ -113,7 +113,7 @@ function getEntryFiles(entryFiles: string[], meta: EntryMetadata) { } function getCreateAssets(params: { - compilation: webpack5.Compilation + compilation: webpack.Compilation metadataByEntry: Map }) { const { compilation, metadataByEntry } = params @@ -180,9 +180,9 @@ function buildWebpackError({ }: { message: string loc?: any - compilation: webpack5.Compilation - entryModule?: webpack5.Module - parser?: webpack5.javascript.JavascriptParser + compilation: webpack.Compilation + entryModule?: webpack.Module + parser?: webpack.javascript.JavascriptParser }) { const error = new compilation.compiler.webpack.WebpackError(message) error.name = NAME @@ -194,11 +194,11 @@ function buildWebpackError({ return error } -function isInMiddlewareLayer(parser: webpack5.javascript.JavascriptParser) { +function isInMiddlewareLayer(parser: webpack.javascript.JavascriptParser) { return parser.state.module?.layer === 'middleware' } -function isInMiddlewareFile(parser: webpack5.javascript.JavascriptParser) { +function isInMiddlewareFile(parser: webpack.javascript.JavascriptParser) { return ( parser.state.current?.layer === 'middleware' && /middleware\.\w+$/.test(parser.state.current?.rawRequest) @@ -235,8 +235,8 @@ function buildUnsupportedApiError({ }: { apiName: string loc: any - compilation: webpack5.Compilation - parser: webpack5.javascript.JavascriptParser + compilation: webpack.Compilation + parser: webpack.javascript.JavascriptParser }) { return buildWebpackError({ message: `A Node.js API is used (${apiName} at line: ${loc.start.line}) which is not supported in the Edge Runtime. @@ -247,8 +247,8 @@ Learn more: https://nextjs.org/docs/api-reference/edge-runtime`, } function registerUnsupportedApiHooks( - parser: webpack5.javascript.JavascriptParser, - compilation: webpack5.Compilation + parser: webpack.javascript.JavascriptParser, + compilation: webpack.Compilation ) { for (const expression of EDGE_UNSUPPORTED_NODE_APIS) { const warnForUnsupportedApi = (node: any) => { @@ -300,10 +300,10 @@ function registerUnsupportedApiHooks( function getCodeAnalyzer(params: { dev: boolean - compiler: webpack5.Compiler - compilation: webpack5.Compilation + compiler: webpack.Compiler + compilation: webpack.Compilation }) { - return (parser: webpack5.javascript.JavascriptParser) => { + return (parser: webpack.javascript.JavascriptParser) => { const { dev, compiler: { webpack: wp }, @@ -573,8 +573,8 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`, } function getExtractMetadata(params: { - compilation: webpack5.Compilation - compiler: webpack5.Compiler + compilation: webpack.Compilation + compiler: webpack.Compiler dev: boolean metadataByEntry: Map }) { @@ -590,7 +590,7 @@ function getExtractMetadata(params: { } const { moduleGraph } = compilation - const entryModules = new Set() + const entryModules = new Set() const addEntriesFromDependency = (dependency: any) => { const module = moduleGraph.getModule(dependency) if (module) { @@ -709,7 +709,7 @@ export default class MiddlewarePlugin { this.dev = dev } - apply(compiler: webpack5.Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap(NAME, (compilation, params) => { const { hooks } = params.normalModuleFactory /** diff --git a/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts b/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts index ac942e0953d4b1e..300fb59ffe7f719 100644 --- a/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts +++ b/packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts @@ -1,15 +1,13 @@ import { webpack } from 'next/dist/compiled/webpack/webpack' import { STRING_LITERAL_DROP_BUNDLE } from '../../../shared/lib/constants' -export const ampFirstEntryNamesMap: WeakMap< - webpack.compilation.Compilation, - string[] -> = new WeakMap() +export const ampFirstEntryNamesMap: WeakMap = + new WeakMap() const PLUGIN_NAME = 'DropAmpFirstPagesPlugin' // Prevents outputting client pages when they are not needed -export class DropClientPage implements webpack.Plugin { +export class DropClientPage implements webpack.WebpackPluginInstance { ampPages = new Set() apply(compiler: webpack.Compiler) { @@ -17,7 +15,7 @@ export class DropClientPage implements webpack.Plugin { PLUGIN_NAME, (compilation: any, { normalModuleFactory }: any) => { // Recursively look up the issuer till it ends up at the root - function findEntryModule(mod: any): webpack.compilation.Module | null { + function findEntryModule(mod: any): webpack.Module | null { const queue = new Set([mod]) for (const module of queue) { // @ts-ignore TODO: webpack 5 types diff --git a/packages/next/build/webpack/plugins/next-trace-entrypoints-plugin.ts b/packages/next/build/webpack/plugins/next-trace-entrypoints-plugin.ts index 24bb7fda73917ec..cd99b9d530c8b37 100644 --- a/packages/next/build/webpack/plugins/next-trace-entrypoints-plugin.ts +++ b/packages/next/build/webpack/plugins/next-trace-entrypoints-plugin.ts @@ -8,7 +8,6 @@ import { } from 'next/dist/compiled/@vercel/nft' import { TRACE_OUTPUT_VERSION } from '../../../shared/lib/constants' import { webpack, sources } from 'next/dist/compiled/webpack/webpack' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' import { NODE_ESM_RESOLVE_OPTIONS, NODE_RESOLVE_OPTIONS, @@ -25,7 +24,7 @@ const TRACE_IGNORES = [ function getModuleFromDependency( compilation: any, dep: any -): webpack5.Module & { resource?: string } { +): webpack.Module & { resource?: string } { return compilation.moduleGraph.getModule(dep) } @@ -83,7 +82,7 @@ function getFilesMapFromReasons( return parentFilesMap } -export class TraceEntryPointsPlugin implements webpack5.WebpackPluginInstance { +export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { private appDir: string private tracingRoot: string private entryTraces: Map> @@ -229,7 +228,7 @@ export class TraceEntryPointsPlugin implements webpack5.WebpackPluginInstance { } tapfinishModules( - compilation: webpack5.Compilation, + compilation: webpack.Compilation, traceEntrypointsPluginSpan: Span, doResolve: ( request: string, @@ -420,7 +419,7 @@ export class TraceEntryPointsPlugin implements webpack5.WebpackPluginInstance { ) } - apply(compiler: webpack5.Compiler) { + apply(compiler: webpack.Compiler) { compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => { const readlink = async (path: string): Promise => { try { diff --git a/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts b/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts index 41727741008dad4..bbea9145a5a64e7 100644 --- a/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts +++ b/packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.ts @@ -1,11 +1,11 @@ -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import { clearModuleContext } from '../../../server/web/sandbox' import { realpathSync } from 'fs' import path from 'path' import isError from '../../../lib/is-error' -type Compiler = webpack5.Compiler -type WebpackPluginInstance = webpack5.WebpackPluginInstance +type Compiler = webpack.Compiler +type WebpackPluginInstance = webpack.WebpackPluginInstance const originModules = [ require.resolve('../../../server/require'), diff --git a/packages/next/build/webpack/plugins/pages-manifest-plugin.ts b/packages/next/build/webpack/plugins/pages-manifest-plugin.ts index 86dbb50a51207c0..e661c18621e86bb 100644 --- a/packages/next/build/webpack/plugins/pages-manifest-plugin.ts +++ b/packages/next/build/webpack/plugins/pages-manifest-plugin.ts @@ -16,7 +16,9 @@ let nodeServerAppPaths = {} // This plugin creates a pages-manifest.json from page entrypoints. // This is used for mapping paths like `/` to `.next/server/static//pages/index.js` when doing SSR // It's also used by next export to provide defaultPathMap -export default class PagesManifestPlugin implements webpack.Plugin { +export default class PagesManifestPlugin + implements webpack.WebpackPluginInstance +{ serverless: boolean dev: boolean isEdgeRuntime: boolean diff --git a/packages/next/build/webpack/plugins/profiling-plugin.ts b/packages/next/build/webpack/plugins/profiling-plugin.ts index 7712dd691a366ab..df1283ab3b7a5f1 100644 --- a/packages/next/build/webpack/plugins/profiling-plugin.ts +++ b/packages/next/build/webpack/plugins/profiling-plugin.ts @@ -1,6 +1,6 @@ import { NormalModule } from 'next/dist/compiled/webpack/webpack' import { Span } from '../../../trace' -import type { webpack5 as webpack } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' const pluginName = 'ProfilingPlugin' export const spans = new WeakMap() diff --git a/packages/next/build/webpack/plugins/react-loadable-plugin.ts b/packages/next/build/webpack/plugins/react-loadable-plugin.ts index 18fd1e283eec28d..aacb383b5dd0427 100644 --- a/packages/next/build/webpack/plugins/react-loadable-plugin.ts +++ b/packages/next/build/webpack/plugins/react-loadable-plugin.ts @@ -46,13 +46,13 @@ function getOriginModuleFromDependency( function getChunkGroupFromBlock( compilation: any, block: any -): webpack.compilation.ChunkGroup { +): webpack.Compilation['chunkGroups'] { return compilation.chunkGraph.getBlockChunkGroup(block) } function buildManifest( _compiler: webpack.Compiler, - compilation: webpack.compilation.Compilation, + compilation: webpack.Compilation, pagesDir: string, dev: boolean ) { @@ -109,7 +109,7 @@ function buildManifest( // the module id and no files if (chunkGroup) { for (const chunk of (chunkGroup as any) - .chunks as webpack.compilation.Chunk[]) { + .chunks as webpack.Compilation['chunks']) { chunk.files.forEach((file: string) => { if ( (file.endsWith('.js') || file.endsWith('.css')) && diff --git a/packages/next/build/webpack/plugins/telemetry-plugin.ts b/packages/next/build/webpack/plugins/telemetry-plugin.ts index 5844a64408d2265..2580ba8a411d6d9 100644 --- a/packages/next/build/webpack/plugins/telemetry-plugin.ts +++ b/packages/next/build/webpack/plugins/telemetry-plugin.ts @@ -1,7 +1,4 @@ -import { - NormalModule, - webpack5 as webpack, -} from 'next/dist/compiled/webpack/webpack' +import { NormalModule, webpack } from 'next/dist/compiled/webpack/webpack' /** * List of target triples next-swc native binary supports. diff --git a/packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts b/packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts index ed951fd326c7167..05557b1fb6f18ba 100644 --- a/packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts +++ b/packages/next/build/webpack/plugins/wellknown-errors-plugin/index.ts @@ -1,4 +1,4 @@ -import type { webpack5 as webpack } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import { getModuleBuildError } from './webpackModuleError' diff --git a/packages/next/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts b/packages/next/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts index e4a7819278296cc..5591dfa93a54dc4 100644 --- a/packages/next/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts +++ b/packages/next/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts @@ -1,7 +1,7 @@ import Chalk from 'next/dist/compiled/chalk' import { SimpleWebpackError } from './simpleWebpackError' import { createOriginalStackFrame } from 'next/dist/compiled/@next/react-dev-overlay/dist/middleware' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' const chalk = new Chalk.constructor({ enabled: true }) @@ -46,7 +46,7 @@ function getModuleTrace(input: any, compilation: any) { } export async function getNotFoundError( - compilation: webpack5.Compilation, + compilation: webpack.Compilation, input: any, fileName: string ) { diff --git a/packages/next/build/webpack/plugins/wellknown-errors-plugin/simpleWebpackError.ts b/packages/next/build/webpack/plugins/wellknown-errors-plugin/simpleWebpackError.ts index ac2d3263683fa0d..c53e5bb1d873f4e 100644 --- a/packages/next/build/webpack/plugins/wellknown-errors-plugin/simpleWebpackError.ts +++ b/packages/next/build/webpack/plugins/wellknown-errors-plugin/simpleWebpackError.ts @@ -1,4 +1,4 @@ -import type { webpack5 as webpack } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' // This class creates a simplified webpack error that formats nicely based on // webpack's build in serializer. diff --git a/packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts b/packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts index ddada05f8c98dba..d53997d80abc017 100644 --- a/packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts +++ b/packages/next/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs' import * as path from 'path' -import type { webpack5 as webpack } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import { getBabelError } from './parseBabel' import { getCssError } from './parseCss' diff --git a/packages/next/bundles/webpack/bundle5.js b/packages/next/bundles/webpack/bundle5.js index 79e71c499ca8c1c..e0d8eccdb264992 100644 --- a/packages/next/bundles/webpack/bundle5.js +++ b/packages/next/bundles/webpack/bundle5.js @@ -2,23 +2,23 @@ module.exports = function () { return { - BasicEvaluatedExpression: require('webpack5/lib/javascript/BasicEvaluatedExpression'), - ModuleFilenameHelpers: require('webpack5/lib/ModuleFilenameHelpers'), - NodeTargetPlugin: require('webpack5/lib/node/NodeTargetPlugin'), - NodeTemplatePlugin: require('webpack5/lib/node/NodeTemplatePlugin'), - LibraryTemplatePlugin: require('webpack5/lib/LibraryTemplatePlugin'), - LimitChunkCountPlugin: require('webpack5/lib/optimize/LimitChunkCountPlugin'), - WebWorkerTemplatePlugin: require('webpack5/lib/webworker/WebWorkerTemplatePlugin'), - ExternalsPlugin: require('webpack5/lib/ExternalsPlugin'), - SingleEntryPlugin: require('webpack5/lib/SingleEntryPlugin'), - FetchCompileAsyncWasmPlugin: require('webpack5/lib/web/FetchCompileAsyncWasmPlugin'), - FetchCompileWasmPlugin: require('webpack5/lib/web/FetchCompileWasmPlugin'), - StringXor: require('webpack5/lib/util/StringXor'), - NormalModule: require('webpack5/lib/NormalModule'), - sources: require('webpack5').sources, - webpack: require('webpack5'), + BasicEvaluatedExpression: require('webpack/lib/javascript/BasicEvaluatedExpression'), + ModuleFilenameHelpers: require('webpack/lib/ModuleFilenameHelpers'), + NodeTargetPlugin: require('webpack/lib/node/NodeTargetPlugin'), + NodeTemplatePlugin: require('webpack/lib/node/NodeTemplatePlugin'), + LibraryTemplatePlugin: require('webpack/lib/LibraryTemplatePlugin'), + LimitChunkCountPlugin: require('webpack/lib/optimize/LimitChunkCountPlugin'), + WebWorkerTemplatePlugin: require('webpack/lib/webworker/WebWorkerTemplatePlugin'), + ExternalsPlugin: require('webpack/lib/ExternalsPlugin'), + SingleEntryPlugin: require('webpack/lib/SingleEntryPlugin'), + FetchCompileAsyncWasmPlugin: require('webpack/lib/web/FetchCompileAsyncWasmPlugin'), + FetchCompileWasmPlugin: require('webpack/lib/web/FetchCompileWasmPlugin'), + StringXor: require('webpack/lib/util/StringXor'), + NormalModule: require('webpack/lib/NormalModule'), + sources: require('webpack').sources, + webpack: require('webpack'), package: { - version: require('webpack5/package.json').version, + version: require('webpack/package.json').version, }, } } diff --git a/packages/next/bundles/webpack/packages/webpack.d.ts b/packages/next/bundles/webpack/packages/webpack.d.ts index b675b70020c968b..867d7d63fcafead 100644 --- a/packages/next/bundles/webpack/packages/webpack.d.ts +++ b/packages/next/bundles/webpack/packages/webpack.d.ts @@ -1,11 +1,6 @@ export namespace webpack { export type Compiler = any export type Plugin = any -} - -export namespace webpack5 { - export type Compiler = any - export type Plugin = any export type Configuration = any export type StatsError = any export type Stats = any diff --git a/packages/next/bundles/webpack/packages/webpack.js b/packages/next/bundles/webpack/packages/webpack.js index 6e0cc598e4d25c7..e4eccb4b126a3a4 100644 --- a/packages/next/bundles/webpack/packages/webpack.js +++ b/packages/next/bundles/webpack/packages/webpack.js @@ -3,22 +3,22 @@ exports.__esModule = true exports.default = undefined exports.init = function () { - if (process.env.NEXT_PRIVATE_LOCAL_WEBPACK5) { + if (process.env.NEXT_PRIVATE_LOCAL_webpack) { Object.assign(exports, { // eslint-disable-next-line import/no-extraneous-dependencies - BasicEvaluatedExpression: require('webpack5/lib/javascript/BasicEvaluatedExpression'), + BasicEvaluatedExpression: require('webpack/lib/javascript/BasicEvaluatedExpression'), // eslint-disable-next-line import/no-extraneous-dependencies - ModuleFilenameHelpers: require('webpack5/lib/ModuleFilenameHelpers'), + ModuleFilenameHelpers: require('webpack/lib/ModuleFilenameHelpers'), // eslint-disable-next-line import/no-extraneous-dependencies - NodeTargetPlugin: require('webpack5/lib/node/NodeTargetPlugin'), + NodeTargetPlugin: require('webpack/lib/node/NodeTargetPlugin'), // eslint-disable-next-line import/no-extraneous-dependencies - StringXor: require('webpack5/lib/util/StringXor'), + StringXor: require('webpack/lib/util/StringXor'), // eslint-disable-next-line import/no-extraneous-dependencies - NormalModule: require('webpack5/lib/NormalModule'), + NormalModule: require('webpack/lib/NormalModule'), // eslint-disable-next-line import/no-extraneous-dependencies - sources: require('webpack5').sources, + sources: require('webpack').sources, // eslint-disable-next-line import/no-extraneous-dependencies - webpack: require('webpack5'), + webpack: require('webpack'), }) } else { Object.assign(exports, require('./bundle5')()) diff --git a/packages/next/compiled/mini-css-extract-plugin/cjs.js b/packages/next/compiled/mini-css-extract-plugin/cjs.js index 0056ef466826612..3395a88d4956731 100644 --- a/packages/next/compiled/mini-css-extract-plugin/cjs.js +++ b/packages/next/compiled/mini-css-extract-plugin/cjs.js @@ -1 +1 @@ -(()=>{"use strict";var e={471:(e,r,_)=>{e.exports=_(717)["default"]},717:e=>{e.exports=require("./index.js")}};var r={};function __nccwpck_require__(_){var t=r[_];if(t!==undefined){return t.exports}var a=r[_]={exports:{}};var i=true;try{e[_](a,a.exports,__nccwpck_require__);i=false}finally{if(i)delete r[_]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var _=__nccwpck_require__(471);module.exports=_})(); \ No newline at end of file +(()=>{"use strict";var e={825:(e,r,_)=>{e.exports=_(717)["default"]},717:e=>{e.exports=require("./index.js")}};var r={};function __nccwpck_require__(_){var t=r[_];if(t!==undefined){return t.exports}var a=r[_]={exports:{}};var i=true;try{e[_](a,a.exports,__nccwpck_require__);i=false}finally{if(i)delete r[_]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var _=__nccwpck_require__(825);module.exports=_})(); \ No newline at end of file diff --git a/packages/next/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js b/packages/next/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js index 6e4172917816ce8..9eded97549090a7 100644 --- a/packages/next/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +++ b/packages/next/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js @@ -1 +1 @@ -(()=>{"use strict";var e={722:(e,r,t)=>{var n=t(121);var i=Object.create(null);var a=typeof document==="undefined";var o=Array.prototype.forEach;function debounce(e,r){var t=0;return function(){var n=this;var i=arguments;var a=function functionCall(){return e.apply(n,i)};clearTimeout(t);t=setTimeout(a,r)}}function noop(){}function getCurrentScriptUrl(e){var r=i[e];if(!r){if(document.currentScript){r=document.currentScript.src}else{var t=document.getElementsByTagName("script");var a=t[t.length-1];if(a){r=a.src}}i[e]=r}return function(e){if(!r){return null}var t=r.split(/([^\\/]+)\.js$/);var i=t&&t[1];if(!i){return[r.replace(".js",".css")]}if(!e){return[r.replace(".js",".css")]}return e.split(",").map((function(e){var t=new RegExp("".concat(i,"\\.js$"),"g");return n(r.replace(t,"".concat(e.replace(/{fileName}/g,i),".css")))}))}}function updateCss(e,r){if(!r){if(!e.href){return}r=e.href.split("?")[0]}if(!isUrlRequest(r)){return}if(e.isLoaded===false){return}if(!r||!(r.indexOf(".css")>-1)){return}e.visited=true;var t=e.cloneNode();t.isLoaded=false;t.addEventListener("load",(function(){if(t.isLoaded){return}t.isLoaded=true;e.parentNode.removeChild(e)}));t.addEventListener("error",(function(){if(t.isLoaded){return}t.isLoaded=true;e.parentNode.removeChild(e)}));t.href="".concat(r,"?").concat(Date.now());if(e.nextSibling){e.parentNode.insertBefore(t,e.nextSibling)}else{e.parentNode.appendChild(t)}}function getReloadUrl(e,r){var t;e=n(e,{stripWWW:false});r.some((function(n){if(e.indexOf(r)>-1){t=n}}));return t}function reloadStyle(e){if(!e){return false}var r=document.querySelectorAll("link");var t=false;o.call(r,(function(r){if(!r.href){return}var n=getReloadUrl(r.href,e);if(!isUrlRequest(n)){return}if(r.visited===true){return}if(n){updateCss(r,n);t=true}}));return t}function reloadAll(){var e=document.querySelectorAll("link");o.call(e,(function(e){if(e.visited===true){return}updateCss(e)}))}function isUrlRequest(e){if(!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e)){return false}return true}e.exports=function(e,r){if(a){console.log("no window.document found, will not HMR CSS");return noop}var t=getCurrentScriptUrl(e);function update(){var e=t(r.filename);var n=reloadStyle(e);if(r.locals){console.log("[HMR] Detected local css modules. Reload all css");reloadAll();return}if(n){console.log("[HMR] css reload %s",e.join(" "))}else{console.log("[HMR] Reload all css");reloadAll()}}return debounce(update,50)}},121:e=>{function normalizeUrl(e){return e.reduce((function(e,r){switch(r){case"..":e.pop();break;case".":break;default:e.push(r)}return e}),[]).join("/")}e.exports=function(e){e=e.trim();if(/^data:/i.test(e)){return e}var r=e.indexOf("//")!==-1?e.split("//")[0]+"//":"";var t=e.replace(new RegExp(r,"i"),"").split("/");var n=t[0].toLowerCase().replace(/\.$/,"");t[0]="";var i=normalizeUrl(t);return r+n+i}}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var i=r[t]={exports:{}};var a=true;try{e[t](i,i.exports,__nccwpck_require__);a=false}finally{if(a)delete r[t]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(722);module.exports=t})(); \ No newline at end of file +(()=>{"use strict";var e={370:(e,r,t)=>{var n=t(598);var i=Object.create(null);var a=typeof document==="undefined";var o=Array.prototype.forEach;function debounce(e,r){var t=0;return function(){var n=this;var i=arguments;var a=function functionCall(){return e.apply(n,i)};clearTimeout(t);t=setTimeout(a,r)}}function noop(){}function getCurrentScriptUrl(e){var r=i[e];if(!r){if(document.currentScript){r=document.currentScript.src}else{var t=document.getElementsByTagName("script");var a=t[t.length-1];if(a){r=a.src}}i[e]=r}return function(e){if(!r){return null}var t=r.split(/([^\\/]+)\.js$/);var i=t&&t[1];if(!i){return[r.replace(".js",".css")]}if(!e){return[r.replace(".js",".css")]}return e.split(",").map((function(e){var t=new RegExp("".concat(i,"\\.js$"),"g");return n(r.replace(t,"".concat(e.replace(/{fileName}/g,i),".css")))}))}}function updateCss(e,r){if(!r){if(!e.href){return}r=e.href.split("?")[0]}if(!isUrlRequest(r)){return}if(e.isLoaded===false){return}if(!r||!(r.indexOf(".css")>-1)){return}e.visited=true;var t=e.cloneNode();t.isLoaded=false;t.addEventListener("load",(function(){if(t.isLoaded){return}t.isLoaded=true;e.parentNode.removeChild(e)}));t.addEventListener("error",(function(){if(t.isLoaded){return}t.isLoaded=true;e.parentNode.removeChild(e)}));t.href="".concat(r,"?").concat(Date.now());if(e.nextSibling){e.parentNode.insertBefore(t,e.nextSibling)}else{e.parentNode.appendChild(t)}}function getReloadUrl(e,r){var t;e=n(e,{stripWWW:false});r.some((function(n){if(e.indexOf(r)>-1){t=n}}));return t}function reloadStyle(e){if(!e){return false}var r=document.querySelectorAll("link");var t=false;o.call(r,(function(r){if(!r.href){return}var n=getReloadUrl(r.href,e);if(!isUrlRequest(n)){return}if(r.visited===true){return}if(n){updateCss(r,n);t=true}}));return t}function reloadAll(){var e=document.querySelectorAll("link");o.call(e,(function(e){if(e.visited===true){return}updateCss(e)}))}function isUrlRequest(e){if(!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e)){return false}return true}e.exports=function(e,r){if(a){console.log("no window.document found, will not HMR CSS");return noop}var t=getCurrentScriptUrl(e);function update(){var e=t(r.filename);var n=reloadStyle(e);if(r.locals){console.log("[HMR] Detected local css modules. Reload all css");reloadAll();return}if(n){console.log("[HMR] css reload %s",e.join(" "))}else{console.log("[HMR] Reload all css");reloadAll()}}return debounce(update,50)}},598:e=>{function normalizeUrl(e){return e.reduce((function(e,r){switch(r){case"..":e.pop();break;case".":break;default:e.push(r)}return e}),[]).join("/")}e.exports=function(e){e=e.trim();if(/^data:/i.test(e)){return e}var r=e.indexOf("//")!==-1?e.split("//")[0]+"//":"";var t=e.replace(new RegExp(r,"i"),"").split("/");var n=t[0].toLowerCase().replace(/\.$/,"");t[0]="";var i=normalizeUrl(t);return r+n+i}}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var i=r[t]={exports:{}};var a=true;try{e[t](i,i.exports,__nccwpck_require__);a=false}finally{if(a)delete r[t]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(370);module.exports=t})(); \ No newline at end of file diff --git a/packages/next/compiled/mini-css-extract-plugin/index.js b/packages/next/compiled/mini-css-extract-plugin/index.js index 675159f92055567..e3bc84b1df146fd 100644 --- a/packages/next/compiled/mini-css-extract-plugin/index.js +++ b/packages/next/compiled/mini-css-extract-plugin/index.js @@ -1 +1 @@ -(()=>{"use strict";var e={722:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.SINGLE_DOT_PATH_SEGMENT=t.MODULE_TYPE=t.AUTO_PUBLIC_PATH=t.ABSOLUTE_PUBLIC_PATH=void 0;t.compareModulesByIdentifier=compareModulesByIdentifier;t.evalModuleCode=evalModuleCode;t.findModuleById=findModuleById;t.getUndoPath=getUndoPath;t.stringifyRequest=stringifyRequest;t.trueFn=trueFn;var s=_interopRequireDefault(n(188));var i=_interopRequireDefault(n(17));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function trueFn(){return true}function findModuleById(e,t){const{modules:n,chunkGraph:s}=e;for(const e of n){const n=typeof s!=="undefined"?s.getModuleId(e):e.id;if(n===t){return e}}return null}function evalModuleCode(e,t,n){const i=new s.default(n,e);i.paths=s.default._nodeModulePaths(e.context);i.filename=n;i._compile(t,n);return i.exports}function compareIds(e,t){if(typeof e!==typeof t){return typeof et){return 1}return 0}function compareModulesByIdentifier(e,t){return compareIds(e.identifier(),t.identifier())}const r="css/mini-extract";t.MODULE_TYPE=r;const o="__mini_css_extract_plugin_public_path_auto__";t.AUTO_PUBLIC_PATH=o;const a="webpack:///mini-css-extract-plugin/";t.ABSOLUTE_PUBLIC_PATH=a;const u="__mini_css_extract_plugin_single_dot_path_segment__";t.SINGLE_DOT_PATH_SEGMENT=u;function isAbsolutePath(e){return i.default.posix.isAbsolute(e)||i.default.win32.isAbsolute(e)}const l=/^\.\.?[/\\]/;function isRelativePath(e){return l.test(e)}function stringifyRequest(e,t){if(typeof e.utils!=="undefined"&&typeof e.utils.contextify==="function"){return JSON.stringify(e.utils.contextify(e.context,t))}const n=t.split("!");const{context:s}=e;return JSON.stringify(n.map((e=>{const t=e.match(/^(.*?)(\?.*)/);const n=t?t[2]:"";let r=t?t[1]:e;if(isAbsolutePath(r)&&s){r=i.default.relative(s,r);if(isAbsolutePath(r)){return r+n}if(isRelativePath(r)===false){r=`./${r}`}}return r.replace(/\\/g,"/")+n})).join("!"))}function getUndoPath(e,t,n){let s=-1;let i="";t=t.replace(/[\\/]$/,"");for(const n of e.split(/[/\\]+/)){if(n===".."){if(s>-1){s--}else{const e=t.lastIndexOf("/");const n=t.lastIndexOf("\\");const s=e<0?n:n<0?e:Math.max(e,n);if(s<0){return`${t}/`}i=`${t.slice(s+1)}/${i}`;t=t.slice(0,s)}}else if(n!=="."){s++}}return s>0?`${"../".repeat(s)}${i}`:n?`./${i}`:i}},188:e=>{e.exports=require("module")},476:e=>{e.exports=require("next/dist/compiled/schema-utils3")},17:e=>{e.exports=require("path")},3:e=>{e.exports=JSON.parse('{"title":"Mini CSS Extract Plugin options","type":"object","additionalProperties":false,"properties":{"filename":{"anyOf":[{"type":"string"},{"instanceof":"Function"}],"description":"This option determines the name of each output CSS file.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#filename"},"chunkFilename":{"anyOf":[{"type":"string"},{"instanceof":"Function"}],"description":"This option determines the name of non-entry chunk files.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#chunkfilename"},"experimentalUseImportModule":{"type":"boolean","description":"Enable the experimental importModule approach instead of using child compilers. This uses less memory and is faster.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#experimentaluseimportmodule"},"ignoreOrder":{"type":"boolean","description":"Remove Order Warnings.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#ignoreorder"},"insert":{"description":"Inserts the `link` tag at the given position for non-initial (async) (https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#insert","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"attributes":{"description":"Adds custom attributes to the `link` tag for non-initial (async) (https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#attributes","type":"object"},"linkType":{"anyOf":[{"enum":["text/css"]},{"type":"boolean"}],"description":"This option allows loading asynchronous chunks with a custom link type","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#linktype"},"runtime":{"type":"boolean","description":"Enabled/Disables runtime generation. CSS will be still extracted and can be used for a custom loading methods.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#noRuntime"}}}')}};var t={};function __nccwpck_require__(n){var s=t[n];if(s!==undefined){return s.exports}var i=t[n]={exports:{}};var r=true;try{e[n](i,i.exports,__nccwpck_require__);r=false}finally{if(r)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});e.pluginSymbol=e.pluginName=e["default"]=void 0;var t=__nccwpck_require__(476);var s=_interopRequireDefault(__nccwpck_require__(3));var i=__nccwpck_require__(722);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r="mini-css-extract-plugin";e.pluginName=r;const o=Symbol(r);e.pluginSymbol=o;const a="[name].css";const u=new Set([i.MODULE_TYPE]);const l={sources:new Map,runtimeRequirements:new Set};const d=new WeakMap;const c=new WeakMap;const p=new WeakSet;class MiniCssExtractPlugin{static getCssModule(e){if(d.has(e)){return d.get(e)}class CssModule extends e.Module{constructor({context:e,identifier:t,identifierIndex:n,content:s,layer:r,supports:o,media:a,sourceMap:u,assets:l,assetsInfo:d}){super(i.MODULE_TYPE,e);this.id="";this._context=e;this._identifier=t;this._identifierIndex=n;this.content=s;this.layer=r;this.supports=o;this.media=a;this.sourceMap=u;this.assets=l;this.assetsInfo=d;this._needBuild=true}size(){return this.content.length}identifier(){return`css|${this._identifier}|${this._identifierIndex}`}readableIdentifier(e){return`css ${e.shorten(this._identifier)}${this._identifierIndex?` (${this._identifierIndex})`:""}`}getSourceTypes(){return u}codeGeneration(){return l}nameForCondition(){const e=this._identifier.split("!").pop();const t=e.indexOf("?");if(t>=0){return e.substring(0,t)}return e}updateCacheModule(e){if(this.content!==e.content||this.layer!==e.layer||this.supports!==e.supports||this.media!==e.media||this.sourceMap!==e.sourceMap||this.assets!==e.assets||this.assetsInfo!==e.assetsInfo){this._needBuild=true;this.content=e.content;this.layer=e.layer;this.supports=e.supports;this.media=e.media;this.sourceMap=e.sourceMap;this.assets=e.assets;this.assetsInfo=e.assetsInfo}}needRebuild(){return this._needBuild}needBuild(e,t){t(null,this._needBuild)}build(e,t,n,s,i){this.buildInfo={assets:this.assets,assetsInfo:this.assetsInfo,cacheable:true,hash:this._computeHash(t.outputOptions.hashFunction)};this.buildMeta={};this._needBuild=false;i()}_computeHash(t){const n=e.util.createHash(t);n.update(this.content);if(this.layer){n.update(this.layer)}n.update(this.supports||"");n.update(this.media||"");n.update(this.sourceMap||"");return n.digest("hex")}updateHash(e,t){super.updateHash(e,t);e.update(this.buildInfo.hash)}serialize(e){const{write:t}=e;t(this._context);t(this._identifier);t(this._identifierIndex);t(this.content);t(this.layer);t(this.supports);t(this.media);t(this.sourceMap);t(this.assets);t(this.assetsInfo);t(this._needBuild);super.serialize(e)}deserialize(e){this._needBuild=e.read();super.deserialize(e)}}d.set(e,CssModule);e.util.serialization.register(CssModule,"mini-css-extract-plugin/dist/CssModule",null,{serialize(e,t){e.serialize(t)},deserialize(e){const{read:t}=e;const n=t();const s=t();const i=t();const r=t();const o=t();const a=t();const u=t();const l=t();const d=t();const c=t();const p=new CssModule({context:n,identifier:s,identifierIndex:i,content:r,layer:o,supports:a,media:u,sourceMap:l,assets:d,assetsInfo:c});p.deserialize(e);return p}});return CssModule}static getCssDependency(e){if(c.has(e)){return c.get(e)}class CssDependency extends e.Dependency{constructor({identifier:e,content:t,layer:n,supports:s,media:i,sourceMap:r},o,a){super();this.identifier=e;this.identifierIndex=a;this.content=t;this.layer=n;this.supports=s;this.media=i;this.sourceMap=r;this.context=o;this.assets=undefined;this.assetsInfo=undefined}getResourceIdentifier(){return`css-module-${this.identifier}-${this.identifierIndex}`}getModuleEvaluationSideEffectsState(){return e.ModuleGraphConnection.TRANSITIVE_ONLY}serialize(e){const{write:t}=e;t(this.identifier);t(this.content);t(this.layer);t(this.supports);t(this.media);t(this.sourceMap);t(this.context);t(this.identifierIndex);t(this.assets);t(this.assetsInfo);super.serialize(e)}deserialize(e){super.deserialize(e)}}c.set(e,CssDependency);e.util.serialization.register(CssDependency,"mini-css-extract-plugin/dist/CssDependency",null,{serialize(e,t){e.serialize(t)},deserialize(e){const{read:t}=e;const n=new CssDependency({identifier:t(),content:t(),layer:t(),supports:t(),media:t(),sourceMap:t()},t(),t());const s=t();const i=t();n.assets=s;n.assetsInfo=i;n.deserialize(e);return n}});return CssDependency}constructor(e={}){(0,t.validate)(s.default,e,{baseDataPath:"options"});this._sortedModulesCache=new WeakMap;this.options=Object.assign({filename:a,ignoreOrder:false,experimentalUseImportModule:undefined,runtime:true},e);this.runtimeOptions={insert:e.insert,linkType:e.linkType===true||typeof e.linkType==="undefined"?"text/css":e.linkType,attributes:e.attributes};if(!this.options.chunkFilename){const{filename:e}=this.options;if(typeof e!=="function"){const t=e.includes("[name]");const n=e.includes("[id]");const s=e.includes("[chunkhash]");const i=e.includes("[contenthash]");if(s||i||t||n){this.options.chunkFilename=e}else{this.options.chunkFilename=e.replace(/(^|\/)([^/]*(?:\?|$))/,"$1[id].$2")}}else{this.options.chunkFilename="[id].css"}}}apply(e){const{webpack:t}=e;if(this.options.experimentalUseImportModule){if(typeof e.options.experiments.executeModule==="undefined"){e.options.experiments.executeModule=true}}if(!p.has(t)){p.add(t);t.util.serialization.registerLoader(/^mini-css-extract-plugin\//,i.trueFn)}const{splitChunks:n}=e.options.optimization;if(n){if(n.defaultSizeTypes.includes("...")){n.defaultSizeTypes.push(i.MODULE_TYPE)}}const s=MiniCssExtractPlugin.getCssModule(t);const a=MiniCssExtractPlugin.getCssDependency(t);const{NormalModule:u}=e.webpack;e.hooks.compilation.tap(r,(e=>{const{loader:t}=u.getCompilationHooks(e);t.tap(r,(e=>{e[o]={experimentalUseImportModule:this.options.experimentalUseImportModule}}))}));e.hooks.thisCompilation.tap(r,(n=>{class CssModuleFactory{create({dependencies:[e]},t){t(null,new s(e))}}n.dependencyFactories.set(a,new CssModuleFactory);class CssDependencyTemplate{apply(){}}n.dependencyTemplates.set(a,new CssDependencyTemplate);n.hooks.renderManifest.tap(r,((s,{chunk:o})=>{const{chunkGraph:a}=n;const{HotUpdateChunk:u}=t;if(o instanceof u){return}const l=Array.from(this.getChunkModules(o,a)).filter((e=>e.type===i.MODULE_TYPE));const d=o.canBeInitial()?this.options.filename:this.options.chunkFilename;if(l.length>0){s.push({render:()=>this.renderContentAsset(e,n,o,l,n.runtimeTemplate.requestShortener,d,{contentHashType:i.MODULE_TYPE,chunk:o}),filenameTemplate:d,pathOptions:{chunk:o,contentHashType:i.MODULE_TYPE},identifier:`${r}.${o.id}`,hash:o.contentHash[i.MODULE_TYPE]})}}));n.hooks.contentHash.tap(r,(t=>{const{outputOptions:s,chunkGraph:r}=n;const o=this.sortModules(n,t,r.getChunkModulesIterableBySourceType(t,i.MODULE_TYPE),n.runtimeTemplate.requestShortener);if(o){const{hashFunction:n,hashDigest:a,hashDigestLength:u}=s;const{createHash:l}=e.webpack.util;const d=l(n);for(const e of o){d.update(r.getModuleHash(e,t.runtime))}t.contentHash[i.MODULE_TYPE]=d.digest(a).substring(0,u)}}));if(!this.options.runtime){return}const{Template:o,RuntimeGlobals:u,RuntimeModule:l,runtime:d}=t;const getCssChunkObject=(e,t)=>{const n={};const{chunkGraph:s}=t;for(const t of e.getAllAsyncChunks()){const e=s.getOrderedChunkModulesIterable(t,i.compareModulesByIdentifier);for(const s of e){if(s.type===i.MODULE_TYPE){n[t.id]=1;break}}}return n};class CssLoadingRuntimeModule extends l{constructor(e,t){super("css loading",10);this.runtimeRequirements=e;this.runtimeOptions=t}generate(){const{chunk:e,runtimeRequirements:t}=this;const{runtimeTemplate:n,outputOptions:{crossOriginLoading:s}}=this.compilation;const i=getCssChunkObject(e,this.compilation);const r=t.has(u.ensureChunkHandlers)&&Object.keys(i).length>0;const a=t.has(u.hmrDownloadUpdateHandlers);if(!r&&!a){return null}return o.asString([`var createStylesheet = ${n.basicFunction("chunkId, fullhref, resolve, reject",['var linkTag = document.createElement("link");',this.runtimeOptions.attributes?o.asString(Object.entries(this.runtimeOptions.attributes).map((e=>{const[t,n]=e;return`linkTag.setAttribute(${JSON.stringify(t)}, ${JSON.stringify(n)});`}))):"",'linkTag.rel = "stylesheet";',this.runtimeOptions.linkType?`linkTag.type = ${JSON.stringify(this.runtimeOptions.linkType)};`:"",`var onLinkComplete = ${n.basicFunction("event",["// avoid mem leaks.","linkTag.onerror = linkTag.onload = null;","if (event.type === 'load') {",o.indent(["resolve();"]),"} else {",o.indent(["var errorType = event && (event.type === 'load' ? 'missing' : event.type);","var realHref = event && event.target && event.target.href || fullhref;",'var err = new Error("Loading CSS chunk " + chunkId + " failed.\\n(" + realHref + ")");','err.code = "CSS_CHUNK_LOAD_FAILED";',"err.type = errorType;","err.request = realHref;","linkTag.parentNode.removeChild(linkTag)","reject(err);"]),"}"])}`,"linkTag.onerror = linkTag.onload = onLinkComplete;","linkTag.href = fullhref;",s?o.asString([`if (linkTag.href.indexOf(window.location.origin + '/') !== 0) {`,o.indent(`linkTag.crossOrigin = ${JSON.stringify(s)};`),"}"]):"",typeof this.runtimeOptions.insert!=="undefined"?typeof this.runtimeOptions.insert==="function"?`(${this.runtimeOptions.insert.toString()})(linkTag)`:o.asString([`var target = document.querySelector("${this.runtimeOptions.insert}");`,`target.parentNode.insertBefore(linkTag, target.nextSibling);`]):o.asString(["document.head.appendChild(linkTag);"]),"return linkTag;"])};`,`var findStylesheet = ${n.basicFunction("href, fullhref",['var existingLinkTags = document.getElementsByTagName("link");',"for(var i = 0; i < existingLinkTags.length; i++) {",o.indent(["var tag = existingLinkTags[i];",'var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");','if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag;']),"}",'var existingStyleTags = document.getElementsByTagName("style");',"for(var i = 0; i < existingStyleTags.length; i++) {",o.indent(["var tag = existingStyleTags[i];",'var dataHref = tag.getAttribute("data-href");',"if(dataHref === href || dataHref === fullhref) return tag;"]),"}"])};`,`var loadStylesheet = ${n.basicFunction("chunkId",`return new Promise(${n.basicFunction("resolve, reject",[`var href = ${u.require}.miniCssF(chunkId);`,`var fullhref = ${u.publicPath} + href;`,"if(findStylesheet(href, fullhref)) return resolve();","createStylesheet(chunkId, fullhref, resolve, reject);"])});`)}`,r?o.asString(["// object to store loaded CSS chunks","var installedCssChunks = {",o.indent(e.ids.map((e=>`${JSON.stringify(e)}: 0`)).join(",\n")),"};","",`${u.ensureChunkHandlers}.miniCss = ${n.basicFunction("chunkId, promises",[`var cssChunks = ${JSON.stringify(i)};`,"if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);","else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {",o.indent([`promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(${n.basicFunction("","installedCssChunks[chunkId] = 0;")}, ${n.basicFunction("e",["delete installedCssChunks[chunkId];","throw e;"])}));`]),"}"])};`]):"// no chunk loading","",a?o.asString(["var oldTags = [];","var newTags = [];",`var applyHandler = ${n.basicFunction("options",[`return { dispose: ${n.basicFunction("",["for(var i = 0; i < oldTags.length; i++) {",o.indent(["var oldTag = oldTags[i];","if(oldTag.parentNode) oldTag.parentNode.removeChild(oldTag);"]),"}","oldTags.length = 0;"])}, apply: ${n.basicFunction("",['for(var i = 0; i < newTags.length; i++) newTags[i].rel = "stylesheet";',"newTags.length = 0;"])} };`])}`,`${u.hmrDownloadUpdateHandlers}.miniCss = ${n.basicFunction("chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList",["applyHandlers.push(applyHandler);",`chunkIds.forEach(${n.basicFunction("chunkId",[`var href = ${u.require}.miniCssF(chunkId);`,`var fullhref = ${u.publicPath} + href;`,"var oldTag = findStylesheet(href, fullhref);","if(!oldTag) return;",`promises.push(new Promise(${n.basicFunction("resolve, reject",[`var tag = createStylesheet(chunkId, fullhref, ${n.basicFunction("",['tag.as = "style";','tag.rel = "preload";',"resolve();"])}, reject);`,"oldTags.push(oldTag);","newTags.push(tag);"])}));`])});`])}`]):"// no hmr"])}}const c=new WeakSet;const handler=(e,t)=>{if(c.has(e)){return}c.add(e);if(typeof this.options.chunkFilename==="string"&&/\[(full)?hash(:\d+)?\]/.test(this.options.chunkFilename)){t.add(u.getFullHash)}t.add(u.publicPath);n.addRuntimeModule(e,new d.GetChunkFilenameRuntimeModule(i.MODULE_TYPE,"mini-css",`${u.require}.miniCssF`,(e=>{if(!e.contentHash[i.MODULE_TYPE]){return false}return e.canBeInitial()?this.options.filename:this.options.chunkFilename}),true));n.addRuntimeModule(e,new CssLoadingRuntimeModule(t,this.runtimeOptions))};n.hooks.runtimeRequirementInTree.for(u.ensureChunkHandlers).tap(r,handler);n.hooks.runtimeRequirementInTree.for(u.hmrDownloadUpdateHandlers).tap(r,handler)}))}getChunkModules(e,t){return typeof t!=="undefined"?t.getOrderedChunkModulesIterable(e,i.compareModulesByIdentifier):e.modulesIterable}sortModules(e,t,n,s){let i=this._sortedModulesCache.get(t);if(i||!n){return i}const o=[...n];const a=new Map(o.map((e=>[e,new Set])));const u=new Map(o.map((e=>[e,new Map])));const l=Array.from(t.groupsIterable,(e=>{const t=o.map((t=>({module:t,index:e.getModulePostOrderIndex(t)}))).filter((e=>e.index!==undefined)).sort(((e,t)=>t.index-e.index)).map((e=>e.module));for(let n=0;n!i.has(e);while(i.size0&&i.has(e[e.length-1])){e.pop()}if(e.length!==0){const t=e[e.length-1];const s=a.get(t);const r=Array.from(s).filter(unusedModulesFilter);if(!d||d.length>r.length){o=e;d=r}if(r.length===0){i.add(e.pop());n=true;break}}}if(!n){const n=o.pop();if(!this.options.ignoreOrder){const i=u.get(n);e.warnings.push(new Error([`chunk ${t.name||t.id} [${r}]`,"Conflicting order. Following module has been added:",` * ${n.readableIdentifier(s)}`,"despite it was not able to fulfill desired ordering with these modules:",...d.map((e=>{const t=u.get(e);const r=t&&t.get(n);const o=Array.from(i.get(e),(e=>e.name)).join(", ");const a=r&&Array.from(r,(e=>e.name)).join(", ");return[` * ${e.readableIdentifier(s)}`,` - couldn't fulfill desired order of chunk group(s) ${o}`,a&&` - while fulfilling desired order of chunk group(s) ${a}`].filter(Boolean).join("\n")}))].join("\n")))}i.add(n)}}this._sortedModulesCache.set(t,i);return i}renderContentAsset(e,t,n,s,r,o,a){const u=this.sortModules(t,n,s,r);const{ConcatSource:l,SourceMapSource:d,RawSource:c}=e.webpack.sources;const p=new l;const h=new l;for(const n of u){let s=n.content.toString();const u=n.readableIdentifier(r);const l=/^@import url/.test(s);let f;if(t.outputOptions.pathinfo){const e=u.replace(/\*\//g,"*_/");const t="*".repeat(e.length);const n=`/*!****${t}****!*\\\n !*** ${e} ***!\n \\****${t}****/\n`;f=new c(n)}if(l){if(typeof f!=="undefined"){h.add(f)}if(n.media){s=s.replace(/;|\s*$/,n.media)}h.add(s);h.add("\n")}else{if(typeof f!=="undefined"){p.add(f)}if(n.supports){p.add(`@supports (${n.supports}) {\n`)}if(n.media){p.add(`@media ${n.media} {\n`)}const r=typeof n.layer!=="undefined";if(r){p.add(`@layer${n.layer.length>0?` ${n.layer}`:""} {\n`)}const{path:l}=t.getPathWithInfo(o,a);const h=(0,i.getUndoPath)(l,e.outputPath,false);s=s.replace(new RegExp(i.ABSOLUTE_PUBLIC_PATH,"g"),"");s=s.replace(new RegExp(i.SINGLE_DOT_PATH_SEGMENT,"g"),".");s=s.replace(new RegExp(i.AUTO_PUBLIC_PATH,"g"),h);if(n.sourceMap){p.add(new d(s,u,n.sourceMap.toString()))}else{p.add(new c(s,u))}p.add("\n");if(r){p.add("}\n")}if(n.media){p.add("}\n")}if(n.supports){p.add("}\n")}}}return new l(h,p)}}MiniCssExtractPlugin.loader=__nccwpck_require__.ab+"loader.js";var h=MiniCssExtractPlugin;e["default"]=h})();module.exports=n})(); \ No newline at end of file +(()=>{"use strict";var e={918:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.SINGLE_DOT_PATH_SEGMENT=t.MODULE_TYPE=t.AUTO_PUBLIC_PATH=t.ABSOLUTE_PUBLIC_PATH=void 0;t.compareModulesByIdentifier=compareModulesByIdentifier;t.evalModuleCode=evalModuleCode;t.findModuleById=findModuleById;t.getUndoPath=getUndoPath;t.stringifyRequest=stringifyRequest;t.trueFn=trueFn;var s=_interopRequireDefault(n(188));var i=_interopRequireDefault(n(17));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function trueFn(){return true}function findModuleById(e,t){const{modules:n,chunkGraph:s}=e;for(const e of n){const n=typeof s!=="undefined"?s.getModuleId(e):e.id;if(n===t){return e}}return null}function evalModuleCode(e,t,n){const i=new s.default(n,e);i.paths=s.default._nodeModulePaths(e.context);i.filename=n;i._compile(t,n);return i.exports}function compareIds(e,t){if(typeof e!==typeof t){return typeof et){return 1}return 0}function compareModulesByIdentifier(e,t){return compareIds(e.identifier(),t.identifier())}const r="css/mini-extract";t.MODULE_TYPE=r;const o="__mini_css_extract_plugin_public_path_auto__";t.AUTO_PUBLIC_PATH=o;const a="webpack:///mini-css-extract-plugin/";t.ABSOLUTE_PUBLIC_PATH=a;const u="__mini_css_extract_plugin_single_dot_path_segment__";t.SINGLE_DOT_PATH_SEGMENT=u;function isAbsolutePath(e){return i.default.posix.isAbsolute(e)||i.default.win32.isAbsolute(e)}const l=/^\.\.?[/\\]/;function isRelativePath(e){return l.test(e)}function stringifyRequest(e,t){if(typeof e.utils!=="undefined"&&typeof e.utils.contextify==="function"){return JSON.stringify(e.utils.contextify(e.context,t))}const n=t.split("!");const{context:s}=e;return JSON.stringify(n.map((e=>{const t=e.match(/^(.*?)(\?.*)/);const n=t?t[2]:"";let r=t?t[1]:e;if(isAbsolutePath(r)&&s){r=i.default.relative(s,r);if(isAbsolutePath(r)){return r+n}if(isRelativePath(r)===false){r=`./${r}`}}return r.replace(/\\/g,"/")+n})).join("!"))}function getUndoPath(e,t,n){let s=-1;let i="";t=t.replace(/[\\/]$/,"");for(const n of e.split(/[/\\]+/)){if(n===".."){if(s>-1){s--}else{const e=t.lastIndexOf("/");const n=t.lastIndexOf("\\");const s=e<0?n:n<0?e:Math.max(e,n);if(s<0){return`${t}/`}i=`${t.slice(s+1)}/${i}`;t=t.slice(0,s)}}else if(n!=="."){s++}}return s>0?`${"../".repeat(s)}${i}`:n?`./${i}`:i}},188:e=>{e.exports=require("module")},476:e=>{e.exports=require("next/dist/compiled/schema-utils3")},17:e=>{e.exports=require("path")},347:e=>{e.exports=JSON.parse('{"title":"Mini CSS Extract Plugin options","type":"object","additionalProperties":false,"properties":{"filename":{"anyOf":[{"type":"string"},{"instanceof":"Function"}],"description":"This option determines the name of each output CSS file.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#filename"},"chunkFilename":{"anyOf":[{"type":"string"},{"instanceof":"Function"}],"description":"This option determines the name of non-entry chunk files.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#chunkfilename"},"experimentalUseImportModule":{"type":"boolean","description":"Enable the experimental importModule approach instead of using child compilers. This uses less memory and is faster.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#experimentaluseimportmodule"},"ignoreOrder":{"type":"boolean","description":"Remove Order Warnings.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#ignoreorder"},"insert":{"description":"Inserts the `link` tag at the given position for non-initial (async) (https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#insert","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"attributes":{"description":"Adds custom attributes to the `link` tag for non-initial (async) (https://webpack.js.org/concepts/under-the-hood/#chunks) CSS chunks.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#attributes","type":"object"},"linkType":{"anyOf":[{"enum":["text/css"]},{"type":"boolean"}],"description":"This option allows loading asynchronous chunks with a custom link type","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#linktype"},"runtime":{"type":"boolean","description":"Enabled/Disables runtime generation. CSS will be still extracted and can be used for a custom loading methods.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#noRuntime"}}}')}};var t={};function __nccwpck_require__(n){var s=t[n];if(s!==undefined){return s.exports}var i=t[n]={exports:{}};var r=true;try{e[n](i,i.exports,__nccwpck_require__);r=false}finally{if(r)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:true});e.pluginSymbol=e.pluginName=e["default"]=void 0;var t=__nccwpck_require__(476);var s=_interopRequireDefault(__nccwpck_require__(347));var i=__nccwpck_require__(918);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const r="mini-css-extract-plugin";e.pluginName=r;const o=Symbol(r);e.pluginSymbol=o;const a="[name].css";const u=new Set([i.MODULE_TYPE]);const l={sources:new Map,runtimeRequirements:new Set};const d=new WeakMap;const c=new WeakMap;const p=new WeakSet;class MiniCssExtractPlugin{static getCssModule(e){if(d.has(e)){return d.get(e)}class CssModule extends e.Module{constructor({context:e,identifier:t,identifierIndex:n,content:s,layer:r,supports:o,media:a,sourceMap:u,assets:l,assetsInfo:d}){super(i.MODULE_TYPE,e);this.id="";this._context=e;this._identifier=t;this._identifierIndex=n;this.content=s;this.layer=r;this.supports=o;this.media=a;this.sourceMap=u;this.assets=l;this.assetsInfo=d;this._needBuild=true}size(){return this.content.length}identifier(){return`css|${this._identifier}|${this._identifierIndex}`}readableIdentifier(e){return`css ${e.shorten(this._identifier)}${this._identifierIndex?` (${this._identifierIndex})`:""}`}getSourceTypes(){return u}codeGeneration(){return l}nameForCondition(){const e=this._identifier.split("!").pop();const t=e.indexOf("?");if(t>=0){return e.substring(0,t)}return e}updateCacheModule(e){if(this.content!==e.content||this.layer!==e.layer||this.supports!==e.supports||this.media!==e.media||this.sourceMap!==e.sourceMap||this.assets!==e.assets||this.assetsInfo!==e.assetsInfo){this._needBuild=true;this.content=e.content;this.layer=e.layer;this.supports=e.supports;this.media=e.media;this.sourceMap=e.sourceMap;this.assets=e.assets;this.assetsInfo=e.assetsInfo}}needRebuild(){return this._needBuild}needBuild(e,t){t(null,this._needBuild)}build(e,t,n,s,i){this.buildInfo={assets:this.assets,assetsInfo:this.assetsInfo,cacheable:true,hash:this._computeHash(t.outputOptions.hashFunction)};this.buildMeta={};this._needBuild=false;i()}_computeHash(t){const n=e.util.createHash(t);n.update(this.content);if(this.layer){n.update(this.layer)}n.update(this.supports||"");n.update(this.media||"");n.update(this.sourceMap||"");return n.digest("hex")}updateHash(e,t){super.updateHash(e,t);e.update(this.buildInfo.hash)}serialize(e){const{write:t}=e;t(this._context);t(this._identifier);t(this._identifierIndex);t(this.content);t(this.layer);t(this.supports);t(this.media);t(this.sourceMap);t(this.assets);t(this.assetsInfo);t(this._needBuild);super.serialize(e)}deserialize(e){this._needBuild=e.read();super.deserialize(e)}}d.set(e,CssModule);e.util.serialization.register(CssModule,"mini-css-extract-plugin/dist/CssModule",null,{serialize(e,t){e.serialize(t)},deserialize(e){const{read:t}=e;const n=t();const s=t();const i=t();const r=t();const o=t();const a=t();const u=t();const l=t();const d=t();const c=t();const p=new CssModule({context:n,identifier:s,identifierIndex:i,content:r,layer:o,supports:a,media:u,sourceMap:l,assets:d,assetsInfo:c});p.deserialize(e);return p}});return CssModule}static getCssDependency(e){if(c.has(e)){return c.get(e)}class CssDependency extends e.Dependency{constructor({identifier:e,content:t,layer:n,supports:s,media:i,sourceMap:r},o,a){super();this.identifier=e;this.identifierIndex=a;this.content=t;this.layer=n;this.supports=s;this.media=i;this.sourceMap=r;this.context=o;this.assets=undefined;this.assetsInfo=undefined}getResourceIdentifier(){return`css-module-${this.identifier}-${this.identifierIndex}`}getModuleEvaluationSideEffectsState(){return e.ModuleGraphConnection.TRANSITIVE_ONLY}serialize(e){const{write:t}=e;t(this.identifier);t(this.content);t(this.layer);t(this.supports);t(this.media);t(this.sourceMap);t(this.context);t(this.identifierIndex);t(this.assets);t(this.assetsInfo);super.serialize(e)}deserialize(e){super.deserialize(e)}}c.set(e,CssDependency);e.util.serialization.register(CssDependency,"mini-css-extract-plugin/dist/CssDependency",null,{serialize(e,t){e.serialize(t)},deserialize(e){const{read:t}=e;const n=new CssDependency({identifier:t(),content:t(),layer:t(),supports:t(),media:t(),sourceMap:t()},t(),t());const s=t();const i=t();n.assets=s;n.assetsInfo=i;n.deserialize(e);return n}});return CssDependency}constructor(e={}){(0,t.validate)(s.default,e,{baseDataPath:"options"});this._sortedModulesCache=new WeakMap;this.options=Object.assign({filename:a,ignoreOrder:false,experimentalUseImportModule:undefined,runtime:true},e);this.runtimeOptions={insert:e.insert,linkType:e.linkType===true||typeof e.linkType==="undefined"?"text/css":e.linkType,attributes:e.attributes};if(!this.options.chunkFilename){const{filename:e}=this.options;if(typeof e!=="function"){const t=e.includes("[name]");const n=e.includes("[id]");const s=e.includes("[chunkhash]");const i=e.includes("[contenthash]");if(s||i||t||n){this.options.chunkFilename=e}else{this.options.chunkFilename=e.replace(/(^|\/)([^/]*(?:\?|$))/,"$1[id].$2")}}else{this.options.chunkFilename="[id].css"}}}apply(e){const{webpack:t}=e;if(this.options.experimentalUseImportModule){if(typeof e.options.experiments.executeModule==="undefined"){e.options.experiments.executeModule=true}}if(!p.has(t)){p.add(t);t.util.serialization.registerLoader(/^mini-css-extract-plugin\//,i.trueFn)}const{splitChunks:n}=e.options.optimization;if(n){if(n.defaultSizeTypes.includes("...")){n.defaultSizeTypes.push(i.MODULE_TYPE)}}const s=MiniCssExtractPlugin.getCssModule(t);const a=MiniCssExtractPlugin.getCssDependency(t);const{NormalModule:u}=e.webpack;e.hooks.compilation.tap(r,(e=>{const{loader:t}=u.getCompilationHooks(e);t.tap(r,(e=>{e[o]={experimentalUseImportModule:this.options.experimentalUseImportModule}}))}));e.hooks.thisCompilation.tap(r,(n=>{class CssModuleFactory{create({dependencies:[e]},t){t(null,new s(e))}}n.dependencyFactories.set(a,new CssModuleFactory);class CssDependencyTemplate{apply(){}}n.dependencyTemplates.set(a,new CssDependencyTemplate);n.hooks.renderManifest.tap(r,((s,{chunk:o})=>{const{chunkGraph:a}=n;const{HotUpdateChunk:u}=t;if(o instanceof u){return}const l=Array.from(this.getChunkModules(o,a)).filter((e=>e.type===i.MODULE_TYPE));const d=o.canBeInitial()?this.options.filename:this.options.chunkFilename;if(l.length>0){s.push({render:()=>this.renderContentAsset(e,n,o,l,n.runtimeTemplate.requestShortener,d,{contentHashType:i.MODULE_TYPE,chunk:o}),filenameTemplate:d,pathOptions:{chunk:o,contentHashType:i.MODULE_TYPE},identifier:`${r}.${o.id}`,hash:o.contentHash[i.MODULE_TYPE]})}}));n.hooks.contentHash.tap(r,(t=>{const{outputOptions:s,chunkGraph:r}=n;const o=this.sortModules(n,t,r.getChunkModulesIterableBySourceType(t,i.MODULE_TYPE),n.runtimeTemplate.requestShortener);if(o){const{hashFunction:n,hashDigest:a,hashDigestLength:u}=s;const{createHash:l}=e.webpack.util;const d=l(n);for(const e of o){d.update(r.getModuleHash(e,t.runtime))}t.contentHash[i.MODULE_TYPE]=d.digest(a).substring(0,u)}}));if(!this.options.runtime){return}const{Template:o,RuntimeGlobals:u,RuntimeModule:l,runtime:d}=t;const getCssChunkObject=(e,t)=>{const n={};const{chunkGraph:s}=t;for(const t of e.getAllAsyncChunks()){const e=s.getOrderedChunkModulesIterable(t,i.compareModulesByIdentifier);for(const s of e){if(s.type===i.MODULE_TYPE){n[t.id]=1;break}}}return n};class CssLoadingRuntimeModule extends l{constructor(e,t){super("css loading",10);this.runtimeRequirements=e;this.runtimeOptions=t}generate(){const{chunk:e,runtimeRequirements:t}=this;const{runtimeTemplate:n,outputOptions:{crossOriginLoading:s}}=this.compilation;const i=getCssChunkObject(e,this.compilation);const r=t.has(u.ensureChunkHandlers)&&Object.keys(i).length>0;const a=t.has(u.hmrDownloadUpdateHandlers);if(!r&&!a){return null}return o.asString([`var createStylesheet = ${n.basicFunction("chunkId, fullhref, resolve, reject",['var linkTag = document.createElement("link");',this.runtimeOptions.attributes?o.asString(Object.entries(this.runtimeOptions.attributes).map((e=>{const[t,n]=e;return`linkTag.setAttribute(${JSON.stringify(t)}, ${JSON.stringify(n)});`}))):"",'linkTag.rel = "stylesheet";',this.runtimeOptions.linkType?`linkTag.type = ${JSON.stringify(this.runtimeOptions.linkType)};`:"",`var onLinkComplete = ${n.basicFunction("event",["// avoid mem leaks.","linkTag.onerror = linkTag.onload = null;","if (event.type === 'load') {",o.indent(["resolve();"]),"} else {",o.indent(["var errorType = event && (event.type === 'load' ? 'missing' : event.type);","var realHref = event && event.target && event.target.href || fullhref;",'var err = new Error("Loading CSS chunk " + chunkId + " failed.\\n(" + realHref + ")");','err.code = "CSS_CHUNK_LOAD_FAILED";',"err.type = errorType;","err.request = realHref;","linkTag.parentNode.removeChild(linkTag)","reject(err);"]),"}"])}`,"linkTag.onerror = linkTag.onload = onLinkComplete;","linkTag.href = fullhref;",s?o.asString([`if (linkTag.href.indexOf(window.location.origin + '/') !== 0) {`,o.indent(`linkTag.crossOrigin = ${JSON.stringify(s)};`),"}"]):"",typeof this.runtimeOptions.insert!=="undefined"?typeof this.runtimeOptions.insert==="function"?`(${this.runtimeOptions.insert.toString()})(linkTag)`:o.asString([`var target = document.querySelector("${this.runtimeOptions.insert}");`,`target.parentNode.insertBefore(linkTag, target.nextSibling);`]):o.asString(["document.head.appendChild(linkTag);"]),"return linkTag;"])};`,`var findStylesheet = ${n.basicFunction("href, fullhref",['var existingLinkTags = document.getElementsByTagName("link");',"for(var i = 0; i < existingLinkTags.length; i++) {",o.indent(["var tag = existingLinkTags[i];",'var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");','if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return tag;']),"}",'var existingStyleTags = document.getElementsByTagName("style");',"for(var i = 0; i < existingStyleTags.length; i++) {",o.indent(["var tag = existingStyleTags[i];",'var dataHref = tag.getAttribute("data-href");',"if(dataHref === href || dataHref === fullhref) return tag;"]),"}"])};`,`var loadStylesheet = ${n.basicFunction("chunkId",`return new Promise(${n.basicFunction("resolve, reject",[`var href = ${u.require}.miniCssF(chunkId);`,`var fullhref = ${u.publicPath} + href;`,"if(findStylesheet(href, fullhref)) return resolve();","createStylesheet(chunkId, fullhref, resolve, reject);"])});`)}`,r?o.asString(["// object to store loaded CSS chunks","var installedCssChunks = {",o.indent(e.ids.map((e=>`${JSON.stringify(e)}: 0`)).join(",\n")),"};","",`${u.ensureChunkHandlers}.miniCss = ${n.basicFunction("chunkId, promises",[`var cssChunks = ${JSON.stringify(i)};`,"if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);","else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {",o.indent([`promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(${n.basicFunction("","installedCssChunks[chunkId] = 0;")}, ${n.basicFunction("e",["delete installedCssChunks[chunkId];","throw e;"])}));`]),"}"])};`]):"// no chunk loading","",a?o.asString(["var oldTags = [];","var newTags = [];",`var applyHandler = ${n.basicFunction("options",[`return { dispose: ${n.basicFunction("",["for(var i = 0; i < oldTags.length; i++) {",o.indent(["var oldTag = oldTags[i];","if(oldTag.parentNode) oldTag.parentNode.removeChild(oldTag);"]),"}","oldTags.length = 0;"])}, apply: ${n.basicFunction("",['for(var i = 0; i < newTags.length; i++) newTags[i].rel = "stylesheet";',"newTags.length = 0;"])} };`])}`,`${u.hmrDownloadUpdateHandlers}.miniCss = ${n.basicFunction("chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList",["applyHandlers.push(applyHandler);",`chunkIds.forEach(${n.basicFunction("chunkId",[`var href = ${u.require}.miniCssF(chunkId);`,`var fullhref = ${u.publicPath} + href;`,"var oldTag = findStylesheet(href, fullhref);","if(!oldTag) return;",`promises.push(new Promise(${n.basicFunction("resolve, reject",[`var tag = createStylesheet(chunkId, fullhref, ${n.basicFunction("",['tag.as = "style";','tag.rel = "preload";',"resolve();"])}, reject);`,"oldTags.push(oldTag);","newTags.push(tag);"])}));`])});`])}`]):"// no hmr"])}}const c=new WeakSet;const handler=(e,t)=>{if(c.has(e)){return}c.add(e);if(typeof this.options.chunkFilename==="string"&&/\[(full)?hash(:\d+)?\]/.test(this.options.chunkFilename)){t.add(u.getFullHash)}t.add(u.publicPath);n.addRuntimeModule(e,new d.GetChunkFilenameRuntimeModule(i.MODULE_TYPE,"mini-css",`${u.require}.miniCssF`,(e=>{if(!e.contentHash[i.MODULE_TYPE]){return false}return e.canBeInitial()?this.options.filename:this.options.chunkFilename}),true));n.addRuntimeModule(e,new CssLoadingRuntimeModule(t,this.runtimeOptions))};n.hooks.runtimeRequirementInTree.for(u.ensureChunkHandlers).tap(r,handler);n.hooks.runtimeRequirementInTree.for(u.hmrDownloadUpdateHandlers).tap(r,handler)}))}getChunkModules(e,t){return typeof t!=="undefined"?t.getOrderedChunkModulesIterable(e,i.compareModulesByIdentifier):e.modulesIterable}sortModules(e,t,n,s){let i=this._sortedModulesCache.get(t);if(i||!n){return i}const o=[...n];const a=new Map(o.map((e=>[e,new Set])));const u=new Map(o.map((e=>[e,new Map])));const l=Array.from(t.groupsIterable,(e=>{const t=o.map((t=>({module:t,index:e.getModulePostOrderIndex(t)}))).filter((e=>e.index!==undefined)).sort(((e,t)=>t.index-e.index)).map((e=>e.module));for(let n=0;n!i.has(e);while(i.size0&&i.has(e[e.length-1])){e.pop()}if(e.length!==0){const t=e[e.length-1];const s=a.get(t);const r=Array.from(s).filter(unusedModulesFilter);if(!d||d.length>r.length){o=e;d=r}if(r.length===0){i.add(e.pop());n=true;break}}}if(!n){const n=o.pop();if(!this.options.ignoreOrder){const i=u.get(n);e.warnings.push(new Error([`chunk ${t.name||t.id} [${r}]`,"Conflicting order. Following module has been added:",` * ${n.readableIdentifier(s)}`,"despite it was not able to fulfill desired ordering with these modules:",...d.map((e=>{const t=u.get(e);const r=t&&t.get(n);const o=Array.from(i.get(e),(e=>e.name)).join(", ");const a=r&&Array.from(r,(e=>e.name)).join(", ");return[` * ${e.readableIdentifier(s)}`,` - couldn't fulfill desired order of chunk group(s) ${o}`,a&&` - while fulfilling desired order of chunk group(s) ${a}`].filter(Boolean).join("\n")}))].join("\n")))}i.add(n)}}this._sortedModulesCache.set(t,i);return i}renderContentAsset(e,t,n,s,r,o,a){const u=this.sortModules(t,n,s,r);const{ConcatSource:l,SourceMapSource:d,RawSource:c}=e.webpack.sources;const p=new l;const h=new l;for(const n of u){let s=n.content.toString();const u=n.readableIdentifier(r);const l=/^@import url/.test(s);let f;if(t.outputOptions.pathinfo){const e=u.replace(/\*\//g,"*_/");const t="*".repeat(e.length);const n=`/*!****${t}****!*\\\n !*** ${e} ***!\n \\****${t}****/\n`;f=new c(n)}if(l){if(typeof f!=="undefined"){h.add(f)}if(n.media){s=s.replace(/;|\s*$/,n.media)}h.add(s);h.add("\n")}else{if(typeof f!=="undefined"){p.add(f)}if(n.supports){p.add(`@supports (${n.supports}) {\n`)}if(n.media){p.add(`@media ${n.media} {\n`)}const r=typeof n.layer!=="undefined";if(r){p.add(`@layer${n.layer.length>0?` ${n.layer}`:""} {\n`)}const{path:l}=t.getPathWithInfo(o,a);const h=(0,i.getUndoPath)(l,e.outputPath,false);s=s.replace(new RegExp(i.ABSOLUTE_PUBLIC_PATH,"g"),"");s=s.replace(new RegExp(i.SINGLE_DOT_PATH_SEGMENT,"g"),".");s=s.replace(new RegExp(i.AUTO_PUBLIC_PATH,"g"),h);if(n.sourceMap){p.add(new d(s,u,n.sourceMap.toString()))}else{p.add(new c(s,u))}p.add("\n");if(r){p.add("}\n")}if(n.media){p.add("}\n")}if(n.supports){p.add("}\n")}}}return new l(h,p)}}MiniCssExtractPlugin.loader=__nccwpck_require__.ab+"loader.js";var h=MiniCssExtractPlugin;e["default"]=h})();module.exports=n})(); \ No newline at end of file diff --git a/packages/next/compiled/mini-css-extract-plugin/loader.js b/packages/next/compiled/mini-css-extract-plugin/loader.js index aa8aacb8fce5e46..01ec3fa4e8a4c37 100644 --- a/packages/next/compiled/mini-css-extract-plugin/loader.js +++ b/packages/next/compiled/mini-css-extract-plugin/loader.js @@ -1 +1 @@ -(()=>{"use strict";var e={722:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});t.SINGLE_DOT_PATH_SEGMENT=t.MODULE_TYPE=t.AUTO_PUBLIC_PATH=t.ABSOLUTE_PUBLIC_PATH=void 0;t.compareModulesByIdentifier=compareModulesByIdentifier;t.evalModuleCode=evalModuleCode;t.findModuleById=findModuleById;t.getUndoPath=getUndoPath;t.stringifyRequest=stringifyRequest;t.trueFn=trueFn;var n=_interopRequireDefault(i(188));var o=_interopRequireDefault(i(17));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function trueFn(){return true}function findModuleById(e,t){const{modules:i,chunkGraph:n}=e;for(const e of i){const i=typeof n!=="undefined"?n.getModuleId(e):e.id;if(i===t){return e}}return null}function evalModuleCode(e,t,i){const o=new n.default(i,e);o.paths=n.default._nodeModulePaths(e.context);o.filename=i;o._compile(t,i);return o.exports}function compareIds(e,t){if(typeof e!==typeof t){return typeof et){return 1}return 0}function compareModulesByIdentifier(e,t){return compareIds(e.identifier(),t.identifier())}const r="css/mini-extract";t.MODULE_TYPE=r;const s="__mini_css_extract_plugin_public_path_auto__";t.AUTO_PUBLIC_PATH=s;const a="webpack:///mini-css-extract-plugin/";t.ABSOLUTE_PUBLIC_PATH=a;const u="__mini_css_extract_plugin_single_dot_path_segment__";t.SINGLE_DOT_PATH_SEGMENT=u;function isAbsolutePath(e){return o.default.posix.isAbsolute(e)||o.default.win32.isAbsolute(e)}const l=/^\.\.?[/\\]/;function isRelativePath(e){return l.test(e)}function stringifyRequest(e,t){if(typeof e.utils!=="undefined"&&typeof e.utils.contextify==="function"){return JSON.stringify(e.utils.contextify(e.context,t))}const i=t.split("!");const{context:n}=e;return JSON.stringify(i.map((e=>{const t=e.match(/^(.*?)(\?.*)/);const i=t?t[2]:"";let r=t?t[1]:e;if(isAbsolutePath(r)&&n){r=o.default.relative(n,r);if(isAbsolutePath(r)){return r+i}if(isRelativePath(r)===false){r=`./${r}`}}return r.replace(/\\/g,"/")+i})).join("!"))}function getUndoPath(e,t,i){let n=-1;let o="";t=t.replace(/[\\/]$/,"");for(const i of e.split(/[/\\]+/)){if(i===".."){if(n>-1){n--}else{const e=t.lastIndexOf("/");const i=t.lastIndexOf("\\");const n=e<0?i:i<0?e:Math.max(e,i);if(n<0){return`${t}/`}o=`${t.slice(n+1)}/${o}`;t=t.slice(0,n)}}else if(i!=="."){n++}}return n>0?`${"../".repeat(n)}${o}`:i?`./${o}`:o}},717:e=>{e.exports=require("./index.js")},188:e=>{e.exports=require("module")},17:e=>{e.exports=require("path")},594:e=>{e.exports=JSON.parse('{"title":"Mini CSS Extract Plugin Loader options","type":"object","additionalProperties":false,"properties":{"publicPath":{"anyOf":[{"type":"string"},{"instanceof":"Function"}],"description":"Specifies a custom public path for the external resources like images, files, etc inside CSS.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#publicpath"},"emit":{"type":"boolean","description":"If true, emits a file (writes a file to the filesystem). If false, the plugin will extract the CSS but will not emit the file","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#emit"},"esModule":{"type":"boolean","description":"Generates JS modules that use the ES modules syntax.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#esmodule"},"layer":{"type":"string"}}}')}};var t={};function __nccwpck_require__(i){var n=t[i];if(n!==undefined){return n.exports}var o=t[i]={exports:{}};var r=true;try{e[i](o,o.exports,__nccwpck_require__);r=false}finally{if(r)delete t[i]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i={};(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:true});e["default"]=_default;e.pitch=pitch;var t=_interopRequireDefault(__nccwpck_require__(17));var n=__nccwpck_require__(722);var o=_interopRequireDefault(__nccwpck_require__(594));var r=_interopRequireWildcard(__nccwpck_require__(717));function _getRequireWildcardCache(e){if(typeof WeakMap!=="function")return null;var t=new WeakMap;var i=new WeakMap;return(_getRequireWildcardCache=function(e){return e?i:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var i=_getRequireWildcardCache(t);if(i&&i.has(e)){return i.get(e)}var n={};var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e){if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;if(s&&(s.get||s.set)){Object.defineProperty(n,r,s)}else{n[r]=e[r]}}}n.default=e;if(i){i.set(e,n)}return n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function hotLoader(e,i){const o=i.locals?"":"module.hot.accept(undefined, cssReload);";return`${e}\n if(module.hot) {\n // ${Date.now()}\n var cssReload = require(${(0,n.stringifyRequest)(i.context,t.default.join(__dirname,"hmr/hotModuleReplacement.js"))})(module.id, ${JSON.stringify({...i.options,locals:!!i.locals})});\n module.hot.dispose(cssReload);\n ${o}\n }\n `}function pitch(e){const t=this.getOptions(o.default);const i=this.async();const s=this[r.pluginSymbol];if(!s){i(new Error("You forgot to add 'mini-css-extract-plugin' plugin (i.e. `{ plugins: [new MiniCssExtractPlugin()] }`), please read https://github.com/webpack-contrib/mini-css-extract-plugin#getting-started"));return}const{webpack:a}=this._compiler;const handleExports=(e,o,s,u)=>{let l;let c;const p=typeof t.esModule!=="undefined"?t.esModule:true;const addDependencies=e=>{if(!Array.isArray(e)&&e!=null){throw new Error(`Exported value was not extracted as an array: ${JSON.stringify(e)}`)}const i=new Map;const n=typeof t.emit!=="undefined"?t.emit:true;let o;for(const t of e){if(!t.identifier||!n){continue}const e=i.get(t.identifier)||0;const s=r.default.getCssDependency(a);this._module.addDependency(o=new s(t,t.context,e));i.set(t.identifier,e+1)}if(o&&s){o.assets=s;o.assetsInfo=u}};try{const t=e.__esModule?e.default:e;c=e.__esModule&&(!e.default||!("locals"in e.default));if(c){Object.keys(e).forEach((t=>{if(t!=="default"){if(!l){l={}}l[t]=e[t]}}))}else{l=t&&t.locals}let i;if(!Array.isArray(t)){i=[[null,t]]}else{i=t.map((([e,t,i,r,s,a])=>{let u=e;let l;if(o){const t=(0,n.findModuleById)(o,e);u=t.identifier();({context:l}=t)}else{l=this.rootContext}return{identifier:u,context:l,content:Buffer.from(t),media:i,supports:s,layer:a,sourceMap:r?Buffer.from(JSON.stringify(r)):undefined}}))}addDependencies(i)}catch(e){return i(e)}const d=l?c?Object.keys(l).map((e=>`\nexport var ${e} = ${JSON.stringify(l[e])};`)).join(""):`\n${p?"export default":"module.exports ="} ${JSON.stringify(l)};`:p?`\nexport {};`:"";let f=`// extracted by ${r.pluginName}`;f+=this.hot?hotLoader(d,{context:this.context,options:t,locals:l}):d;return i(null,f)};let{publicPath:u}=this._compilation.outputOptions;if(typeof t.publicPath==="string"){u=t.publicPath}else if(typeof t.publicPath==="function"){u=t.publicPath(this.resourcePath,this.rootContext)}if(u==="auto"){u=n.AUTO_PUBLIC_PATH}if(typeof s.experimentalUseImportModule==="undefined"&&typeof this.importModule==="function"||s.experimentalUseImportModule){if(!this.importModule){i(new Error("You are using 'experimentalUseImportModule' but 'this.importModule' is not available in loader context. You need to have at least webpack 5.33.2."));return}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(u);const r=o?u:`${n.ABSOLUTE_PUBLIC_PATH}${u.replace(/\./g,n.SINGLE_DOT_PATH_SEGMENT)}`;this.importModule(`${this.resourcePath}.webpack[javascript/auto]!=!!!${e}`,{layer:t.layer,publicPath:r},((e,t)=>{if(e){i(e);return}handleExports(t)}));return}const l=this.loaders.slice(this.loaderIndex+1);this.addDependency(this.resourcePath);const c="*";const p={filename:c,publicPath:u};const d=this._compilation.createChildCompiler(`${r.pluginName} ${e}`,p);d.options.module={...d.options.module};d.options.module.parser={...d.options.module.parser};d.options.module.parser.javascript={...d.options.module.parser.javascript,url:"relative"};const{NodeTemplatePlugin:f}=a.node;const{NodeTargetPlugin:_}=a.node;new f(p).apply(d);(new _).apply(d);const{EntryOptionPlugin:h}=a;const{library:{EnableLibraryPlugin:m}}=a;new m("commonjs2").apply(d);h.applyEntryOption(d,this.context,{child:{library:{type:"commonjs2"},import:[`!!${e}`]}});const{LimitChunkCountPlugin:y}=a.optimize;new y({maxChunks:1}).apply(d);const{NormalModule:g}=a;d.hooks.thisCompilation.tap(`${r.pluginName} loader`,(t=>{const i=g.getCompilationHooks(t).loader;i.tap(`${r.pluginName} loader`,((t,i)=>{if(i.request===e){i.loaders=l.map((e=>({loader:e.path,options:e.options,ident:e.ident})))}}))}));let b;d.hooks.compilation.tap(r.pluginName,(e=>{e.hooks.processAssets.tap(r.pluginName,(()=>{b=e.assets[c]&&e.assets[c].source();e.chunks.forEach((t=>{t.files.forEach((t=>{e.deleteAsset(t)}))}))}))}));d.runAsChild(((t,o,r)=>{if(t){return i(t)}if(r.errors.length>0){return i(r.errors[0])}const s=Object.create(null);const a=new Map;for(const e of r.getAssets()){s[e.name]=e.source;a.set(e.name,e.info)}r.fileDependencies.forEach((e=>{this.addDependency(e)}),this);r.contextDependencies.forEach((e=>{this.addContextDependency(e)}),this);if(!b){return i(new Error("Didn't get a result from child compiler"))}let u;try{u=(0,n.evalModuleCode)(this,b,e)}catch(e){return i(e)}return handleExports(u,r,s,a)}))}function _default(e){console.log(e)}})();module.exports=i})(); \ No newline at end of file +(()=>{"use strict";var e={918:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:true});t.SINGLE_DOT_PATH_SEGMENT=t.MODULE_TYPE=t.AUTO_PUBLIC_PATH=t.ABSOLUTE_PUBLIC_PATH=void 0;t.compareModulesByIdentifier=compareModulesByIdentifier;t.evalModuleCode=evalModuleCode;t.findModuleById=findModuleById;t.getUndoPath=getUndoPath;t.stringifyRequest=stringifyRequest;t.trueFn=trueFn;var n=_interopRequireDefault(i(188));var o=_interopRequireDefault(i(17));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function trueFn(){return true}function findModuleById(e,t){const{modules:i,chunkGraph:n}=e;for(const e of i){const i=typeof n!=="undefined"?n.getModuleId(e):e.id;if(i===t){return e}}return null}function evalModuleCode(e,t,i){const o=new n.default(i,e);o.paths=n.default._nodeModulePaths(e.context);o.filename=i;o._compile(t,i);return o.exports}function compareIds(e,t){if(typeof e!==typeof t){return typeof et){return 1}return 0}function compareModulesByIdentifier(e,t){return compareIds(e.identifier(),t.identifier())}const r="css/mini-extract";t.MODULE_TYPE=r;const s="__mini_css_extract_plugin_public_path_auto__";t.AUTO_PUBLIC_PATH=s;const a="webpack:///mini-css-extract-plugin/";t.ABSOLUTE_PUBLIC_PATH=a;const u="__mini_css_extract_plugin_single_dot_path_segment__";t.SINGLE_DOT_PATH_SEGMENT=u;function isAbsolutePath(e){return o.default.posix.isAbsolute(e)||o.default.win32.isAbsolute(e)}const l=/^\.\.?[/\\]/;function isRelativePath(e){return l.test(e)}function stringifyRequest(e,t){if(typeof e.utils!=="undefined"&&typeof e.utils.contextify==="function"){return JSON.stringify(e.utils.contextify(e.context,t))}const i=t.split("!");const{context:n}=e;return JSON.stringify(i.map((e=>{const t=e.match(/^(.*?)(\?.*)/);const i=t?t[2]:"";let r=t?t[1]:e;if(isAbsolutePath(r)&&n){r=o.default.relative(n,r);if(isAbsolutePath(r)){return r+i}if(isRelativePath(r)===false){r=`./${r}`}}return r.replace(/\\/g,"/")+i})).join("!"))}function getUndoPath(e,t,i){let n=-1;let o="";t=t.replace(/[\\/]$/,"");for(const i of e.split(/[/\\]+/)){if(i===".."){if(n>-1){n--}else{const e=t.lastIndexOf("/");const i=t.lastIndexOf("\\");const n=e<0?i:i<0?e:Math.max(e,i);if(n<0){return`${t}/`}o=`${t.slice(n+1)}/${o}`;t=t.slice(0,n)}}else if(i!=="."){n++}}return n>0?`${"../".repeat(n)}${o}`:i?`./${o}`:o}},717:e=>{e.exports=require("./index.js")},188:e=>{e.exports=require("module")},17:e=>{e.exports=require("path")},217:e=>{e.exports=JSON.parse('{"title":"Mini CSS Extract Plugin Loader options","type":"object","additionalProperties":false,"properties":{"publicPath":{"anyOf":[{"type":"string"},{"instanceof":"Function"}],"description":"Specifies a custom public path for the external resources like images, files, etc inside CSS.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#publicpath"},"emit":{"type":"boolean","description":"If true, emits a file (writes a file to the filesystem). If false, the plugin will extract the CSS but will not emit the file","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#emit"},"esModule":{"type":"boolean","description":"Generates JS modules that use the ES modules syntax.","link":"https://github.com/webpack-contrib/mini-css-extract-plugin#esmodule"},"layer":{"type":"string"}}}')}};var t={};function __nccwpck_require__(i){var n=t[i];if(n!==undefined){return n.exports}var o=t[i]={exports:{}};var r=true;try{e[i](o,o.exports,__nccwpck_require__);r=false}finally{if(r)delete t[i]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i={};(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:true});e["default"]=_default;e.pitch=pitch;var t=_interopRequireDefault(__nccwpck_require__(17));var n=__nccwpck_require__(918);var o=_interopRequireDefault(__nccwpck_require__(217));var r=_interopRequireWildcard(__nccwpck_require__(717));function _getRequireWildcardCache(e){if(typeof WeakMap!=="function")return null;var t=new WeakMap;var i=new WeakMap;return(_getRequireWildcardCache=function(e){return e?i:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var i=_getRequireWildcardCache(t);if(i&&i.has(e)){return i.get(e)}var n={};var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e){if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)){var s=o?Object.getOwnPropertyDescriptor(e,r):null;if(s&&(s.get||s.set)){Object.defineProperty(n,r,s)}else{n[r]=e[r]}}}n.default=e;if(i){i.set(e,n)}return n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function hotLoader(e,i){const o=i.locals?"":"module.hot.accept(undefined, cssReload);";return`${e}\n if(module.hot) {\n // ${Date.now()}\n var cssReload = require(${(0,n.stringifyRequest)(i.context,t.default.join(__dirname,"hmr/hotModuleReplacement.js"))})(module.id, ${JSON.stringify({...i.options,locals:!!i.locals})});\n module.hot.dispose(cssReload);\n ${o}\n }\n `}function pitch(e){const t=this.getOptions(o.default);const i=this.async();const s=this[r.pluginSymbol];if(!s){i(new Error("You forgot to add 'mini-css-extract-plugin' plugin (i.e. `{ plugins: [new MiniCssExtractPlugin()] }`), please read https://github.com/webpack-contrib/mini-css-extract-plugin#getting-started"));return}const{webpack:a}=this._compiler;const handleExports=(e,o,s,u)=>{let l;let c;const p=typeof t.esModule!=="undefined"?t.esModule:true;const addDependencies=e=>{if(!Array.isArray(e)&&e!=null){throw new Error(`Exported value was not extracted as an array: ${JSON.stringify(e)}`)}const i=new Map;const n=typeof t.emit!=="undefined"?t.emit:true;let o;for(const t of e){if(!t.identifier||!n){continue}const e=i.get(t.identifier)||0;const s=r.default.getCssDependency(a);this._module.addDependency(o=new s(t,t.context,e));i.set(t.identifier,e+1)}if(o&&s){o.assets=s;o.assetsInfo=u}};try{const t=e.__esModule?e.default:e;c=e.__esModule&&(!e.default||!("locals"in e.default));if(c){Object.keys(e).forEach((t=>{if(t!=="default"){if(!l){l={}}l[t]=e[t]}}))}else{l=t&&t.locals}let i;if(!Array.isArray(t)){i=[[null,t]]}else{i=t.map((([e,t,i,r,s,a])=>{let u=e;let l;if(o){const t=(0,n.findModuleById)(o,e);u=t.identifier();({context:l}=t)}else{l=this.rootContext}return{identifier:u,context:l,content:Buffer.from(t),media:i,supports:s,layer:a,sourceMap:r?Buffer.from(JSON.stringify(r)):undefined}}))}addDependencies(i)}catch(e){return i(e)}const d=l?c?Object.keys(l).map((e=>`\nexport var ${e} = ${JSON.stringify(l[e])};`)).join(""):`\n${p?"export default":"module.exports ="} ${JSON.stringify(l)};`:p?`\nexport {};`:"";let f=`// extracted by ${r.pluginName}`;f+=this.hot?hotLoader(d,{context:this.context,options:t,locals:l}):d;return i(null,f)};let{publicPath:u}=this._compilation.outputOptions;if(typeof t.publicPath==="string"){u=t.publicPath}else if(typeof t.publicPath==="function"){u=t.publicPath(this.resourcePath,this.rootContext)}if(u==="auto"){u=n.AUTO_PUBLIC_PATH}if(typeof s.experimentalUseImportModule==="undefined"&&typeof this.importModule==="function"||s.experimentalUseImportModule){if(!this.importModule){i(new Error("You are using 'experimentalUseImportModule' but 'this.importModule' is not available in loader context. You need to have at least webpack 5.33.2."));return}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(u);const r=o?u:`${n.ABSOLUTE_PUBLIC_PATH}${u.replace(/\./g,n.SINGLE_DOT_PATH_SEGMENT)}`;this.importModule(`${this.resourcePath}.webpack[javascript/auto]!=!!!${e}`,{layer:t.layer,publicPath:r},((e,t)=>{if(e){i(e);return}handleExports(t)}));return}const l=this.loaders.slice(this.loaderIndex+1);this.addDependency(this.resourcePath);const c="*";const p={filename:c,publicPath:u};const d=this._compilation.createChildCompiler(`${r.pluginName} ${e}`,p);d.options.module={...d.options.module};d.options.module.parser={...d.options.module.parser};d.options.module.parser.javascript={...d.options.module.parser.javascript,url:"relative"};const{NodeTemplatePlugin:f}=a.node;const{NodeTargetPlugin:_}=a.node;new f(p).apply(d);(new _).apply(d);const{EntryOptionPlugin:h}=a;const{library:{EnableLibraryPlugin:m}}=a;new m("commonjs2").apply(d);h.applyEntryOption(d,this.context,{child:{library:{type:"commonjs2"},import:[`!!${e}`]}});const{LimitChunkCountPlugin:y}=a.optimize;new y({maxChunks:1}).apply(d);const{NormalModule:g}=a;d.hooks.thisCompilation.tap(`${r.pluginName} loader`,(t=>{const i=g.getCompilationHooks(t).loader;i.tap(`${r.pluginName} loader`,((t,i)=>{if(i.request===e){i.loaders=l.map((e=>({loader:e.path,options:e.options,ident:e.ident})))}}))}));let b;d.hooks.compilation.tap(r.pluginName,(e=>{e.hooks.processAssets.tap(r.pluginName,(()=>{b=e.assets[c]&&e.assets[c].source();e.chunks.forEach((t=>{t.files.forEach((t=>{e.deleteAsset(t)}))}))}))}));d.runAsChild(((t,o,r)=>{if(t){return i(t)}if(r.errors.length>0){return i(r.errors[0])}const s=Object.create(null);const a=new Map;for(const e of r.getAssets()){s[e.name]=e.source;a.set(e.name,e.info)}r.fileDependencies.forEach((e=>{this.addDependency(e)}),this);r.contextDependencies.forEach((e=>{this.addContextDependency(e)}),this);if(!b){return i(new Error("Didn't get a result from child compiler"))}let u;try{u=(0,n.evalModuleCode)(this,b,e)}catch(e){return i(e)}return handleExports(u,r,s,a)}))}function _default(e){console.log(e)}})();module.exports=i})(); \ No newline at end of file diff --git a/packages/next/compiled/sass-loader/cjs.js b/packages/next/compiled/sass-loader/cjs.js index caf0ad3c36c8ef8..214eb3501b56a9a 100644 --- a/packages/next/compiled/sass-loader/cjs.js +++ b/packages/next/compiled/sass-loader/cjs.js @@ -1 +1 @@ -(function(){var __webpack_modules__={814:function(e,t){function set(e,t,s){if(typeof s.value==="object")s.value=klona(s.value);if(!s.enumerable||s.get||s.set||!s.configurable||!s.writable||t==="__proto__"){Object.defineProperty(e,t,s)}else e[t]=s.value}function klona(e){if(typeof e!=="object")return e;var t=0,s,r,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){n=Object.create(e.__proto__||null)}else if(o==="[object Array]"){n=Array(e.length)}else if(o==="[object Set]"){n=new Set;e.forEach((function(e){n.add(klona(e))}))}else if(o==="[object Map]"){n=new Map;e.forEach((function(e,t){n.set(klona(t),klona(e))}))}else if(o==="[object Date]"){n=new Date(+e)}else if(o==="[object RegExp]"){n=new RegExp(e.source,e.flags)}else if(o==="[object DataView]"){n=new e.constructor(klona(e.buffer))}else if(o==="[object ArrayBuffer]"){n=e.slice(0)}else if(o.slice(-6)==="Array]"){n=new e.constructor(e)}if(n){for(r=Object.getOwnPropertySymbols(e);t{if(e){if(e.file){this.addDependency(r.default.normalize(e.file))}s(new a.default(e));return}let n=t.map?JSON.parse(t.map):null;if(n&&c){n=(0,o.normalizeSourceMap)(n,this.rootContext)}t.stats.includedFiles.forEach((e=>{const t=r.default.normalize(e);if(r.default.isAbsolute(t)){this.addDependency(t)}}));s(null,t.css.toString(),n)}))}var i=loader;t["default"]=i},179:function(__unused_webpack_module,exports,__nccwpck_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getRenderFunctionFromSassImplementation=getRenderFunctionFromSassImplementation;exports.getSassImplementation=getSassImplementation;exports.getSassOptions=getSassOptions;exports.getWebpackImporter=getWebpackImporter;exports.getWebpackResolver=getWebpackResolver;exports.isSupportedFibers=isSupportedFibers;exports.normalizeSourceMap=normalizeSourceMap;var _url=_interopRequireDefault(__nccwpck_require__(310));var _path=_interopRequireDefault(__nccwpck_require__(17));var _full=__nccwpck_require__(814);var _neoAsync=_interopRequireDefault(__nccwpck_require__(175));var _SassWarning=_interopRequireDefault(__nccwpck_require__(66));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getDefaultSassImplementation(){let sassImplPkg="sass";try{eval("require").resolve("sass")}catch(error){try{eval("require").resolve("node-sass");sassImplPkg="node-sass"}catch(e){sassImplPkg="sass"}}return __nccwpck_require__(438)}function getSassImplementation(e,t){let s=t;if(!s){try{s=getDefaultSassImplementation()}catch(t){e.emitError(t);return}}if(typeof s==="string"){try{s=require(s)}catch(t){e.emitError(t);return}}const{info:r}=s;if(!r){e.emitError(new Error("Unknown Sass implementation."));return}const n=r.split("\t");if(n.length<2){e.emitError(new Error(`Unknown Sass implementation "${r}".`));return}const[o]=n;if(o==="dart-sass"){return s}else if(o==="node-sass"){return s}e.emitError(new Error(`Unknown Sass implementation "${o}".`))}function isProductionLikeMode(e){return e.mode==="production"||!e.mode}function proxyCustomImporters(e,t){return[].concat(e).map((e=>function proxyImporter(...s){const r={...this,webpackLoaderContext:t};return e.apply(r,s)}))}function isSupportedFibers(){const[e]=process.versions.node.split(".");return Number(e)<16}async function getSassOptions(e,t,s,r,n){const o=(0,_full.klona)(t.sassOptions?typeof t.sassOptions==="function"?t.sassOptions(e)||{}:t.sassOptions:{});const a=r.info.includes("dart-sass");if(a&&isSupportedFibers()){const e=!o.fiber&&o.fiber!==false;if(e){let e;try{e=require.resolve("fibers")}catch(e){}if(e){o.fiber=require(e)}}else if(o.fiber===false){delete o.fiber}}else{delete o.fiber}o.file=e.resourcePath;o.data=t.additionalData?typeof t.additionalData==="function"?await t.additionalData(s,e):`${t.additionalData}\n${s}`:s;if(!o.outputStyle&&isProductionLikeMode(e)){o.outputStyle="compressed"}if(n){o.sourceMap=true;o.outFile=_path.default.join(e.rootContext,"style.css.map");o.sourceMapContents=true;o.omitSourceMapUrl=true;o.sourceMapEmbed=false}const{resourcePath:i}=e;const c=_path.default.extname(i);if(c&&c.toLowerCase()===".sass"&&typeof o.indentedSyntax==="undefined"){o.indentedSyntax=true}else{o.indentedSyntax=Boolean(o.indentedSyntax)}o.importer=o.importer?proxyCustomImporters(Array.isArray(o.importer)?o.importer:[o.importer],e):[];o.includePaths=[].concat(process.cwd()).concat((o.includePaths||[]).map((e=>_path.default.isAbsolute(e)?e:_path.default.join(process.cwd(),e)))).concat(process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]);if(typeof o.charset==="undefined"){o.charset=true}if(!o.logger){const s=t.warnRuleAsWarning===true;const r=e.getLogger("sass-loader");const formatSpan=e=>`${e.url||"-"}:${e.start.line}:${e.start.column}: `;o.logger={debug(e,t){let s="";if(t.span){s=formatSpan(t.span)}s+=e;r.debug(s)},warn(t,n){let o="";if(n.deprecation){o+="Deprecation "}if(n.span&&!n.stack){o=formatSpan(n.span)}o+=t;if(n.stack){o+=`\n\n${n.stack}`}if(s){e.emitWarning(new _SassWarning.default(o,n))}else{r.warn(o)}}}}return o}const MODULE_REQUEST_REGEX=/^[^?]*~/;const IS_MODULE_IMPORT=/^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/]+\/)$/;function getPossibleRequests(e,t=false,s=false){let r=e;if(t){if(MODULE_REQUEST_REGEX.test(e)){r=r.replace(MODULE_REQUEST_REGEX,"")}if(IS_MODULE_IMPORT.test(e)){r=r[r.length-1]==="/"?r:`${r}/`;return[...new Set([r,e])]}}const n=_path.default.extname(r).toLowerCase();if(n===".css"){return[]}const o=_path.default.dirname(r);const a=o==="."?"":`${o}/`;const i=_path.default.basename(r);const c=_path.default.basename(r,n);return[...new Set([].concat(s?[`${a}_${c}.import${n}`,`${a}${c}.import${n}`]:[]).concat([`${a}_${i}`,`${a}${i}`]).concat(t?[e]:[]))]}function promiseResolve(e){return(t,s)=>new Promise(((r,n)=>{e(t,s,((e,t)=>{if(e){n(e)}else{r(t)}}))}))}const IS_SPECIAL_MODULE_IMPORT=/^~[^/]+$/;const IS_NATIVE_WIN32_PATH=/^[a-z]:[/\\]|^\\\\/i;function getWebpackResolver(e,t,s=[]){async function startResolving(e){if(e.length===0){return Promise.reject()}const[{possibleRequests:t}]=e;if(t.length===0){return Promise.reject()}const[{resolve:s,context:r}]=e;try{return await s(r,t[0])}catch(s){const[,...r]=t;if(r.length===0){const[,...t]=e;return startResolving(t)}e[0].possibleRequests=r;return startResolving(e)}}const r=t.info.includes("dart-sass");const n=promiseResolve(e({alias:[],aliasFields:[],conditionNames:[],descriptionFiles:[],extensions:[".sass",".scss",".css"],exportsFields:[],mainFields:[],mainFiles:["_index","index"],modules:[],restrictions:[/\.((sa|sc|c)ss)$/i],preferRelative:true}));const o=promiseResolve(e({alias:[],aliasFields:[],conditionNames:[],descriptionFiles:[],extensions:[".sass",".scss",".css"],exportsFields:[],mainFields:[],mainFiles:["_index.import","_index","index.import","index"],modules:[],restrictions:[/\.((sa|sc|c)ss)$/i],preferRelative:true}));const a=promiseResolve(e({dependencyType:"sass",conditionNames:["sass","style"],mainFields:["sass","style","main","..."],mainFiles:["_index","index","..."],extensions:[".sass",".scss",".css"],restrictions:[/\.((sa|sc|c)ss)$/i],preferRelative:true}));const i=promiseResolve(e({dependencyType:"sass",conditionNames:["sass","style"],mainFields:["sass","style","main","..."],mainFiles:["_index.import","_index","index.import","index","..."],extensions:[".sass",".scss",".css"],restrictions:[/\.((sa|sc|c)ss)$/i],preferRelative:true}));return(e,t,c)=>{if(!r&&!_path.default.isAbsolute(e)){return Promise.reject()}const l=t;const u=l.slice(0,5).toLowerCase()==="file:";if(u){try{t=_url.default.fileURLToPath(l)}catch(e){t=t.slice(7)}}let p=[];const f=!IS_SPECIAL_MODULE_IMPORT.test(t)&&!u&&!l.startsWith("/")&&!IS_NATIVE_WIN32_PATH.test(l);if(s.length>0&&f){const a=getPossibleRequests(t,false,c);if(!r){p=p.concat({resolve:c?o:n,context:_path.default.dirname(e),possibleRequests:a})}p=p.concat(s.map((e=>({resolve:c?o:n,context:e,possibleRequests:a}))))}const d=getPossibleRequests(t,true,c);p=p.concat({resolve:c?i:a,context:_path.default.dirname(e),possibleRequests:d});return startResolving(p)}}const MATCH_CSS=/\.css$/i;function getWebpackImporter(e,t,s){const r=getWebpackResolver(e.getResolve,t,s);return function importer(t,s,n){const{fromImport:o}=this;r(s,t,o).then((t=>{e.addDependency(_path.default.normalize(t));n({file:t.replace(MATCH_CSS,"")})})).catch((()=>{n({file:t})}))}}let nodeSassJobQueue=null;function getRenderFunctionFromSassImplementation(e){const t=e.info.includes("dart-sass");if(t){return e.render.bind(e)}if(nodeSassJobQueue===null){const t=Number(process.env.UV_THREADPOOL_SIZE||4);nodeSassJobQueue=_neoAsync.default.queue(e.render.bind(e),t-1)}return nodeSassJobQueue.push.bind(nodeSassJobQueue)}const ABSOLUTE_SCHEME=/^[A-Za-z0-9+\-.]+:/;function getURLType(e){if(e[0]==="/"){if(e[1]==="/"){return"scheme-relative"}return"path-absolute"}if(IS_NATIVE_WIN32_PATH.test(e)){return"path-absolute"}return ABSOLUTE_SCHEME.test(e)?"absolute":"path-relative"}function normalizeSourceMap(e,t){const s=e;delete s.file;s.sourceRoot="";s.sources=s.sources.map((e=>{const s=getURLType(e);if(s==="path-relative"){return _path.default.resolve(t,_path.default.normalize(e))}return e}));return s}},175:function(e){"use strict";e.exports=require("next/dist/compiled/neo-async")},17:function(e){"use strict";e.exports=require("path")},438:function(e){"use strict";e.exports=require("sass")},310:function(e){"use strict";e.exports=require("url")},615:function(e){"use strict";e.exports=JSON.parse('{"title":"Sass Loader options","type":"object","properties":{"implementation":{"description":"The implementation of the sass to be used.","link":"https://github.com/webpack-contrib/sass-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"sassOptions":{"description":"Options for `node-sass` or `sass` (`Dart Sass`) implementation.","link":"https://github.com/webpack-contrib/sass-loader#sassoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Sass`/`SCSS` code before the actual entry file.","link":"https://github.com/webpack-contrib/sass-loader#additionaldata","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/sass-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack-contrib/sass-loader#webpackimporter","type":"boolean"},"warnRuleAsWarning":{"description":"Treats the \'@warn\' rule as a webpack warning.","link":"https://github.com/webpack-contrib/sass-loader#warnruleaswarning","type":"boolean"}},"additionalProperties":false}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var s=__webpack_module_cache__[e]={exports:{}};var r=true;try{__webpack_modules__[e](s,s.exports,__nccwpck_require__);r=false}finally{if(r)delete __webpack_module_cache__[e]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(172);module.exports=__webpack_exports__})(); \ No newline at end of file +(function(){var __webpack_modules__={814:function(e,t){function set(e,t,s){if(typeof s.value==="object")s.value=klona(s.value);if(!s.enumerable||s.get||s.set||!s.configurable||!s.writable||t==="__proto__"){Object.defineProperty(e,t,s)}else e[t]=s.value}function klona(e){if(typeof e!=="object")return e;var t=0,s,r,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){n=Object.create(e.__proto__||null)}else if(o==="[object Array]"){n=Array(e.length)}else if(o==="[object Set]"){n=new Set;e.forEach((function(e){n.add(klona(e))}))}else if(o==="[object Map]"){n=new Map;e.forEach((function(e,t){n.set(klona(t),klona(e))}))}else if(o==="[object Date]"){n=new Date(+e)}else if(o==="[object RegExp]"){n=new RegExp(e.source,e.flags)}else if(o==="[object DataView]"){n=new e.constructor(klona(e.buffer))}else if(o==="[object ArrayBuffer]"){n=e.slice(0)}else if(o.slice(-6)==="Array]"){n=new e.constructor(e)}if(n){for(r=Object.getOwnPropertySymbols(e);t{if(e){if(e.file){this.addDependency(r.default.normalize(e.file))}s(new a.default(e));return}let n=t.map?JSON.parse(t.map):null;if(n&&c){n=(0,o.normalizeSourceMap)(n,this.rootContext)}t.stats.includedFiles.forEach((e=>{const t=r.default.normalize(e);if(r.default.isAbsolute(t)){this.addDependency(t)}}));s(null,t.css.toString(),n)}))}var i=loader;t["default"]=i},477:function(__unused_webpack_module,exports,__nccwpck_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getRenderFunctionFromSassImplementation=getRenderFunctionFromSassImplementation;exports.getSassImplementation=getSassImplementation;exports.getSassOptions=getSassOptions;exports.getWebpackImporter=getWebpackImporter;exports.getWebpackResolver=getWebpackResolver;exports.isSupportedFibers=isSupportedFibers;exports.normalizeSourceMap=normalizeSourceMap;var _url=_interopRequireDefault(__nccwpck_require__(310));var _path=_interopRequireDefault(__nccwpck_require__(17));var _full=__nccwpck_require__(814);var _neoAsync=_interopRequireDefault(__nccwpck_require__(175));var _SassWarning=_interopRequireDefault(__nccwpck_require__(402));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getDefaultSassImplementation(){let sassImplPkg="sass";try{eval("require").resolve("sass")}catch(error){try{eval("require").resolve("node-sass");sassImplPkg="node-sass"}catch(e){sassImplPkg="sass"}}return __nccwpck_require__(438)}function getSassImplementation(e,t){let s=t;if(!s){try{s=getDefaultSassImplementation()}catch(t){e.emitError(t);return}}if(typeof s==="string"){try{s=require(s)}catch(t){e.emitError(t);return}}const{info:r}=s;if(!r){e.emitError(new Error("Unknown Sass implementation."));return}const n=r.split("\t");if(n.length<2){e.emitError(new Error(`Unknown Sass implementation "${r}".`));return}const[o]=n;if(o==="dart-sass"){return s}else if(o==="node-sass"){return s}e.emitError(new Error(`Unknown Sass implementation "${o}".`))}function isProductionLikeMode(e){return e.mode==="production"||!e.mode}function proxyCustomImporters(e,t){return[].concat(e).map((e=>function proxyImporter(...s){const r={...this,webpackLoaderContext:t};return e.apply(r,s)}))}function isSupportedFibers(){const[e]=process.versions.node.split(".");return Number(e)<16}async function getSassOptions(e,t,s,r,n){const o=(0,_full.klona)(t.sassOptions?typeof t.sassOptions==="function"?t.sassOptions(e)||{}:t.sassOptions:{});const a=r.info.includes("dart-sass");if(a&&isSupportedFibers()){const e=!o.fiber&&o.fiber!==false;if(e){let e;try{e=require.resolve("fibers")}catch(e){}if(e){o.fiber=require(e)}}else if(o.fiber===false){delete o.fiber}}else{delete o.fiber}o.file=e.resourcePath;o.data=t.additionalData?typeof t.additionalData==="function"?await t.additionalData(s,e):`${t.additionalData}\n${s}`:s;if(!o.outputStyle&&isProductionLikeMode(e)){o.outputStyle="compressed"}if(n){o.sourceMap=true;o.outFile=_path.default.join(e.rootContext,"style.css.map");o.sourceMapContents=true;o.omitSourceMapUrl=true;o.sourceMapEmbed=false}const{resourcePath:i}=e;const c=_path.default.extname(i);if(c&&c.toLowerCase()===".sass"&&typeof o.indentedSyntax==="undefined"){o.indentedSyntax=true}else{o.indentedSyntax=Boolean(o.indentedSyntax)}o.importer=o.importer?proxyCustomImporters(Array.isArray(o.importer)?o.importer:[o.importer],e):[];o.includePaths=[].concat(process.cwd()).concat((o.includePaths||[]).map((e=>_path.default.isAbsolute(e)?e:_path.default.join(process.cwd(),e)))).concat(process.env.SASS_PATH?process.env.SASS_PATH.split(process.platform==="win32"?";":":"):[]);if(typeof o.charset==="undefined"){o.charset=true}if(!o.logger){const s=t.warnRuleAsWarning===true;const r=e.getLogger("sass-loader");const formatSpan=e=>`${e.url||"-"}:${e.start.line}:${e.start.column}: `;o.logger={debug(e,t){let s="";if(t.span){s=formatSpan(t.span)}s+=e;r.debug(s)},warn(t,n){let o="";if(n.deprecation){o+="Deprecation "}if(n.span&&!n.stack){o=formatSpan(n.span)}o+=t;if(n.stack){o+=`\n\n${n.stack}`}if(s){e.emitWarning(new _SassWarning.default(o,n))}else{r.warn(o)}}}}return o}const MODULE_REQUEST_REGEX=/^[^?]*~/;const IS_MODULE_IMPORT=/^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/]+\/)$/;function getPossibleRequests(e,t=false,s=false){let r=e;if(t){if(MODULE_REQUEST_REGEX.test(e)){r=r.replace(MODULE_REQUEST_REGEX,"")}if(IS_MODULE_IMPORT.test(e)){r=r[r.length-1]==="/"?r:`${r}/`;return[...new Set([r,e])]}}const n=_path.default.extname(r).toLowerCase();if(n===".css"){return[]}const o=_path.default.dirname(r);const a=o==="."?"":`${o}/`;const i=_path.default.basename(r);const c=_path.default.basename(r,n);return[...new Set([].concat(s?[`${a}_${c}.import${n}`,`${a}${c}.import${n}`]:[]).concat([`${a}_${i}`,`${a}${i}`]).concat(t?[e]:[]))]}function promiseResolve(e){return(t,s)=>new Promise(((r,n)=>{e(t,s,((e,t)=>{if(e){n(e)}else{r(t)}}))}))}const IS_SPECIAL_MODULE_IMPORT=/^~[^/]+$/;const IS_NATIVE_WIN32_PATH=/^[a-z]:[/\\]|^\\\\/i;function getWebpackResolver(e,t,s=[]){async function startResolving(e){if(e.length===0){return Promise.reject()}const[{possibleRequests:t}]=e;if(t.length===0){return Promise.reject()}const[{resolve:s,context:r}]=e;try{return await s(r,t[0])}catch(s){const[,...r]=t;if(r.length===0){const[,...t]=e;return startResolving(t)}e[0].possibleRequests=r;return startResolving(e)}}const r=t.info.includes("dart-sass");const n=promiseResolve(e({alias:[],aliasFields:[],conditionNames:[],descriptionFiles:[],extensions:[".sass",".scss",".css"],exportsFields:[],mainFields:[],mainFiles:["_index","index"],modules:[],restrictions:[/\.((sa|sc|c)ss)$/i],preferRelative:true}));const o=promiseResolve(e({alias:[],aliasFields:[],conditionNames:[],descriptionFiles:[],extensions:[".sass",".scss",".css"],exportsFields:[],mainFields:[],mainFiles:["_index.import","_index","index.import","index"],modules:[],restrictions:[/\.((sa|sc|c)ss)$/i],preferRelative:true}));const a=promiseResolve(e({dependencyType:"sass",conditionNames:["sass","style"],mainFields:["sass","style","main","..."],mainFiles:["_index","index","..."],extensions:[".sass",".scss",".css"],restrictions:[/\.((sa|sc|c)ss)$/i],preferRelative:true}));const i=promiseResolve(e({dependencyType:"sass",conditionNames:["sass","style"],mainFields:["sass","style","main","..."],mainFiles:["_index.import","_index","index.import","index","..."],extensions:[".sass",".scss",".css"],restrictions:[/\.((sa|sc|c)ss)$/i],preferRelative:true}));return(e,t,c)=>{if(!r&&!_path.default.isAbsolute(e)){return Promise.reject()}const l=t;const u=l.slice(0,5).toLowerCase()==="file:";if(u){try{t=_url.default.fileURLToPath(l)}catch(e){t=t.slice(7)}}let p=[];const f=!IS_SPECIAL_MODULE_IMPORT.test(t)&&!u&&!l.startsWith("/")&&!IS_NATIVE_WIN32_PATH.test(l);if(s.length>0&&f){const a=getPossibleRequests(t,false,c);if(!r){p=p.concat({resolve:c?o:n,context:_path.default.dirname(e),possibleRequests:a})}p=p.concat(s.map((e=>({resolve:c?o:n,context:e,possibleRequests:a}))))}const d=getPossibleRequests(t,true,c);p=p.concat({resolve:c?i:a,context:_path.default.dirname(e),possibleRequests:d});return startResolving(p)}}const MATCH_CSS=/\.css$/i;function getWebpackImporter(e,t,s){const r=getWebpackResolver(e.getResolve,t,s);return function importer(t,s,n){const{fromImport:o}=this;r(s,t,o).then((t=>{e.addDependency(_path.default.normalize(t));n({file:t.replace(MATCH_CSS,"")})})).catch((()=>{n({file:t})}))}}let nodeSassJobQueue=null;function getRenderFunctionFromSassImplementation(e){const t=e.info.includes("dart-sass");if(t){return e.render.bind(e)}if(nodeSassJobQueue===null){const t=Number(process.env.UV_THREADPOOL_SIZE||4);nodeSassJobQueue=_neoAsync.default.queue(e.render.bind(e),t-1)}return nodeSassJobQueue.push.bind(nodeSassJobQueue)}const ABSOLUTE_SCHEME=/^[A-Za-z0-9+\-.]+:/;function getURLType(e){if(e[0]==="/"){if(e[1]==="/"){return"scheme-relative"}return"path-absolute"}if(IS_NATIVE_WIN32_PATH.test(e)){return"path-absolute"}return ABSOLUTE_SCHEME.test(e)?"absolute":"path-relative"}function normalizeSourceMap(e,t){const s=e;delete s.file;s.sourceRoot="";s.sources=s.sources.map((e=>{const s=getURLType(e);if(s==="path-relative"){return _path.default.resolve(t,_path.default.normalize(e))}return e}));return s}},175:function(e){"use strict";e.exports=require("next/dist/compiled/neo-async")},17:function(e){"use strict";e.exports=require("path")},438:function(e){"use strict";e.exports=require("sass")},310:function(e){"use strict";e.exports=require("url")},592:function(e){"use strict";e.exports=JSON.parse('{"title":"Sass Loader options","type":"object","properties":{"implementation":{"description":"The implementation of the sass to be used.","link":"https://github.com/webpack-contrib/sass-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"sassOptions":{"description":"Options for `node-sass` or `sass` (`Dart Sass`) implementation.","link":"https://github.com/webpack-contrib/sass-loader#sassoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Sass`/`SCSS` code before the actual entry file.","link":"https://github.com/webpack-contrib/sass-loader#additionaldata","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/sass-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack-contrib/sass-loader#webpackimporter","type":"boolean"},"warnRuleAsWarning":{"description":"Treats the \'@warn\' rule as a webpack warning.","link":"https://github.com/webpack-contrib/sass-loader#warnruleaswarning","type":"boolean"}},"additionalProperties":false}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var s=__webpack_module_cache__[e]={exports:{}};var r=true;try{__webpack_modules__[e](s,s.exports,__nccwpck_require__);r=false}finally{if(r)delete __webpack_module_cache__[e]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(356);module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/packages/next/compiled/webpack/webpack.d.ts b/packages/next/compiled/webpack/webpack.d.ts index b675b70020c968b..867d7d63fcafead 100644 --- a/packages/next/compiled/webpack/webpack.d.ts +++ b/packages/next/compiled/webpack/webpack.d.ts @@ -1,11 +1,6 @@ export namespace webpack { export type Compiler = any export type Plugin = any -} - -export namespace webpack5 { - export type Compiler = any - export type Plugin = any export type Configuration = any export type StatsError = any export type Stats = any diff --git a/packages/next/compiled/webpack/webpack.js b/packages/next/compiled/webpack/webpack.js index 6e0cc598e4d25c7..e4eccb4b126a3a4 100644 --- a/packages/next/compiled/webpack/webpack.js +++ b/packages/next/compiled/webpack/webpack.js @@ -3,22 +3,22 @@ exports.__esModule = true exports.default = undefined exports.init = function () { - if (process.env.NEXT_PRIVATE_LOCAL_WEBPACK5) { + if (process.env.NEXT_PRIVATE_LOCAL_webpack) { Object.assign(exports, { // eslint-disable-next-line import/no-extraneous-dependencies - BasicEvaluatedExpression: require('webpack5/lib/javascript/BasicEvaluatedExpression'), + BasicEvaluatedExpression: require('webpack/lib/javascript/BasicEvaluatedExpression'), // eslint-disable-next-line import/no-extraneous-dependencies - ModuleFilenameHelpers: require('webpack5/lib/ModuleFilenameHelpers'), + ModuleFilenameHelpers: require('webpack/lib/ModuleFilenameHelpers'), // eslint-disable-next-line import/no-extraneous-dependencies - NodeTargetPlugin: require('webpack5/lib/node/NodeTargetPlugin'), + NodeTargetPlugin: require('webpack/lib/node/NodeTargetPlugin'), // eslint-disable-next-line import/no-extraneous-dependencies - StringXor: require('webpack5/lib/util/StringXor'), + StringXor: require('webpack/lib/util/StringXor'), // eslint-disable-next-line import/no-extraneous-dependencies - NormalModule: require('webpack5/lib/NormalModule'), + NormalModule: require('webpack/lib/NormalModule'), // eslint-disable-next-line import/no-extraneous-dependencies - sources: require('webpack5').sources, + sources: require('webpack').sources, // eslint-disable-next-line import/no-extraneous-dependencies - webpack: require('webpack5'), + webpack: require('webpack'), }) } else { Object.assign(exports, require('./bundle5')()) diff --git a/packages/next/package.json b/packages/next/package.json index 7765833b3a0c73d..e115b3db04efb46 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -273,8 +273,7 @@ "web-vitals": "3.0.0-beta.2", "webpack-sources1": "npm:webpack-sources@1.4.3", "webpack-sources3": "npm:webpack-sources@3.2.3", - "webpack4": "npm:webpack@4.44.1", - "webpack5": "npm:webpack@5.74.0", + "webpack": "5.74.0", "ws": "8.2.3" }, "resolutions": { diff --git a/packages/next/server/config-shared.ts b/packages/next/server/config-shared.ts index a41f84c65a40f29..0977434043f743f 100644 --- a/packages/next/server/config-shared.ts +++ b/packages/next/server/config-shared.ts @@ -1,5 +1,5 @@ import os from 'os' -import type { webpack5 } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import type { Header, Redirect, Rewrite } from '../lib/load-custom-routes' import { ImageConfig, @@ -115,7 +115,7 @@ export interface ExperimentalConfig { runtime?: Exclude serverComponents?: boolean fullySpecified?: boolean - urlImports?: NonNullable['buildHttp'] + urlImports?: NonNullable['buildHttp'] outputFileTracingRoot?: string images?: { remotePatterns?: RemotePattern[] diff --git a/packages/next/server/dev/hot-middleware.ts b/packages/next/server/dev/hot-middleware.ts index d2d86ecbd091f0c..f33071ec6a06c80 100644 --- a/packages/next/server/dev/hot-middleware.ts +++ b/packages/next/server/dev/hot-middleware.ts @@ -21,7 +21,7 @@ // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import type { webpack5 as webpack } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import type ws from 'ws' import { isMiddlewareFilename } from '../../build/utils' import { nonNullable } from '../../lib/non-nullable' diff --git a/packages/next/server/dev/hot-reloader.ts b/packages/next/server/dev/hot-reloader.ts index c68e6b5d46400f3..de362f9b5a5d037 100644 --- a/packages/next/server/dev/hot-reloader.ts +++ b/packages/next/server/dev/hot-reloader.ts @@ -1,4 +1,4 @@ -import { webpack5 } from 'next/dist/compiled/webpack/webpack' +import { webpack, StringXor } from 'next/dist/compiled/webpack/webpack' import type { NextConfigComplete } from '../config-shared' import type { CustomRoutes } from '../../lib/load-custom-routes' import { getOverlayMiddleware } from 'next/dist/compiled/@next/react-dev-overlay/dist/middleware' @@ -6,7 +6,6 @@ import { IncomingMessage, ServerResponse } from 'http' import { WebpackHotMiddleware } from './hot-middleware' import { join, relative, isAbsolute } from 'path' import { UrlObject } from 'url' -import { webpack, StringXor } from 'next/dist/compiled/webpack/webpack' import { createEntrypoints, createPagesMapping, @@ -115,7 +114,7 @@ const matchNextPageBundleRequest = getPathMatch( // Recursively look up the issuer till it ends up at the root function findEntryModule( - compilation: webpack5.Compilation, + compilation: webpack.Compilation, issuerModule: any ): any { const issuer = compilation.moduleGraph.getIssuer(issuerModule) @@ -126,7 +125,7 @@ function findEntryModule( return issuerModule } -function erroredPages(compilation: webpack5.Compilation) { +function erroredPages(compilation: webpack.Compilation) { const failedPages: { [page: string]: any[] } = {} for (const error of compilation.errors) { if (!error.module) { @@ -166,9 +165,9 @@ export default class HotReloader { private config: NextConfigComplete public hasServerComponents: boolean public hasReactRoot: boolean - public clientStats: webpack5.Stats | null - public serverStats: webpack5.Stats | null - public edgeServerStats: webpack5.Stats | null + public clientStats: webpack.Stats | null + public serverStats: webpack.Stats | null + public edgeServerStats: webpack.Stats | null private clientError: Error | null = null private serverError: Error | null = null private serverPrevDocumentHash: string | null @@ -181,7 +180,7 @@ export default class HotReloader { private hotReloaderSpan: Span private pagesMapping: { [key: string]: string } = {} private appDir?: string - public multiCompiler?: webpack5.MultiCompiler + public multiCompiler?: webpack.MultiCompiler public activeConfigs?: Array< UnwrapPromise> > @@ -692,7 +691,7 @@ export default class HotReloader { this.multiCompiler = webpack( this.activeConfigs - ) as unknown as webpack5.MultiCompiler + ) as unknown as webpack.MultiCompiler watchCompilers( this.multiCompiler.compilers[0], @@ -711,7 +710,7 @@ export default class HotReloader { const trackPageChanges = (pageHashMap: Map, changedItems: Set) => - (stats: webpack5.Compilation) => { + (stats: webpack.Compilation) => { try { stats.entrypoints.forEach((entry, key) => { if ( @@ -986,7 +985,7 @@ export default class HotReloader { } public async getCompilationErrors(page: string) { - const getErrors = ({ compilation }: webpack5.Stats) => { + const getErrors = ({ compilation }: webpack.Stats) => { const failedPages = erroredPages(compilation) const normalizedPage = normalizePathSep(page) // If there is an error related to the requesting page we display it instead of the first error diff --git a/packages/next/server/dev/on-demand-entry-handler.ts b/packages/next/server/dev/on-demand-entry-handler.ts index f934b654d9df0f8..da43d221be0a302 100644 --- a/packages/next/server/dev/on-demand-entry-handler.ts +++ b/packages/next/server/dev/on-demand-entry-handler.ts @@ -1,5 +1,5 @@ import type ws from 'ws' -import type { webpack5 as webpack } from 'next/dist/compiled/webpack/webpack' +import type { webpack } from 'next/dist/compiled/webpack/webpack' import type { NextConfigComplete } from '../config-shared' import { EventEmitter } from 'events' import { findPageFile } from '../lib/find-page-file' diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index 5565b0d11cc9bd9..2294f61d6a5769d 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -1733,7 +1733,7 @@ export async function ncc_webpack_bundle5(task, opts) { await task .source(opts.src || 'bundles/webpack/bundle5.js') .ncc({ - packageName: 'webpack5', + packageName: 'webpack', bundleName: 'webpack', customEmit(path) { if (path.endsWith('.runtime.js')) return `'./${basename(path)}'` diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json index 942516f5fd6b0b7..9d4a14aaf6b9966 100644 --- a/packages/next/tsconfig.json +++ b/packages/next/tsconfig.json @@ -9,5 +9,11 @@ "jsx": "react", "stripInternal": true }, - "exclude": ["dist", "./*.d.ts", "future/*.d.ts", "image-types/global.d.ts"] + "exclude": [ + "dist", + "./*.d.ts", + "future/*.d.ts", + "image-types/global.d.ts", + "types/compiled.d.ts" + ] } diff --git a/packages/next/types/compiled.d.ts b/packages/next/types/compiled.d.ts new file mode 100644 index 000000000000000..1f5bf8303af88bc --- /dev/null +++ b/packages/next/types/compiled.d.ts @@ -0,0 +1,21 @@ +// this file is used to stub compiled imports when skipLibCheck: false is used +// it is not meant to be used with local type checking and is ignored in our +// local tsconfig.json + +declare module 'next/dist/compiled/webpack/webpack' { + export function init(): void + export let BasicEvaluatedExpression: any + export let GraphHelpers: any + export let sources: any + export let StringXor: any + export const webpack: any + export const Compiler: any + export const Compilation: any + export const Module: any + export const Stats: any + export const Template: any + export const RuntimeModule: any + export const RuntimeGlobals: any + export const NormalModule: any + export const ResolvePluginInstance: any +} diff --git a/packages/next/types/misc.d.ts b/packages/next/types/misc.d.ts index 3b80a2eaf1ebefb..fc4fd2597c40bdd 100644 --- a/packages/next/types/misc.d.ts +++ b/packages/next/types/misc.d.ts @@ -335,14 +335,6 @@ declare module 'next/dist/compiled/@segment/ajv-human-errors' { export = m } -declare module 'pnp-webpack-plugin' { - import webpack from 'webpack4' - - class PnpWebpackPlugin extends webpack.Plugin {} - - export = PnpWebpackPlugin -} - declare module NodeJS { interface ProcessVersions { pnp?: string diff --git a/packages/next/types/webpack.d.ts b/packages/next/types/webpack.d.ts index afac524b5f889a4..c501b77f13eef6e 100644 --- a/packages/next/types/webpack.d.ts +++ b/packages/next/types/webpack.d.ts @@ -28,19 +28,11 @@ declare module 'next/dist/compiled/loader-utils3' declare module 'next/dist/compiled/webpack/webpack' { import webpackSources from 'webpack-sources1' - import webpack4, { loader } from 'webpack4' - import webpack5 from 'webpack5' - export { NormalModule } from 'webpack5' export function init(): void export let BasicEvaluatedExpression: any export let GraphHelpers: any export let sources: typeof webpackSources export let StringXor: any - // TODO change this to webpack5 - export { webpack4 as webpack, loader, webpack4, webpack5 } -} - -declare module 'webpack' { export { Compiler, Compilation, @@ -50,2371 +42,7 @@ declare module 'webpack' { RuntimeModule, RuntimeGlobals, NormalModule, - } from 'webpack5' -} - -declare module 'webpack4' { - import { RawSourceMap } from 'source-map' - import { ConcatSource } from 'webpack-sources1' - - function webpack( - options: webpack.Configuration, - handler: webpack.Compiler.Handler - ): webpack.Compiler.Watching | webpack.Compiler - function webpack(options?: webpack.Configuration): webpack.Compiler - - function webpack( - options: webpack.Configuration[], - handler: webpack.MultiCompiler.Handler - ): webpack.MultiWatching | webpack.MultiCompiler - function webpack(options: webpack.Configuration[]): webpack.MultiCompiler - - function webpack( - options: webpack.Configuration | webpack.Configuration[] - ): webpack.Compiler | webpack.MultiCompiler - - export = webpack - - namespace webpack { - /** Webpack package version. */ - const version: string | undefined - - interface Configuration { - /** Enable production optimizations or development hints. */ - mode?: 'development' | 'production' | 'none' - /** Name of the configuration. Used when loading multiple configurations. */ - name?: string - /** - * The base directory (absolute path!) for resolving the `entry` option. - * If `output.pathinfo` is set, the included pathinfo is shortened to this directory. - */ - context?: string - entry?: string | string[] | Entry | EntryFunc - /** Choose a style of source mapping to enhance the debugging process. These values can affect build and rebuild speed dramatically. */ - devtool?: Options.Devtool - /** Options affecting the output. */ - output?: Output - /** Options affecting the normal modules (NormalModuleFactory) */ - module?: Module - /** Options affecting the resolving of modules. */ - resolve?: Resolve - /** Like resolve but for loaders. */ - resolveLoader?: ResolveLoader - /** - * 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. - */ - externals?: ExternalsElement | ExternalsElement[] - /** - * - "web" Compile for usage in a browser-like environment (default). - * - "webworker" Compile as WebWorker. - * - "node" Compile for usage in a node.js-like environment (use require to load chunks). - * - "async-node" Compile for usage in a node.js-like environment (use fs and vm to load chunks async). - * - "node-webkit" Compile for usage in webkit, uses jsonp chunk loading but also supports builtin node.js modules plus require(“nw.gui”) (experimental) - * - "atom" Compile for usage in electron (formerly known as atom-shell), supports require for modules necessary to run Electron. - * - "electron-renderer" Compile for Electron for renderer process, providing a target using JsonpTemplatePlugin, FunctionModulePlugin for browser - * environments and NodeTargetPlugin and ExternalsPlugin for CommonJS and Electron built-in modules. - * - "electron-main" Compile for Electron for main process. - * - "atom" Alias for electron-main. - * - "electron" Alias for electron-main. - */ - target?: - | 'web' - | 'webworker' - | 'node' - | 'async-node' - | 'node-webkit' - | 'atom' - | 'electron' - | 'electron-renderer' - | 'electron-main' - | ((compiler?: any) => void) - /** Report the first error as a hard error instead of tolerating it. */ - bail?: boolean - /** Capture timing information for each module. */ - profile?: boolean - /** Cache generated modules and chunks to improve performance for multiple incremental builds. */ - cache?: boolean | object - /** Enter watch mode, which rebuilds on file change. */ - watch?: boolean - watchOptions?: Options.WatchOptions - /** Switch loaders to debug mode. */ - debug?: boolean - /** Include polyfills or mocks for various node stuff */ - node?: Node | false - /** Set the value of require.amd and define.amd. */ - amd?: { [moduleName: string]: boolean } - /** Used for recordsInputPath and recordsOutputPath */ - recordsPath?: string - /** Load compiler state from a json file. */ - recordsInputPath?: string - /** Store compiler state to a json file. */ - recordsOutputPath?: string - /** Add additional plugins to the compiler. */ - plugins?: Plugin[] - /** Stats options for logging */ - stats?: Options.Stats - /** Performance options */ - performance?: Options.Performance | false - /** Limit the number of parallel processed modules. Can be used to fine tune performance or to get more reliable profiling results */ - parallelism?: number - /** Optimization options */ - optimization?: Options.Optimization - experiments?: { - layers: boolean - } - } - - interface Entry { - [name: string]: string | string[] - } - - type EntryFunc = () => - | string - | string[] - | Entry - | Promise - - interface DevtoolModuleFilenameTemplateInfo { - identifier: string - shortIdentifier: string - resource: any - resourcePath: string - absoluteResourcePath: string - allLoaders: any[] - query: string - moduleId: string - hash: string - } - - interface Output { - /** When used in tandem with output.library and output.libraryTarget, this option allows users to insert comments within the export wrapper. */ - auxiliaryComment?: string | AuxiliaryCommentObject - /** The filename of the entry chunk as relative path inside the output.path directory. */ - filename?: string | Function - /** The filename of non-entry chunks as relative path inside the output.path directory. */ - chunkFilename?: string - /** Number of milliseconds before chunk request expires, defaults to 120,000. */ - chunkLoadTimeout?: number - /** This option enables cross-origin loading of chunks. */ - crossOriginLoading?: string | boolean - /** The JSONP function used by webpack for asnyc loading of chunks. */ - jsonpFunction?: string - /** Allows customization of the script type webpack injects script tags into the DOM to download async chunks. */ - jsonpScriptType?: 'text/javascript' | 'module' - /** Filename template string of function for the sources array in a generated SourceMap. */ - devtoolModuleFilenameTemplate?: - | string - | ((info: DevtoolModuleFilenameTemplateInfo) => string) - /** Similar to output.devtoolModuleFilenameTemplate, but used in the case of duplicate module identifiers. */ - devtoolFallbackModuleFilenameTemplate?: - | string - | ((info: DevtoolModuleFilenameTemplateInfo) => string) - /** - * Enable line to line mapped mode for all/specified modules. - * Line to line mapped mode uses a simple SourceMap where each line of the generated source is mapped to the same line of the original source. - * It’s a performance optimization. Only use it if your performance need to be better and you are sure that input lines match which generated lines. - * true enables it for all modules (not recommended) - */ - devtoolLineToLine?: boolean - /** This option determines the modules namespace used with the output.devtoolModuleFilenameTemplate. */ - devtoolNamespace?: string - /** The filename of the Hot Update Chunks. They are inside the output.path directory. */ - hotUpdateChunkFilename?: string - /** The JSONP function used by webpack for async loading of hot update chunks. */ - hotUpdateFunction?: string - /** The filename of the Hot Update Main File. It is inside the output.path directory. */ - hotUpdateMainFilename?: string - /** If set, export the bundle as library. output.library is the name. */ - library?: string | string[] | { [key: string]: string } - /** - * Which format to export the library: - * - "var" - Export by setting a variable: var Library = xxx (default) - * - "this" - Export by setting a property of this: this["Library"] = xxx - * - "commonjs" - Export by setting a property of exports: exports["Library"] = xxx - * - "commonjs2" - Export by setting module.exports: module.exports = xxx - * - "amd" - Export to AMD (optionally named) - * - "umd" - Export to AMD, CommonJS2 or as property in root - * - "window" - Assign to window - * - "assign" - Assign to a global variable - * - "jsonp" - Generate Webpack JSONP module - */ - libraryTarget?: LibraryTarget - /** Configure which module or modules will be exposed via the `libraryTarget` */ - libraryExport?: string | string[] - /** If output.libraryTarget is set to umd and output.library is set, setting this to true will name the AMD module. */ - umdNamedDefine?: boolean - /** The output directory as absolute path. */ - path?: string - /** Include comments with information about the modules. */ - pathinfo?: boolean - /** The output.path from the view of the Javascript / HTML page. */ - publicPath?: string - /** The filename of the SourceMaps for the JavaScript files. They are inside the output.path directory. */ - sourceMapFilename?: string - /** Prefixes every line of the source in the bundle with this string. */ - sourcePrefix?: string - /** The encoding to use when generating the hash, defaults to 'hex' */ - hashDigest?: 'hex' | 'latin1' | 'base64' - /** The prefix length of the hash digest to use, defaults to 20. */ - hashDigestLength?: number - /** Algorithm used for generation the hash (see node.js crypto package) */ - hashFunction?: string | ((algorithm: string, options?: any) => any) - /** An optional salt to update the hash via Node.JS' hash.update. */ - hashSalt?: string - /** An expression which is used to address the global object/scope in runtime code. */ - globalObject?: string - /** Handles exceptions in module loading correctly at a performance cost. */ - strictModuleExceptionHandling?: boolean - /** - * Use the future version of asset emitting logic, which allows freeing memory of assets after emitting. - * It could break plugins which assume that assets are still readable after they were emitted. - * @deprecated - will be removed in webpack v5.0.0 and this behavior will become the new default. - */ - futureEmitAssets?: boolean - /** The filename of WebAssembly modules as relative path inside the `output.path` directory. */ - webassemblyModuleFilename?: string - /** Library types enabled */ - enabledLibraryTypes?: string[] - } - - type LibraryTarget = - | 'var' - | 'assign' - | 'this' - | 'window' - | 'global' - | 'commonjs' - | 'commonjs2' - | 'amd' - | 'umd' - | 'jsonp' - - type AuxiliaryCommentObject = { [P in LibraryTarget]: string } - - interface Module { - /** A array of applied pre loaders. */ - preLoaders?: RuleSetRule[] - /** A array of applied post loaders. */ - postLoaders?: RuleSetRule[] - /** A RegExp or an array of RegExps. Don’t parse files matching. */ - noParse?: RegExp | RegExp[] | ((content: string) => boolean) - unknownContextRequest?: string - unknownContextRecursive?: boolean - unknownContextRegExp?: RegExp - unknownContextCritical?: boolean - exprContextRequest?: string - exprContextRegExp?: RegExp - exprContextRecursive?: boolean - exprContextCritical?: boolean - wrappedContextRegExp?: RegExp - wrappedContextRecursive?: boolean - wrappedContextCritical?: boolean - strictExportPresence?: boolean - /** An array of rules applied for modules. */ - rules: RuleSetRule[] - parser?: { - javascript?: any - } - generator?: { - asset?: any - } - } - - interface Resolve { - /** - * A list of directories to resolve modules from. - * - * Absolute paths will be searched once. - * - * If an entry is relative, will be resolved using node's resolution algorithm - * relative to the requested file. - * - * Defaults to `["node_modules"]` - */ - modules?: string[] - - /** - * A list of package description files to search for. - * - * Defaults to `["package.json"]` - */ - descriptionFiles?: string[] - - /** - * A list of fields in a package description object to use for finding - * the entry point. - * - * Defaults to `["browser", "module", "main"]` or `["module", "main"]`, - * depending on the value of the `target` `Configuration` value. - */ - mainFields?: string[] | string[][] - - /** - * A list of fields in a package description object to try to parse - * in the same format as the `alias` resolve option. - * - * Defaults to `["browser"]` or `[]`, depending on the value of the - * `target` `Configuration` value. - * - * @see alias - */ - aliasFields?: string[] | string[][] - - /** - * A list of file names to search for when requiring directories that - * don't contain a package description file. - * - * Defaults to `["index"]`. - */ - mainFiles?: string[] - - /** - * A list of file extensions to try when requesting files. - * - * An empty string is considered invalid. - */ - extensions?: string[] - - /** - * If true, requires that all requested paths must use an extension - * from `extensions`. - */ - enforceExtension?: boolean - - /** - * Replace the given module requests with other modules or paths. - * - * @see aliasFields - */ - alias?: { [key: string]: string } - - /** - * Whether to use a cache for resolving, or the specific object - * to use for caching. Sharing objects may be useful when running - * multiple webpack compilers. - * - * Defaults to `true`. - */ - unsafeCache?: {} | boolean - - /** - * A function used to decide whether to cache the given resolve request. - * - * Defaults to `() => true`. - */ - cachePredicate?(data: { path: string; request: string }): boolean - - /** - * A list of additional resolve plugins which should be applied. - */ - plugins?: ResolvePlugin[] - - /** - * Whether to resolve symlinks to their symlinked location. - * - * Defaults to `true` - */ - symlinks?: boolean - - /** - * If unsafe cache is enabled, includes request.context in the cache key. - * This option is taken into account by the enhanced-resolve module. - * Since webpack 3.1.0 context in resolve caching is ignored when resolve or resolveLoader plugins are provided. - * This addresses a performance regression. - */ - cacheWithContext?: boolean - } - - interface ResolveLoader extends Resolve { - /** - * List of strings to append to a loader's name when trying to resolve it. - */ - moduleExtensions?: string[] - - enforceModuleExtension?: boolean - } - - type ExternalsElement = - | string - | RegExp - | ExternalsObjectElement - | ExternalsFunctionElement - - interface ExternalsObjectElement { - [key: string]: - | boolean - | string - | string[] - | Record - } - - type ExternalsFunctionElement = ( - context: any, - request: any, - callback: (error?: any, result?: any) => void - ) => any - - interface Node { - console?: boolean | 'mock' - process?: boolean | 'mock' - global?: boolean - __filename?: boolean | 'mock' - __dirname?: boolean | 'mock' - Buffer?: boolean | 'mock' - setImmediate?: boolean | 'mock' | 'empty' - [nodeBuiltin: string]: boolean | 'mock' | 'empty' | undefined - } - - interface NewLoader { - loader: string - options?: { [name: string]: any } - } - type Loader = string | NewLoader - - interface ParserOptions { - [optName: string]: any - system?: boolean - } - - type RuleSetCondition = - | RegExp - | string - | ((path: string) => boolean) - | RuleSetConditions - | { - /** - * Logical AND - */ - and?: RuleSetCondition[] - /** - * Exclude all modules matching any of these conditions - */ - exclude?: RuleSetCondition - /** - * Exclude all modules matching not any of these conditions - */ - include?: RuleSetCondition - /** - * Logical NOT - */ - not?: RuleSetCondition[] - /** - * Logical OR - */ - or?: RuleSetCondition[] - /** - * Exclude all modules matching any of these conditions - */ - test?: RuleSetCondition - } - - // A hack around circular type referencing - interface RuleSetConditions extends Array {} - - interface RuleSetRule { - /** - * Enforce this rule as pre or post step - */ - enforce?: 'pre' | 'post' - /** - * Shortcut for resource.exclude - */ - exclude?: RuleSetCondition - /** - * Shortcut for resource.include - */ - include?: RuleSetCondition - /** - * Match the issuer of the module (The module pointing to this module) - */ - issuer?: RuleSetCondition - /** - * Shortcut for use.loader - */ - loader?: RuleSetUse - /** - * Shortcut for use.loader - */ - loaders?: RuleSetUse - /** - * Only execute the first matching rule in this array - */ - oneOf?: RuleSetRule[] - /** - * Shortcut for use.options - */ - options?: RuleSetQuery - /** - * Options for parsing - */ - parser?: { [k: string]: any } - /** - * Options for the resolver - */ - resolve?: Resolve - /** - * Flags a module as with or without side effects - */ - sideEffects?: boolean - /** - * Shortcut for use.query - */ - query?: RuleSetQuery - /** - * Module type to use for the module - */ - type?: - | 'javascript/auto' - | 'javascript/dynamic' - | 'javascript/esm' - | 'json' - | 'webassembly/experimental' - | 'asset/resource' - /** - * Match the resource path of the module - */ - resource?: RuleSetCondition - /** - * Match the resource query of the module - */ - resourceQuery?: RuleSetCondition - /** - * Match the child compiler name - */ - compiler?: RuleSetCondition - /** - * Match and execute these rules when this rule is matched - */ - rules?: RuleSetRule[] - /** - * Shortcut for resource.test - */ - test?: RuleSetCondition - /** - * Modifiers applied to the module when rule is matched - */ - use?: RuleSetUse - } - - type RuleSetUse = - | RuleSetUseItem - | RuleSetUseItem[] - | ((data: any) => RuleSetUseItem | RuleSetUseItem[]) - - interface RuleSetLoader { - /** - * Loader name - */ - loader?: string - /** - * Loader options - */ - options?: RuleSetQuery - /** - * Unique loader identifier - */ - ident?: string - /** - * Loader query - */ - query?: RuleSetQuery - } - - type RuleSetUseItem = - | string - | RuleSetLoader - | ((data: any) => string | RuleSetLoader) - - type RuleSetQuery = string | { [k: string]: any } - - /** - * @deprecated Use RuleSetCondition instead - */ - type Condition = RuleSetCondition - - /** - * @deprecated Use RuleSetRule instead - */ - type Rule = RuleSetRule - - abstract class Plugin { - apply(compiler: Compiler): void - } - - namespace Options { - type Devtool = - | 'eval' - | 'inline-source-map' - | 'cheap-eval-source-map' - | 'cheap-source-map' - | 'cheap-module-eval-source-map' - | 'cheap-module-source-map' - | 'eval-source-map' - | 'source-map' - | 'nosources-source-map' - | 'hidden-source-map' - | 'nosources-source-map' - | 'inline-cheap-source-map' - | 'inline-cheap-module-source-map' - | '@eval' - | '@inline-source-map' - | '@cheap-eval-source-map' - | '@cheap-source-map' - | '@cheap-module-eval-source-map' - | '@cheap-module-source-map' - | '@eval-source-map' - | '@source-map' - | '@nosources-source-map' - | '@hidden-source-map' - | '@nosources-source-map' - | '#eval' - | '#inline-source-map' - | '#cheap-eval-source-map' - | '#cheap-source-map' - | '#cheap-module-eval-source-map' - | '#cheap-module-source-map' - | '#eval-source-map' - | '#source-map' - | '#nosources-source-map' - | '#hidden-source-map' - | '#nosources-source-map' - | '#@eval' - | '#@inline-source-map' - | '#@cheap-eval-source-map' - | '#@cheap-source-map' - | '#@cheap-module-eval-source-map' - | '#@cheap-module-source-map' - | '#@eval-source-map' - | '#@source-map' - | '#@nosources-source-map' - | '#@hidden-source-map' - | '#@nosources-source-map' - | boolean - - interface Performance { - /** This property allows webpack to control what files are used to calculate performance hints. */ - assetFilter?(assetFilename: string): boolean - /** - * Turns hints on/off. In addition, tells webpack to throw either an error or a warning when hints are - * found. This property is set to "warning" by default. - */ - hints?: 'warning' | 'error' | false - /** - * An asset is any emitted file from webpack. This option controls when webpack emits a performance hint - * based on individual asset size. The default value is 250000 (bytes). - */ - maxAssetSize?: number - /** - * An entrypoint represents all assets that would be utilized during initial load time for a specific entry. - * This option controls when webpack should emit performance hints based on the maximum entrypoint size. - * The default value is 250000 (bytes). - */ - maxEntrypointSize?: number - } - type Stats = Stats.ToStringOptions - type WatchOptions = ICompiler.WatchOptions - interface CacheGroupsOptions { - /** Assign modules to a cache group */ - test?: ((...args: any[]) => boolean) | string | RegExp - /** Select chunks for determining cache group content (defaults to \"initial\", \"initial\" and \"all\" requires adding these chunks to the HTML) */ - chunks?: - | 'initial' - | 'async' - | 'all' - | ((chunk: compilation.Chunk) => boolean) - /** Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group */ - enforce?: boolean - /** Priority of this cache group */ - priority?: number - /** Minimal size for the created chunk */ - minSize?: number - /** Maximum size for the created chunk */ - maxSize?: number - /** Minimum number of times a module has to be duplicated until it's considered for splitting */ - minChunks?: number - /** Maximum number of requests which are accepted for on-demand loading */ - maxAsyncRequests?: number - /** Maximum number of initial chunks which are accepted for an entry point */ - maxInitialRequests?: number - /** Try to reuse existing chunk (with name) when it has matching modules */ - reuseExistingChunk?: boolean - /** Give chunks created a name (chunks with equal name are merged) */ - name?: boolean | string | ((...args: any[]) => any) - filename?: string - } - interface SplitChunksOptions { - /** Select chunks for determining shared modules (defaults to \"async\", \"initial\" and \"all\" requires adding these chunks to the HTML) */ - chunks?: - | 'initial' - | 'async' - | 'all' - | ((chunk: compilation.Chunk) => boolean) - /** Minimal size for the created chunk */ - minSize?: number - /** Maximum size for the created chunk */ - maxSize?: number - /** Minimum number of times a module has to be duplicated until it's considered for splitting */ - minChunks?: number - /** Maximum number of requests which are accepted for on-demand loading */ - maxAsyncRequests?: number - /** Maximum number of initial chunks which are accepted for an entry point */ - maxInitialRequests?: number - /** Give chunks created a name (chunks with equal name are merged) */ - name?: boolean | string | ((...args: any[]) => any) - /** Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks) */ - cacheGroups?: - | false - | string - | ((...args: any[]) => any) - | RegExp - | { [key: string]: CacheGroupsOptions | false } - /** Override the default name separator (~) when generating names automatically (name: true) */ - automaticNameDelimiter?: string - } - interface RuntimeChunkOptions { - /** The name or name factory for the runtime chunks. */ - name?: string | ((...args: any[]) => any) - } - interface Optimization { - /** - * Modules are removed from chunks when they are already available in all parent chunk groups. - * This reduces asset size. Smaller assets also result in faster builds since less code generation has to be performed. - */ - removeAvailableModules?: boolean - /** Empty chunks are removed. This reduces load in filesystem and results in faster builds. */ - removeEmptyChunks?: boolean - /** Equal chunks are merged. This results in less code generation and faster builds. */ - mergeDuplicateChunks?: boolean - /** Chunks which are subsets of other chunks are determined and flagged in a way that subsets don’t have to be loaded when the bigger chunk has been loaded. */ - flagIncludedChunks?: boolean - /** Give more often used ids smaller (shorter) values. */ - occurrenceOrder?: boolean - /** Determine exports for each module when possible. This information is used by other optimizations or code generation. I. e. to generate more efficient code for export * from. */ - providedExports?: boolean - /** - * Determine used exports for each module. This depends on optimization.providedExports. This information is used by other optimizations or code generation. - * I. e. exports are not generated for unused exports, export names are mangled to single char identifiers when all usages are compatible. - * DCE in minimizers will benefit from this and can remove unused exports. - */ - usedExports?: boolean - /** - * Recognize the sideEffects flag in package.json or rules to eliminate modules. This depends on optimization.providedExports and optimization.usedExports. - * These dependencies have a cost, but eliminating modules has positive impact on performance because of less code generation. It depends on your codebase. - * Try it for possible performance wins. - */ - sideEffects?: boolean - /** Tries to find segments of the module graph which can be safely concatenated into a single module. Depends on optimization.providedExports and optimization.usedExports. */ - concatenateModules?: boolean - /** Finds modules which are shared between chunk and splits them into separate chunks to reduce duplication or separate vendor modules from application modules. */ - splitChunks?: SplitChunksOptions | false - /** Create a separate chunk for the webpack runtime code and chunk hash maps. This chunk should be inlined into the HTML */ - runtimeChunk?: boolean | 'single' | 'multiple' | RuntimeChunkOptions - /** Avoid emitting assets when errors occur. */ - noEmitOnErrors?: boolean - /** Instead of numeric ids, give modules readable names for better debugging. */ - namedModules?: boolean - /** Instead of numeric ids, give chunks readable names for better debugging. */ - namedChunks?: boolean - /** Tells webpack which algorithm to use when choosing module ids. Default false. */ - moduleIds?: - | boolean - | 'natural' - | 'named' - | 'hashed' - | 'size' - | 'total-size' - /** Tells webpack which algorithm to use when choosing chunk ids. Default false. */ - chunkIds?: boolean | 'natural' | 'named' | 'size' | 'total-size' - /** Defines the process.env.NODE_ENV constant to a compile-time-constant value. This allows to remove development only code from code. */ - nodeEnv?: string | false - /** Use the minimizer (optimization.minimizer, by default uglify-js) to minimize output assets. */ - minimize?: boolean - /** Minimizer(s) to use for minimizing the output */ - minimizer?: Array - /** Generate records with relative paths to be able to move the context folder". */ - portableRecords?: boolean - checkWasmTypes?: boolean - } - } - - namespace debug { - interface ProfilingPluginOptions { - /** A relative path to a custom output file (json) */ - outputPath?: string - } - /** - * Generate Chrome profile file which includes timings of plugins execution. Outputs `events.json` file by - * default. It is possible to provide custom file path using `outputPath` option. - * - * In order to view the profile file: - * * Run webpack with ProfilingPlugin. - * * Go to Chrome, open the Profile Tab. - * * Drag and drop generated file (events.json by default) into the profiler. - * - * It will then display timeline stats and calls per plugin! - */ - class ProfilingPlugin extends Plugin { - constructor(options?: ProfilingPluginOptions) - } - } - namespace compilation { - class Asset {} - - class Module {} - - class Record {} - - class Chunk { - constructor(name: string) - id: any - ids: any - debugId: number - name: any - entryModule: any - files: any[] - rendered: boolean - hash: any - renderedHash: any - chunkReason: any - extraAsync: boolean - - hasRuntime(): boolean - canBeInitial(): boolean - isOnlyInitial(): boolean - hasEntryModule(): boolean - - addModule(module: any): boolean - removeModule(module: any): boolean - setModules(modules: any): void - getNumberOfModules(): number - modulesIterable: any[] - - addGroup(chunkGroup: any): boolean - removeGroup(chunkGroup: any): boolean - isInGroup(chunkGroup: any): boolean - getNumberOfGroups(): number - groupsIterable: any[] - - compareTo(otherChunk: any): -1 | 0 | 1 - containsModule(module: any): boolean - getModules(): any[] - getModulesIdent(): any[] - remove(reason: any): void - moveModule(module: any, otherChunk: any): void - integrate(otherChunk: any, reason: any): boolean - split(newChunk: any): void - isEmpty(): boolean - updateHash(hash: any): void - canBeIntegrated(otherChunk: any): boolean - addMultiplierAndOverhead(size: number, options: any): number - modulesSize(): number - size(options: any): number - integratedSize(otherChunk: any, options: any): number - sortModules(sortByFn: Function): void - getAllAsyncChunks(): Set - getChunkMaps(realHash: any): { hash: any; name: any } - getChunkModuleMaps(filterFn: Function): { id: any; hash: any } - hasModuleInGraph(filterFn: Function, filterChunkFn: Function): boolean - toString(): string - } - - class ChunkGroup {} - - class ChunkHash {} - - class Dependency { - constructor() - getResourceIdentifier(): any - getReference(): any - getExports(): any - getWarnings(): any - getErrors(): any - updateHash(hash: any): void - disconnect(): void - static compare(a: any, b: any): any - } - - interface NormalModuleFactoryHooks { - resolver: any - factory: any - beforeResolve: any - afterResolve: any - createModule: any - module: any - createParser: any - parser: any - createGenerator: any - generator: any - } - - class NormalModuleFactory { - hooks: NormalModuleFactoryHooks - } - - interface ContextModuleFactoryHooks { - beforeResolve: any - afterResolve: any - contextModuleFiles: any - alternatives: any - } - - class ContextModuleFactory { - hooks: ContextModuleFactoryHooks - } - - class DllModuleFactory { - hooks: {} - } - - interface CompilationHooks { - buildModule: any - rebuildModule: any - failedModule: any - succeedModule: any - - finishModules: any - finishRebuildingModule: any - - unseal: any - seal: any - - optimizeDependenciesBasic: any - optimizeDependencies: any - optimizeDependenciesAdvanced: any - afterOptimizeDependencies: any - - optimize: any - - optimizeModulesBasic: any - optimizeModules: any - optimizeModulesAdvanced: any - afterOptimizeModules: any - - optimizeChunksBasic: { - tap: ( - name: string, - callback: (chunks: compilation.Chunk[]) => void - ) => void - - tapAsync: ( - name: string, - callback: (chunks: compilation.Chunk[], callback: any) => void - ) => void - } - optimizeChunks: { - tap: ( - name: string, - callback: (chunks: compilation.Chunk[]) => void - ) => void - - tapAsync: ( - name: string, - callback: (chunks: compilation.Chunk[], callback: any) => void - ) => void - } - optimizeChunksAdvanced: any - afterOptimizeChunks: any - - optimizeTree: any - afterOptimizeTree: any - - optimizeChunkModulesBasic: any - optimizeChunkModules: any - optimizeChunkModulesAdvanced: any - afterOptimizeChunkModules: any - shouldRecord: any - - reviveModules: any - optimizeModuleOrder: any - advancedOptimizeModuleOrder: any - beforeModuleIds: any - moduleIds: any - optimizeModuleIds: any - afterOptimizeModuleIds: any - - reviveChunks: any - optimizeChunkOrder: any - beforeChunkIds: any - optimizeChunkIds: any - afterOptimizeChunkIds: any - - recordModules: any - recordChunks: any - - beforeHash: any - afterHash: any - - recordHash: any - - record: any - - beforeModuleAssets: any - shouldGenerateChunkAssets: any - beforeChunkAssets: any - additionalChunkAssets: any - - records: any - - additionalAssets: any - optimizeChunkAssets: any - afterOptimizeChunkAssets: any - optimizeAssets: any - afterOptimizeAssets: any - - needAdditionalSeal: any - afterSeal: any - - chunkHash: any - moduleAsset: any - chunkAsset: any - - assetPath: any - - needAdditionalPass: any - childCompiler: any - - normalModuleLoader: any - - optimizeExtractedChunksBasic: any - optimizeExtractedChunks: any - optimizeExtractedChunksAdvanced: any - afterOptimizeExtractedChunks: any - } - - interface CompilationModule { - module: any - issuer: boolean - build: boolean - dependencies: boolean - } - - class MainTemplate { - hooks: { - jsonpScript?: any - require: any - requireExtensions: any - } - outputOptions: Output - requireFn: string - } - class ChunkTemplate {} - class HotUpdateChunkTemplate {} - class RuntimeTemplate {} - - interface ModuleTemplateHooks { - content: any - module: any - render: any - package: any - hash: any - } - - class ModuleTemplate { - hooks: ModuleTemplateHooks - } - - class Compilation { - hooks: CompilationHooks - compiler: Compiler - - resolverFactory: any - inputFileSystem: any - requestShortener: any - - outputOptions: any - bail: any - profile: any - performance: any - - mainTemplate: MainTemplate - chunkTemplate: ChunkTemplate - hotUpdateChunkTemplate: HotUpdateChunkTemplate - runtimeTemplate: RuntimeTemplate - moduleTemplates: { - javascript: ModuleTemplate - webassembly: ModuleTemplate - } - - isChild(): boolean - context: string - outputPath: string - - entries: any[] - _preparedEntrypoints: any[] - entrypoints: Map - chunks: any[] - chunkGroups: any[] - namedChunkGroups: Map - namedChunks: Map - modules: any[] - _modules: Map - cache: any - records: any - nextFreeModuleIndex: any - nextFreeModuleIndex2: any - additionalChunkAssets: any[] - assets: any - errors: any[] - warnings: any[] - children: any[] - dependencyFactories: Map - dependencyTemplates: Map - childrenCounters: any - usedChunkIds: any - usedModuleIds: any - fileTimestamps: Map - contextTimestamps: Map - fileDependencies: SortableSet - contextDependencies: SortableSet - missingDependencies: SortableSet - hash?: string - getStats(): Stats - addModule(module: CompilationModule, cacheGroup: any): any - addEntry(context: any, entry: any, name: any, callback: Function): void - getPath( - filename: string, - data: { - hash?: any - chunk?: any - filename?: string - basename?: string - query?: any - } - ): string - createChildCompiler( - name: string, - outputOptions: Output, - plugins?: Plugin[] - ): Compiler - /** - * @deprecated Compilation.applyPlugins is deprecated. Use new API on `.hooks` instead - */ - applyPlugins(name: string, ...args: any[]): void - } - - interface CompilerHooks { - shouldEmit: any - done: { - tap: (name: string, callback: (stats: Stats) => void) => void - - tapAsync: ( - name: string, - callback: (stats: Stats, callback: any) => void - ) => void - } - additionalPass: any - beforeRun: any - run: any - emit: { - tap: ( - name: string, - callback: (compilation: Compilation) => void - ) => void - - tapAsync: ( - name: string, - callback: (compilation: Compilation, callback: any) => void - ) => void - } - afterEmit: { - tap: ( - name: string, - callback: (compilation: Compilation) => void - ) => void - - tapAsync: ( - name: string, - callback: (compilation: Compilation, callback: any) => void - ) => void - } - thisCompilation: any - compilation: { - tap: ( - name: string, - callback: (compilation: Compilation, options: any) => void - ) => void - - tapAsync: ( - name: string, - callback: ( - compilation: Compilation, - options: any, - callback: any - ) => void - ) => void - } - normalModuleFactory: any - contextModuleFactory: any - beforeCompile: any - compile: any - make: { - tap: ( - name: string, - callback: (compilation: Compilation) => void - ) => void - - tapAsync: ( - name: string, - callback: (compilation: Compilation, callback: any) => void - ) => void - } - afterCompile: any - watchRun: any - failed: any - invalid: any - watchClose: any - environment: any - afterEnvironment: any - afterPlugins: any - afterResolvers: any - entryOption: any - } - - interface MultiStats { - stats: Stats[] - hash: string - } - - interface MultiCompilerHooks { - done: { - tap: ( - name: string, - callback: (multiStats: MultiStats) => void - ) => void - - tapAsync: ( - name: string, - callback: (multiStats: MultiStats, callback: any) => void - ) => void - } - invalid: any - run: any - watchClose: any - watchRun: any - } - } - interface ICompiler { - run(handler: ICompiler.Handler): void - watch( - watchOptions: ICompiler.WatchOptions, - handler: ICompiler.Handler - ): Watching - } - - namespace ICompiler { - type Handler = (err: Error, stats: Stats) => void - type ChildHandler = ( - err: Error, - entries: any[], - childCompilation: compilation.Compilation - ) => void - - interface WatchOptions { - /** - * Add a delay before rebuilding once the first file changed. This allows webpack to aggregate any other - * changes made during this time period into one rebuild. - * Pass a value in milliseconds. Default: 300. - */ - aggregateTimeout?: number - /** - * For some systems, watching many file systems can result in a lot of CPU or memory usage. - * It is possible to exclude a huge folder like node_modules. - * It is also possible to use anymatch patterns. - */ - ignored?: any - /** Turn on polling by passing true, or specifying a poll interval in milliseconds. */ - poll?: boolean | number - } - } - - interface Watching { - close(callback: () => void): void - invalidate(): void - } - - interface InputFileSystem { - purge?(): void - readFile( - path: string, - callback: (err: Error | undefined | null, contents: Buffer) => void - ): void - readFileSync(path: string): Buffer - readlink( - path: string, - callback: (err: Error | undefined | null, linkString: string) => void - ): void - readlinkSync(path: string): string - stat( - path: string, - callback: (err: Error | undefined | null, stats: any) => void - ): void - statSync(path: string): any - } - - interface OutputFileSystem { - join(...paths: string[]): string - mkdir( - path: string, - callback: (err: Error | undefined | null) => void - ): void - mkdirp( - path: string, - callback: (err: Error | undefined | null) => void - ): void - rmdir( - path: string, - callback: (err: Error | undefined | null) => void - ): void - unlink( - path: string, - callback: (err: Error | undefined | null) => void - ): void - writeFile( - path: string, - data: any, - callback: (err: Error | undefined | null) => void - ): void - } - - interface SortableSet extends Set { - sortWith(sortFn: (a: T, b: T) => number): void - sort(): void - getFromCache(fn: (set: SortableSet) => T[]): T[] - getFromUnorderedCache( - fn: (set: SortableSet) => string | number | T[] - ): any - } - - class Compiler implements ICompiler { - constructor() - - hooks: compilation.CompilerHooks - _pluginCompat: any - - name: string - isChild(): boolean - context: string - outputPath: string - options: Configuration - inputFileSystem: InputFileSystem - outputFileSystem: OutputFileSystem - fileTimestamps: Map - contextTimestamps: Map - run(handler: Compiler.Handler): void - runAsChild(handler: Compiler.ChildHandler): void - watch( - watchOptions: Compiler.WatchOptions, - handler: Compiler.Handler - ): Compiler.Watching - } - - namespace Compiler { - type Handler = ICompiler.Handler - type ChildHandler = ICompiler.ChildHandler - type WatchOptions = ICompiler.WatchOptions - - class Watching implements Watching { - constructor( - compiler: Compiler, - watchOptions: Watching.WatchOptions, - handler: Watching.Handler - ) - - close(callback: () => void): void - invalidate(): void - } - - namespace Watching { - type WatchOptions = ICompiler.WatchOptions - type Handler = ICompiler.Handler - } - } - - abstract class MultiCompiler implements ICompiler { - compilers: Compiler[] - hooks: compilation.MultiCompilerHooks - run(handler: MultiCompiler.Handler): void - watch( - watchOptions: MultiCompiler.WatchOptions, - handler: MultiCompiler.Handler - ): MultiWatching - } - - namespace MultiCompiler { - type Handler = ICompiler.Handler - type WatchOptions = ICompiler.WatchOptions - } - - abstract class MultiWatching implements Watching { - close(callback: () => void): void - invalidate(): void - } - - abstract class ResolvePlugin { - apply(resolver: any /* EnhancedResolve.Resolver */): void - } - - abstract class Stats { - compilation: compilation.Compilation - hash?: string - startTime?: number - endTime?: number - /** Returns true if there were errors while compiling. */ - hasErrors(): boolean - /** Returns true if there were warnings while compiling. */ - hasWarnings(): boolean - /** Returns compilation information as a JSON object. */ - toJson( - options?: Stats.ToJsonOptions, - forToString?: boolean - ): Stats.ToJsonOutput - /** Returns a formatted string of the compilation information (similar to CLI output). */ - toString(options?: Stats.ToStringOptions): string - } - - namespace Stats { - type Preset = - | boolean - | 'errors-only' - | 'errors-warnings' - | 'minimal' - | 'none' - | 'normal' - | 'verbose' - - interface ToJsonOptionsObject { - /** fallback value for stats options when an option is not defined (has precedence over local webpack defaults) */ - all?: boolean - /** Add asset Information */ - assets?: boolean - /** Sort assets by a field */ - assetsSort?: string - /** Add built at time information */ - builtAt?: boolean - /** Add information about cached (not built) modules */ - cached?: boolean - /** Show cached assets (setting this to `false` only shows emitted files) */ - cachedAssets?: boolean - /** Add children information */ - children?: boolean - /** Add built modules information to chunk information */ - chunkModules?: boolean - /** Add the origins of chunks and chunk merging info */ - chunkOrigins?: boolean - /** Add chunk information (setting this to `false` allows for a less verbose output) */ - chunks?: boolean - /** Sort the chunks by a field */ - chunksSort?: string - /** Context directory for request shortening */ - context?: string - /** Display the distance from the entry point for each module */ - depth?: boolean - /** Display the entry points with the corresponding bundles */ - entrypoints?: boolean - /** Add --env information */ - env?: boolean - /** Add errors */ - errors?: boolean - /** Add details to errors (like resolving log) */ - errorDetails?: boolean - /** Exclude assets from being displayed in stats */ - excludeAssets?: StatsExcludeFilter - /** Exclude modules from being displayed in stats */ - excludeModules?: StatsExcludeFilter - /** See excludeModules */ - exclude?: StatsExcludeFilter - /** Add the hash of the compilation */ - hash?: boolean - /** Set the maximum number of modules to be shown */ - maxModules?: number - /** Add built modules information */ - modules?: boolean - /** Sort the modules by a field */ - modulesSort?: string - /** Show dependencies and origin of warnings/errors */ - moduleTrace?: boolean - /** Add public path information */ - publicPath?: boolean - /** Add information about the reasons why modules are included */ - reasons?: boolean - /** Add the source code of modules */ - source?: boolean - /** Add timing information */ - timings?: boolean - /** Add webpack version information */ - version?: boolean - /** Add warnings */ - warnings?: boolean - /** Show which exports of a module are used */ - usedExports?: boolean - /** Filter warnings to be shown */ - warningsFilter?: - | string - | RegExp - | Array - | ((warning: string) => boolean) - /** Show performance hint when file size exceeds `performance.maxAssetSize` */ - performance?: boolean - /** Show the exports of the modules */ - providedExports?: boolean - } - - type ToJsonOptions = Preset | ToJsonOptionsObject - - interface ChunkGroup { - assets: string[] - chunks: number[] - children: Record< - string, - { - assets: string[] - chunks: number[] - name: string - } - > - childAssets: Record - isOverSizeLimit?: boolean - } - - type ReasonType = - | 'amd define' - | 'amd require array' - | 'amd require context' - | 'amd require' - | 'cjs require context' - | 'cjs require' - | 'context element' - | 'delegated exports' - | 'delegated source' - | 'dll entry' - | 'accepted harmony modules' - | 'harmony accept' - | 'harmony export expression' - | 'harmony export header' - | 'harmony export imported specifier' - | 'harmony export specifier' - | 'harmony import specifier' - | 'harmony side effect evaluation' - | 'harmony init' - | 'import() context development' - | 'import() context production' - | 'import() eager' - | 'import() weak' - | 'import()' - | 'json exports' - | 'loader' - | 'module.hot.accept' - | 'module.hot.decline' - | 'multi entry' - | 'null' - | 'prefetch' - | 'require.context' - | 'require.ensure' - | 'require.ensure item' - | 'require.include' - | 'require.resolve' - | 'single entry' - | 'wasm export import' - | 'wasm import' - - interface Reason { - moduleId: number | string | null - moduleIdentifier: string | null - module: string | null - moduleName: string | null - type: ReasonType - explanation?: string - userRequest: string - loc: string - } - - interface FnModules { - assets?: string[] - built: boolean - cacheable: boolean - chunks: number[] - depth?: number - errors: number - failed: boolean - filteredModules?: boolean - id: number | string - identifier: string - index: number - index2: number - issuer: string | undefined - issuerId: number | string | undefined - issuerName: string | undefined - issuerPath: Array<{ - id: number | string - identifier: string - name: string - profile: any // TODO - }> - modules: FnModules[] - name: string - optimizationBailout?: string - optional: boolean - prefetched: boolean - profile: any // TODO - providedExports?: any // TODO - reasons: Reason[] - size: number - source?: string - usedExports?: boolean - warnings: number - } - interface ToJsonOutput { - _showErrors: boolean - _showWarnings: boolean - assets?: Array<{ - chunks: number[] - chunkNames: string[] - emitted: boolean - isOverSizeLimit?: boolean - name: string - size: number - }> - assetsByChunkName?: Record> - builtAt?: number - children?: ToJsonOptions[] & { name?: string } - chunks?: Array<{ - children: number[] - childrenByOrder: Record - entry: boolean - files: string[] - filteredModules?: boolean - hash: string | undefined - id: number - initial: boolean - modules?: FnModules[] - names: string[] - origins?: Array<{ - moduleId: string | number | undefined - module: string - moduleIdentifier: string - moduleName: string - loc: string - request: string - reasons: string[] - }> - parents: number[] - reason: string | undefined - recorded: undefined - rendered: boolean - size: number - siblings: number[] - }> - entrypoints?: Record - errors: string[] - env?: Record - filteredAssets?: number - filteredModules?: boolean - hash?: string - modules?: FnModules[] - namedChunkGroups?: Record - needAdditionalPass?: boolean - outputPath?: string - publicPath?: string - time?: number - version?: string - warnings: string[] - } - - type StatsExcludeFilter = - | string - | string[] - | RegExp - | RegExp[] - | ((assetName: string) => boolean) - | Array<(assetName: string) => boolean> - - interface ToStringOptionsObject extends ToJsonOptionsObject { - /** `webpack --colors` equivalent */ - colors?: boolean | string - } - - type ToStringOptions = Preset | ToStringOptionsObject - } - - /** - * Plugins - */ - - class BannerPlugin extends Plugin { - constructor(options: string | BannerPlugin.Options) - } - - namespace BannerPlugin { - type Filter = string | RegExp - - interface Options { - banner: string - entryOnly?: boolean - exclude?: Filter | Filter[] - include?: Filter | Filter[] - raw?: boolean - test?: Filter | Filter[] - } - } - - class ContextReplacementPlugin extends Plugin { - constructor( - resourceRegExp: any, - newContentResource?: any, - newContentRecursive?: any, - newContentRegExp?: any - ) - } - - class DefinePlugin extends Plugin { - constructor(definitions: { [key: string]: any }) - } - - class DllPlugin extends Plugin { - constructor(options: DllPlugin.Options | DllPlugin.Options[]) - } - - namespace DllPlugin { - interface Options { - /** - * The context of requests in the manifest file. - * - * Defaults to the webpack context. - */ - context?: string - - /** - * The name of the exposed DLL function (keep consistent with `output.library`). - */ - name: string - - /** - * The absolute path to the manifest json file (output). - */ - path: string - } - } - - class DllReferencePlugin extends Plugin { - constructor(options: DllReferencePlugin.Options) - } - - namespace DllReferencePlugin { - interface Options { - /** - * The mappings from the request to module ID. - * - * Defaults to `manifest.content`. - */ - content?: any - - /** - * The context of requests in the manifest (or content property). - * - * This is an absolute path. - */ - context: string - - /** - * An object containing `content` and `name`. - */ - manifest: { content: string; name: string } | string - - /** - * The name where the DLL is exposed. - * - * Defaults to `manifest.name`. - * - * See also `externals`. - */ - name?: string - - /** - * The prefix which is used for accessing the content of the DLL. - */ - scope?: string - - /** - * The type how the DLL is exposed. - * - * Defaults to `"var"`. - * - * See also `externals`. - */ - sourceType?: string - } - } - - class EvalSourceMapDevToolPlugin extends Plugin { - constructor(options?: false | string | EvalSourceMapDevToolPlugin.Options) - } - - namespace EvalSourceMapDevToolPlugin { - interface Options { - append?: false | string - columns?: boolean - lineToLine?: - | boolean - | { - exclude?: Condition | Condition[] - include?: Condition | Condition[] - test?: Condition | Condition[] - } - module?: boolean - moduleFilenameTemplate?: string - sourceRoot?: string - } - } - - class ExtendedAPIPlugin extends Plugin { - constructor() - } - - class HashedModuleIdsPlugin extends Plugin { - constructor(options?: { - hashFunction?: string - hashDigest?: string - hashDigestLength?: number - }) - } - - class HotModuleReplacementPlugin extends Plugin { - constructor(options?: any) - } - - class IgnorePlugin extends Plugin { - constructor(requestRegExp: any, contextRegExp?: any) - } - - class LoaderOptionsPlugin extends Plugin { - constructor(options: any) - } - - /** @deprecated use config.optimization.namedModules */ - class NamedModulesPlugin extends Plugin { - constructor() - } - - class NamedChunksPlugin extends Plugin { - constructor(nameResolver?: (chunk: any) => string | null) - } - - /** @deprecated use config.optimization.noEmitOnErrors */ - class NoEmitOnErrorsPlugin extends Plugin { - constructor() - } - - class NormalModuleReplacementPlugin extends Plugin { - constructor(resourceRegExp: any, newResource: any) - } - - class PrefetchPlugin extends Plugin { - constructor(context: any, request: any) - constructor(request: any) - } - - class ProgressPlugin extends Plugin { - constructor( - options?: ( - percentage: number, - msg: string, - moduleProgress?: string, - activeModules?: string, - moduleName?: string - ) => void - ) - } - - class EnvironmentPlugin extends Plugin { - constructor(envs: string[] | { [key: string]: any }) - } - - class ProvidePlugin extends Plugin { - constructor(definitions: { [key: string]: any }) - } - - class SplitChunksPlugin extends Plugin { - constructor(options?: Options.SplitChunksOptions) - } - - class SourceMapDevToolPlugin extends Plugin { - constructor( - options?: null | false | string | SourceMapDevToolPlugin.Options - ) - } - - namespace SourceMapDevToolPlugin { - /** @todo extend EvalSourceMapDevToolPlugin.Options */ - interface Options { - append?: false | string - columns?: boolean - exclude?: Condition | Condition[] - fallbackModuleFilenameTemplate?: string - filename?: null | false | string - include?: Condition | Condition[] - lineToLine?: - | boolean - | { - exclude?: Condition | Condition[] - include?: Condition | Condition[] - test?: Condition | Condition[] - } - module?: boolean - moduleFilenameTemplate?: string - noSources?: boolean - publicPath?: string - sourceRoot?: null | string - test?: Condition | Condition[] - } - } - - class WatchIgnorePlugin extends Plugin { - constructor(paths: Array) - } - - class SingleEntryPlugin extends Plugin { - constructor(context: string, entry: string, name: string) - } - - namespace optimize { - /** @deprecated use config.optimization.concatenateModules */ - class ModuleConcatenationPlugin extends Plugin {} - class AggressiveMergingPlugin extends Plugin { - constructor(options?: AggressiveMergingPlugin.Options) - } - - namespace AggressiveMergingPlugin { - interface Options { - /** - * When options.moveToParents is set, moving to an entry chunk is more expensive. - * Defaults to 10, which means moving to an entry chunk is ten times more expensive than moving to a - * normal chunk. - */ - entryChunkMultiplicator?: number - /** - * A factor which defines the minimum required size reduction for chunk merging. - * Defaults to 1.5 which means that the total size needs to be reduced by 50% for chunk merging. - */ - minSizeReduce?: number - /** - * When set, modules that are not in both merged chunks are moved to all parents of the chunk. - * Defaults to false. - */ - moveToParents?: boolean - } - } - - class AggressiveSplittingPlugin extends Plugin { - constructor(options?: AggressiveSplittingPlugin.Options) - } - - namespace AggressiveSplittingPlugin { - interface Options { - /** - * Size in byte. - * Only chunks bigger than the specified minSize are stored in records. - * This ensures the chunks fill up as your application grows, - * instead of creating too many chunks for every change. - * - * Default: 30720 - */ - minSize: 30000 - /** - * Size in byte. - * maximum size preferred for each chunk. - * - * Default: 51200 - */ - maxSize: 50000 - chunkOverhead: 0 - entryChunkMultiplicator: 1 - } - } - - /** @deprecated */ - class DedupePlugin extends Plugin { - constructor() - } - - class LimitChunkCountPlugin extends Plugin { - constructor(options: any) - } - - class MinChunkSizePlugin extends Plugin { - constructor(options: any) - } - - class OccurrenceOrderPlugin extends Plugin { - constructor(preferEntry: boolean) - } - - class UglifyJsPlugin extends Plugin { - constructor(options?: any) - } - - namespace UglifyJsPlugin { - type CommentFilter = (astNode: any, comment: any) => boolean - - interface Options { - beautify?: boolean - comments?: boolean | RegExp | CommentFilter - exclude?: Condition | Condition[] - include?: Condition | Condition[] - /** Parallelization can speedup your build significantly and is therefore highly recommended. */ - parallel?: boolean | { cache: boolean; workers: boolean | number } - sourceMap?: boolean - test?: Condition | Condition[] - } - } - } - - namespace dependencies {} - - namespace loader { - interface Loader extends Function { - ( - this: LoaderContext, - source: string | Buffer, - sourceMap?: RawSourceMap - ): string | Buffer | void | undefined - - /** - * The order of chained loaders are always called from right to left. - * But, in some cases, loaders do not care about the results of the previous loader or the resource. - * They only care for metadata. The pitch method on the loaders is called from left to right before the loaders are called (from right to left). - * If a loader delivers a result in the pitch method the process turns around and skips the remaining loaders, - * continuing with the calls to the more left loaders. data can be passed between pitch and normal call. - */ - pitch?( - remainingRequest: string, - precedingRequest: string, - data: any - ): any - - /** - * By default, the resource file is treated as utf-8 string and passed as String to the loader. - * By setting raw to true the loader is passed the raw Buffer. - * Every loader is allowed to deliver its result as String or as Buffer. - * The compiler converts them between loaders. - */ - raw?: boolean - } - - type loaderCallback = ( - err: Error | undefined | null, - content?: string | Buffer, - sourceMap?: RawSourceMap - ) => void - - interface LoaderContext { - /** - * Loader API version. Currently 2. - * This is useful for providing backwards compatibility. - * Using the version you can specify custom logic or fallbacks for breaking changes. - */ - version: string - - /** - * The directory of the module. Can be used as context for resolving other stuff. - * In the example: /abc because resource.js is in this directory - */ - context: string - - /** - * Starting with webpack 4, the formerly `this.options.context` is provided as `this.rootContext`. - */ - rootContext: string - - /** - * The resolved request string. - * In the example: "/abc/loader1.js?xyz!/abc/node_modules/loader2/index.js!/abc/resource.js?rrr" - */ - request: string - - /** - * A string or any object. The query of the request for the current loader. - */ - query: any - - /** - * A data object shared between the pitch and the normal phase. - */ - data?: any - - callback: loaderCallback - - /** - * Make this loader async. - */ - async(): loaderCallback | undefined - - /** - * Make this loader result cacheable. By default it's not cacheable. - * A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed. - * This means the loader shouldn't have other dependencies than specified with this.addDependency. - * Most loaders are deterministic and cacheable. - */ - cacheable(flag?: boolean): void - - /** - * An array of all the loaders. It is writeable in the pitch phase. - * loaders = [{request: string, path: string, query: string, module: function}] - * - * In the example: - * [ - * { request: "/abc/loader1.js?xyz", - * path: "/abc/loader1.js", - * query: "?xyz", - * module: [Function] - * }, - * { request: "/abc/node_modules/loader2/index.js", - * path: "/abc/node_modules/loader2/index.js", - * query: "", - * module: [Function] - * } - * ] - */ - loaders: any[] - - /** - * The index in the loaders array of the current loader. - * In the example: in loader1: 0, in loader2: 1 - */ - loaderIndex: number - - /** - * The resource part of the request, including query. - * In the example: "/abc/resource.js?rrr" - */ - resource: string - - /** - * The resource file. - * In the example: "/abc/resource.js" - */ - resourcePath: string - - /** - * The query of the resource. - * In the example: "?rrr" - */ - resourceQuery: string - - /** - * Emit a warning. - */ - emitWarning(message: string | Error): void - - /** - * Emit a error. - */ - emitError(message: string | Error): void - - /** - * Execute some code fragment like a module. - * - * Don't use require(this.resourcePath), use this function to make loaders chainable! - * - */ - exec(code: string, filename: string): any - - /** - * Resolves the given request to a module, applies all configured loaders and calls - * back with the generated source, the sourceMap and the module instance (usually an - * instance of NormalModule). Use this function if you need to know the source code - * of another module to generate the result. - */ - loadModule( - request: string, - callback: ( - err: Error | null, - source: string, - sourceMap: RawSourceMap, - module: Module - ) => void - ): any - - /** - * Resolve a request like a require expression. - */ - resolve( - context: string, - request: string, - callback: (err: Error, result: string) => void - ): any - - /** - * Resolve a request like a require expression. - */ - resolveSync(context: string, request: string): string - - /** - * Adds a file as dependency of the loader result in order to make them watchable. - * For example, html-loader uses this technique as it finds src and src-set attributes. - * Then, it sets the url's for those attributes as dependencies of the html file that is parsed. - */ - addDependency(file: string): void - - /** - * Adds a file as dependency of the loader result in order to make them watchable. - * For example, html-loader uses this technique as it finds src and src-set attributes. - * Then, it sets the url's for those attributes as dependencies of the html file that is parsed. - */ - dependency(file: string): void - - /** - * Add a directory as dependency of the loader result. - */ - addContextDependency(directory: string): void - - /** - * Remove all dependencies of the loader result. Even initial dependencies and these of other loaders. Consider using pitch. - */ - clearDependencies(): void - - /** - * Pass values to the next loader. - * If you know what your result exports if executed as module, set this value here (as a only element array). - */ - value: any - - /** - * Passed from the last loader. - * If you would execute the input argument as module, consider reading this variable for a shortcut (for performance). - */ - inputValue: any - - /** - * A boolean flag. It is set when in debug mode. - */ - debug: boolean - - /** - * Should the result be minimized. - */ - minimize: boolean - - /** - * Should a SourceMap be generated. - */ - sourceMap: boolean - - /** - * Target of compilation. Passed from configuration options. - * Example values: "web", "node" - */ - target: - | 'web' - | 'webworker' - | 'async-node' - | 'node' - | 'electron-main' - | 'electron-renderer' - | 'node-webkit' - | string - - /** - * This boolean is set to true when this is compiled by webpack. - * - * Loaders were originally designed to also work as Babel transforms. - * Therefore if you write a loader that works for both, you can use this property to know if - * there is access to additional loaderContext and webpack features. - */ - webpack: boolean - - /** - * Emit a file. This is webpack-specific. - */ - emitFile(name: string, content: Buffer | string, sourceMap: any): void - - /** - * Access to the compilation's inputFileSystem property. - */ - fs: any - - /** - * Which mode is webpack running. - */ - mode: 'production' | 'development' | 'none' - - /** - * Hacky access to the Compilation object of webpack. - */ - _compilation: any - - /** - * Hacky access to the Compiler object of webpack. - */ - _compiler: Compiler - - /** - * Hacky access to the Module object being loaded. - */ - _module: any - - /** Flag if HMR is enabled */ - hot: boolean - } - } - - namespace Template { - function getFunctionContent(fn: (...args: any[]) => any): string - - function toIdentifier(str: string): string - - function toComment(str: string): string - - function toNormalComment(str: string): string - - function toPath(str: string): string - - function numberToIdentifer(n: number): string - - function indent(s: string | string[]): string - - function prefix(s: string | string[], prefixToAdd: string): string - - function asString(str: string | string[]): string - - function getModulesArrayBounds( - modules: ReadonlyArray<{ - id: string | number - }> - ): [number, number] | false - - function renderChunkModules( - chunk: compilation.Chunk, - filterFn: (module: compilation.Module, num: number) => boolean, - moduleTemplate: compilation.ModuleTemplate, - dependencyTemplates: any, - prefixToAdd?: string - ): ConcatSource - } - - /** @deprecated */ - namespace compiler { - /** @deprecated use webpack.Compiler */ - type Compiler = webpack.Compiler - - /** @deprecated use webpack.Compiler.Watching */ - type Watching = Compiler.Watching - - /** @deprecated use webpack.Compiler.WatchOptions */ - - type WatchOptions = Compiler.WatchOptions - - /** @deprecated use webpack.Stats */ - type Stats = webpack.Stats - - /** @deprecated use webpack.Stats.ToJsonOptions */ - type StatsOptions = Stats.ToJsonOptions - - /** @deprecated use webpack.Stats.ToStringOptions */ - type StatsToStringOptions = Stats.ToStringOptions - - /** @deprecated use webpack.Compiler.Handler */ - type CompilerCallback = Compiler.Handler - } - } + ResolvePluginInstance, + } from 'webpack' + export { default as webpack } from 'webpack' } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 930f08d9ec13ad1..51bd7f91bd02f6d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -163,7 +163,7 @@ importers: turbo: 1.3.2-canary.1 typescript: 4.6.3 wait-port: 0.2.2 - webpack: link:packages/next/node_modules/webpack5 + webpack: 5.74.0 webpack-bundle-analyzer: 4.3.0 devDependencies: '@babel/core': 7.18.0 @@ -317,7 +317,7 @@ importers: turbo: 1.3.2-canary.1 typescript: 4.6.3 wait-port: 0.2.2 - webpack: link:packages/next/node_modules/webpack5 + webpack: 5.74.0_@swc+core@1.2.203 webpack-bundle-analyzer: 4.3.0 packages/create-next-app: @@ -576,10 +576,9 @@ importers: vm-browserify: 1.1.2 watchpack: 2.4.0 web-vitals: 3.0.0-beta.2 + webpack: 5.74.0 webpack-sources1: npm:webpack-sources@1.4.3 webpack-sources3: npm:webpack-sources@3.2.3 - webpack4: npm:webpack@4.44.1 - webpack5: npm:webpack@5.74.0 ws: 8.2.3 dependencies: '@next/env': link:../next-env @@ -711,7 +710,7 @@ importers: lodash.curry: 4.1.1 lru-cache: 5.1.1 micromatch: 4.0.4 - mini-css-extract-plugin: 2.4.3 + mini-css-extract-plugin: 2.4.3_webpack@5.74.0 nanoid: 3.1.32 native-url: 0.3.4 neo-async: 2.6.1 @@ -737,9 +736,9 @@ importers: raw-body: 2.4.1 react-is: 17.0.2 react-refresh: 0.12.0 - react-server-dom-webpack: 0.0.0-experimental-d2c9e834a-20220601 + react-server-dom-webpack: 0.0.0-experimental-d2c9e834a-20220601_webpack@5.74.0 regenerator-runtime: 0.13.4 - sass-loader: 12.4.0 + sass-loader: 12.4.0_webpack@5.74.0 schema-utils2: /schema-utils/2.7.1 schema-utils3: /schema-utils/3.0.0 semver: 7.3.2 @@ -764,10 +763,9 @@ importers: vm-browserify: 1.1.2 watchpack: 2.4.0 web-vitals: 3.0.0-beta.2 + webpack: 5.74.0 webpack-sources1: /webpack-sources/1.4.3 webpack-sources3: /webpack-sources/3.2.3 - webpack4: /webpack/4.44.1 - webpack5: /webpack/5.74.0 ws: 8.2.3 packages/next-bundle-analyzer: @@ -6254,54 +6252,18 @@ packages: '@webassemblyjs/helper-wasm-bytecode': 1.11.1 dev: true - /@webassemblyjs/ast/1.9.0: - resolution: {integrity: sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==} - dependencies: - '@webassemblyjs/helper-module-context': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/wast-parser': 1.9.0 - dev: true - /@webassemblyjs/floating-point-hex-parser/1.11.1: resolution: {integrity: sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==} dev: true - /@webassemblyjs/floating-point-hex-parser/1.9.0: - resolution: {integrity: sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==} - dev: true - /@webassemblyjs/helper-api-error/1.11.1: resolution: {integrity: sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==} dev: true - /@webassemblyjs/helper-api-error/1.9.0: - resolution: {integrity: sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==} - dev: true - /@webassemblyjs/helper-buffer/1.11.1: resolution: {integrity: sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==} dev: true - /@webassemblyjs/helper-buffer/1.9.0: - resolution: {integrity: sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==} - dev: true - - /@webassemblyjs/helper-code-frame/1.9.0: - resolution: {integrity: sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==} - dependencies: - '@webassemblyjs/wast-printer': 1.9.0 - dev: true - - /@webassemblyjs/helper-fsm/1.9.0: - resolution: {integrity: sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==} - dev: true - - /@webassemblyjs/helper-module-context/1.9.0: - resolution: {integrity: sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - dev: true - /@webassemblyjs/helper-numbers/1.11.1: resolution: {integrity: sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==} dependencies: @@ -6314,10 +6276,6 @@ packages: resolution: {integrity: sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==} dev: true - /@webassemblyjs/helper-wasm-bytecode/1.9.0: - resolution: {integrity: sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==} - dev: true - /@webassemblyjs/helper-wasm-section/1.11.1: resolution: {integrity: sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==} dependencies: @@ -6327,47 +6285,22 @@ packages: '@webassemblyjs/wasm-gen': 1.11.1 dev: true - /@webassemblyjs/helper-wasm-section/1.9.0: - resolution: {integrity: sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - dev: true - /@webassemblyjs/ieee754/1.11.1: resolution: {integrity: sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==} dependencies: '@xtuc/ieee754': 1.2.0 dev: true - /@webassemblyjs/ieee754/1.9.0: - resolution: {integrity: sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==} - dependencies: - '@xtuc/ieee754': 1.2.0 - dev: true - /@webassemblyjs/leb128/1.11.1: resolution: {integrity: sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==} dependencies: '@xtuc/long': 4.2.2 dev: true - /@webassemblyjs/leb128/1.9.0: - resolution: {integrity: sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==} - dependencies: - '@xtuc/long': 4.2.2 - dev: true - /@webassemblyjs/utf8/1.11.1: resolution: {integrity: sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==} dev: true - /@webassemblyjs/utf8/1.9.0: - resolution: {integrity: sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==} - dev: true - /@webassemblyjs/wasm-edit/1.11.1: resolution: {integrity: sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==} dependencies: @@ -6381,19 +6314,6 @@ packages: '@webassemblyjs/wast-printer': 1.11.1 dev: true - /@webassemblyjs/wasm-edit/1.9.0: - resolution: {integrity: sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/helper-wasm-section': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - '@webassemblyjs/wasm-opt': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - '@webassemblyjs/wast-printer': 1.9.0 - dev: true - /@webassemblyjs/wasm-gen/1.11.1: resolution: {integrity: sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==} dependencies: @@ -6404,16 +6324,6 @@ packages: '@webassemblyjs/utf8': 1.11.1 dev: true - /@webassemblyjs/wasm-gen/1.9.0: - resolution: {integrity: sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/ieee754': 1.9.0 - '@webassemblyjs/leb128': 1.9.0 - '@webassemblyjs/utf8': 1.9.0 - dev: true - /@webassemblyjs/wasm-opt/1.11.1: resolution: {integrity: sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==} dependencies: @@ -6423,15 +6333,6 @@ packages: '@webassemblyjs/wasm-parser': 1.11.1 dev: true - /@webassemblyjs/wasm-opt/1.9.0: - resolution: {integrity: sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - dev: true - /@webassemblyjs/wasm-parser/1.11.1: resolution: {integrity: sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==} dependencies: @@ -6443,28 +6344,6 @@ packages: '@webassemblyjs/utf8': 1.11.1 dev: true - /@webassemblyjs/wasm-parser/1.9.0: - resolution: {integrity: sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-api-error': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/ieee754': 1.9.0 - '@webassemblyjs/leb128': 1.9.0 - '@webassemblyjs/utf8': 1.9.0 - dev: true - - /@webassemblyjs/wast-parser/1.9.0: - resolution: {integrity: sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/floating-point-hex-parser': 1.9.0 - '@webassemblyjs/helper-api-error': 1.9.0 - '@webassemblyjs/helper-code-frame': 1.9.0 - '@webassemblyjs/helper-fsm': 1.9.0 - '@xtuc/long': 4.2.2 - dev: true - /@webassemblyjs/wast-printer/1.11.1: resolution: {integrity: sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==} dependencies: @@ -6472,14 +6351,6 @@ packages: '@xtuc/long': 4.2.2 dev: true - /@webassemblyjs/wast-printer/1.9.0: - resolution: {integrity: sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/wast-parser': 1.9.0 - '@xtuc/long': 4.2.2 - dev: true - /@xtuc/ieee754/1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} dev: true @@ -6655,14 +6526,6 @@ packages: indent-string: 4.0.0 dev: true - /ajv-errors/1.0.1_ajv@6.12.6: - resolution: {integrity: sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==} - peerDependencies: - ajv: '>=5.0.0' - dependencies: - ajv: 6.12.6 - dev: true - /ajv-keywords/3.5.2_ajv@6.12.6: resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} peerDependencies: @@ -6819,17 +6682,6 @@ packages: normalize-path: 2.1.1 dev: true - /anymatch/2.0.0: - resolution: {integrity: sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==} - requiresBuild: true - dependencies: - micromatch: 3.1.10 - normalize-path: 2.1.1 - transitivePeerDependencies: - - supports-color - dev: true - optional: true - /anymatch/3.1.1: resolution: {integrity: sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==} engines: {node: '>= 8'} @@ -7035,13 +6887,6 @@ packages: engines: {node: '>=0.8'} dev: true - /assert/1.5.0: - resolution: {integrity: sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==} - dependencies: - object-assign: 4.1.1 - util: 0.10.3 - dev: true - /assert/2.0.0: resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} dependencies: @@ -7686,14 +7531,6 @@ packages: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} dev: true - /buffer/4.9.2: - resolution: {integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - isarray: 1.0.0 - dev: true - /buffer/5.6.0: resolution: {integrity: sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==} dependencies: @@ -7761,26 +7598,6 @@ packages: engines: {node: '>= 0.8'} dev: true - /cacache/12.0.3: - resolution: {integrity: sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==} - dependencies: - bluebird: 3.7.2 - chownr: 1.1.3 - figgy-pudding: 3.5.1 - glob: 7.2.0 - graceful-fs: 4.2.9 - infer-owner: 1.0.4 - lru-cache: 5.1.1 - mississippi: 3.0.0 - mkdirp: 0.5.5 - move-concurrently: 1.0.1 - promise-inflight: 1.0.1 - rimraf: 2.7.1 - ssri: 6.0.1 - unique-filename: 1.1.1 - y18n: 4.0.0 - dev: true - /cacache/15.0.5: resolution: {integrity: sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==} engines: {node: '>= 10'} @@ -8189,29 +8006,6 @@ packages: - supports-color dev: true - /chokidar/2.1.8: - resolution: {integrity: sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==} - deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies - requiresBuild: true - dependencies: - anymatch: 2.0.0 - async-each: 1.0.3 - braces: 2.3.2 - glob-parent: 3.1.0 - inherits: 2.0.4 - is-binary-path: 1.0.1 - is-glob: 4.0.3 - normalize-path: 3.0.0 - path-is-absolute: 1.0.1 - readdirp: 2.2.1 - upath: 1.2.0 - optionalDependencies: - fsevents: 1.2.11 - transitivePeerDependencies: - - supports-color - dev: true - optional: true - /chokidar/3.4.3: resolution: {integrity: sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==} engines: {node: '>= 8.10.0'} @@ -8625,10 +8419,6 @@ packages: xdg-basedir: 4.0.0 dev: true - /console-browserify/1.2.0: - resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} - dev: true - /console-control-strings/1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: true @@ -8785,17 +8575,6 @@ packages: resolution: {integrity: sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==} dev: true - /copy-concurrently/1.0.5: - resolution: {integrity: sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==} - dependencies: - aproba: 1.2.0 - fs-write-stream-atomic: 1.0.10 - iferr: 0.1.5 - mkdirp: 0.5.5 - rimraf: 2.7.1 - run-queue: 1.0.3 - dev: true - /copy-descriptor/0.1.1: resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==} engines: {node: '>=0.10.0'} @@ -9353,10 +9132,6 @@ packages: find-pkg: 0.1.2 dev: true - /cyclist/1.0.1: - resolution: {integrity: sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==} - dev: true - /d/1.0.1: resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} dependencies: @@ -9816,11 +9591,6 @@ packages: resolution: {integrity: sha512-g6RpyWXzl0RR6OTElHKBl7nwnK87GUyZMYC7JWsB/IA73vpqK2K6LT39x4VepLxlSsWBFrPVLnsSR5Jyty0+2Q==} dev: true - /domain-browser/1.2.0: - resolution: {integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==} - engines: {node: '>=0.4', npm: '>=1.2'} - dev: true - /domain-browser/4.19.0: resolution: {integrity: sha512-fRA+BaAWOR/yr/t7T9E9GJztHPeFjj8U35ajyAjCDtAAnTn1Rc1f6W6VGPJrO1tkQv9zWu+JRof7z6oQtiYVFQ==} engines: {node: '>=10'} @@ -9958,15 +9728,6 @@ packages: resolution: {integrity: sha512-CEj8FwwNA4cVH2uFCoHUrmojhYh1vmCdOaneKJXwkeY1i9jnlslVo9dx+hQ5Hl9GnH/Bwy/IjxAyOePyPKYnzA==} dev: true - /duplexify/3.7.1: - resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==} - dependencies: - end-of-stream: 1.4.4 - inherits: 2.0.4 - readable-stream: 2.3.7 - stream-shift: 1.0.1 - dev: true - /ecc-jsbn/0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} dependencies: @@ -10068,15 +9829,6 @@ packages: dependencies: once: 1.4.0 - /enhanced-resolve/4.3.0: - resolution: {integrity: sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==} - engines: {node: '>=6.9.0'} - dependencies: - graceful-fs: 4.2.9 - memory-fs: 0.5.0 - tapable: 1.1.3 - dev: true - /enhanced-resolve/5.10.0: resolution: {integrity: sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==} engines: {node: '>=10.13.0'} @@ -10117,13 +9869,6 @@ packages: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} dev: true - /errno/0.1.7: - resolution: {integrity: sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==} - hasBin: true - dependencies: - prr: 1.0.1 - dev: true - /error-ex/1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: @@ -10500,14 +10245,6 @@ packages: string.prototype.matchall: 4.0.6 dev: false - /eslint-scope/4.0.3: - resolution: {integrity: sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==} - engines: {node: '>=4.0.0'} - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: true - /eslint-scope/5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -11180,6 +10917,7 @@ packages: commondir: 1.0.1 make-dir: 2.1.0 pkg-dir: 3.0.0 + dev: false /find-cache-dir/3.3.1: resolution: {integrity: sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==} @@ -11303,13 +11041,6 @@ packages: engines: {node: '>=0.4.0'} dev: false - /flush-write-stream/1.1.1: - resolution: {integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==} - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: true - /fn-annotate/1.2.0: resolution: {integrity: sha1-KNoAARfephhC/mHzU/Qc9Mk6en4=} engines: {node: '>=0.10.0'} @@ -11411,13 +11142,6 @@ packages: resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} dev: true - /from2/2.3.0: - resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: true - /fs-exists-sync/0.1.0: resolution: {integrity: sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==} engines: {node: '>=0.10.0'} @@ -11473,15 +11197,6 @@ packages: minipass: 3.1.3 dev: true - /fs-write-stream-atomic/1.0.10: - resolution: {integrity: sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==} - dependencies: - graceful-fs: 4.2.9 - iferr: 0.1.5 - imurmurhash: 0.1.4 - readable-stream: 2.3.7 - dev: true - /fs.realpath/1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -12558,10 +12273,6 @@ packages: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true - /iferr/0.1.5: - resolution: {integrity: sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA==} - dev: true - /ignore-loader/0.1.2: resolution: {integrity: sha1-2B8kA3bQuk8Nd4lyw60lh0EXpGM=} dev: true @@ -12687,10 +12398,6 @@ packages: once: 1.4.0 wrappy: 1.0.2 - /inherits/2.0.1: - resolution: {integrity: sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==} - dev: true - /inherits/2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} dev: true @@ -14688,11 +14395,6 @@ packages: resolve-from: 5.0.0 dev: true - /loader-runner/2.4.0: - resolution: {integrity: sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==} - engines: {node: '>=4.3.0 <5.0.0 || >=5.10'} - dev: true - /loader-runner/4.2.0: resolution: {integrity: sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==} engines: {node: '>=6.11.5'} @@ -15232,21 +14934,6 @@ packages: engines: {node: '>= 0.6'} dev: true - /memory-fs/0.4.1: - resolution: {integrity: sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==} - dependencies: - errno: 0.1.7 - readable-stream: 2.3.7 - dev: true - - /memory-fs/0.5.0: - resolution: {integrity: sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==} - engines: {node: '>=4.3.0 <5.0.0 || >=5.10'} - dependencies: - errno: 0.1.7 - readable-stream: 2.3.7 - dev: true - /memorystream/0.3.1: resolution: {integrity: sha1-htcJCzDORV1j+64S3aUaR93K+bI=} engines: {node: '>= 0.10.0'} @@ -15556,13 +15243,14 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} - /mini-css-extract-plugin/2.4.3: + /mini-css-extract-plugin/2.4.3_webpack@5.74.0: resolution: {integrity: sha512-zekavl9mZuGyk7COjsfFY/f655AX61EKE0AthXPrmDk+oZyjZ9WzO4WPjXnnO9xl8obK2kmM6rAQrBEmk+WK1g==} engines: {node: '>= 12.13.0'} peerDependencies: webpack: ^5.0.0 dependencies: schema-utils: 3.1.1 + webpack: 5.74.0 dev: true /minimalistic-assert/1.0.1: @@ -15676,22 +15364,6 @@ packages: yallist: 4.0.0 dev: true - /mississippi/3.0.0: - resolution: {integrity: sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==} - engines: {node: '>=4.0.0'} - dependencies: - concat-stream: 1.6.2 - duplexify: 3.7.1 - end-of-stream: 1.4.4 - flush-write-stream: 1.1.1 - from2: 2.3.0 - parallel-transform: 1.2.0 - pump: 3.0.0 - pumpify: 1.5.1 - stream-each: 1.2.3 - through2: 2.0.5 - dev: true - /mixin-deep/1.3.2: resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} engines: {node: '>=0.10.0'} @@ -15740,17 +15412,6 @@ packages: resolution: {integrity: sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==} dev: true - /move-concurrently/1.0.1: - resolution: {integrity: sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ==} - dependencies: - aproba: 1.2.0 - copy-concurrently: 1.0.5 - fs-write-stream-atomic: 1.0.10 - mkdirp: 0.5.5 - rimraf: 2.7.1 - run-queue: 1.0.3 - dev: true - /mri/1.1.0: resolution: {integrity: sha512-NbJtWIE2QEVbr9xQHXBY92fxX0Tu8EsS9NBwz7Qn3zoeuvcbP3LzBJw3EUJDpfb9IY8qnZvFSWIepeEFQga28w==} engines: {node: '>=4'} @@ -16020,34 +15681,6 @@ packages: resolution: {integrity: sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=} dev: true - /node-libs-browser/2.2.1: - resolution: {integrity: sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==} - dependencies: - assert: 1.5.0 - browserify-zlib: 0.2.0 - buffer: 4.9.2 - console-browserify: 1.2.0 - constants-browserify: 1.0.0 - crypto-browserify: 3.12.0 - domain-browser: 1.2.0 - events: 3.3.0 - https-browserify: 1.0.0 - os-browserify: 0.3.0 - path-browserify: 0.0.1 - process: 0.11.10 - punycode: 1.4.1 - querystring-es3: 0.2.1 - readable-stream: 2.3.7 - stream-browserify: 2.0.2 - stream-http: 2.8.3 - string_decoder: 1.3.0 - timers-browserify: 2.0.12 - tty-browserify: 0.0.0 - url: 0.11.0 - util: 0.11.1 - vm-browserify: 1.1.2 - dev: true - /node-notifier/8.0.1: resolution: {integrity: sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA==} dependencies: @@ -16785,14 +16418,6 @@ packages: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} dev: true - /parallel-transform/1.2.0: - resolution: {integrity: sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==} - dependencies: - cyclist: 1.0.1 - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: true - /param-case/2.1.1: resolution: {integrity: sha1-35T9jPZTHs915r75oIWPvHK+Ikc=} dependencies: @@ -16983,10 +16608,6 @@ packages: engines: {node: '>=0.10.0'} requiresBuild: true - /path-browserify/0.0.1: - resolution: {integrity: sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==} - dev: true - /path-browserify/1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} dev: true @@ -17175,6 +16796,7 @@ packages: engines: {node: '>=6'} dependencies: find-up: 3.0.0 + dev: false /pkg-dir/4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} @@ -18330,10 +17952,6 @@ packages: ipaddr.js: 1.9.0 dev: true - /prr/1.0.1: - resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - dev: true - /pseudomap/1.0.2: resolution: {integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM=} @@ -18372,35 +17990,12 @@ packages: once: 1.4.0 dev: true - /pump/2.0.1: - resolution: {integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==} - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - dev: true - /pump/3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: end-of-stream: 1.4.4 once: 1.4.0 - /pumpify/1.5.1: - resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==} - dependencies: - duplexify: 3.7.1 - inherits: 2.0.4 - pump: 2.0.1 - dev: true - - /punycode/1.3.2: - resolution: {integrity: sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==} - dev: true - - /punycode/1.4.1: - resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} - dev: true - /punycode/2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} @@ -18594,7 +18189,7 @@ packages: engines: {node: '>=0.10.0'} dev: true - /react-server-dom-webpack/0.0.0-experimental-d2c9e834a-20220601: + /react-server-dom-webpack/0.0.0-experimental-d2c9e834a-20220601_webpack@5.74.0: resolution: {integrity: sha512-HBWH9fhTJwbX7x3K9kuZ1gHXMN6CCdN0uH1N7jqBqPf8/uLDjNYN/ZKVNqb8augZax6HJDfv5VHVcKr0qr7ZbQ==} engines: {node: '>=0.10.0'} peerDependencies: @@ -18604,6 +18199,7 @@ packages: acorn: 6.4.2 loose-envify: 1.4.0 neo-async: 2.6.2 + webpack: 5.74.0 dev: true /react-ssr-prepass/1.0.8_qncsgtzehe3fgiqp6tr7lwq6fm: @@ -19542,12 +19138,6 @@ packages: /run-parallel/1.1.9: resolution: {integrity: sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==} - /run-queue/1.0.3: - resolution: {integrity: sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg==} - dependencies: - aproba: 1.2.0 - dev: true - /rxjs/5.5.12: resolution: {integrity: sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==} engines: {npm: '>=2.0.0'} @@ -19594,7 +19184,7 @@ packages: /safer-buffer/2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - /sass-loader/12.4.0: + /sass-loader/12.4.0_webpack@5.74.0: resolution: {integrity: sha512-7xN+8khDIzym1oL9XyS6zP6Ges+Bo2B2xbPrjdMHEYyV3AQYhd/wXeru++3ODHF0zMjYmVadblSKrPrjEkL8mg==} engines: {node: '>= 12.13.0'} peerDependencies: @@ -19612,6 +19202,7 @@ packages: dependencies: klona: 2.0.4 neo-async: 2.6.2 + webpack: 5.74.0 dev: true /sass/1.54.0: @@ -19654,15 +19245,6 @@ packages: loose-envify: 1.4.0 dev: true - /schema-utils/1.0.0: - resolution: {integrity: sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==} - engines: {node: '>= 4'} - dependencies: - ajv: 6.12.6 - ajv-errors: 1.0.1_ajv@6.12.6 - ajv-keywords: 3.5.2_ajv@6.12.6 - dev: true - /schema-utils/2.7.1: resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} engines: {node: '>= 8.9.0'} @@ -19784,12 +19366,6 @@ packages: upper-case-first: 2.0.2 dev: true - /serialize-javascript/3.1.0: - resolution: {integrity: sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==} - dependencies: - randombytes: 2.1.0 - dev: true - /serialize-javascript/4.0.0: resolution: {integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==} dependencies: @@ -20193,12 +19769,6 @@ packages: tweetnacl: 0.14.5 dev: true - /ssri/6.0.1: - resolution: {integrity: sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==} - dependencies: - figgy-pudding: 3.5.1 - dev: true - /ssri/8.0.1: resolution: {integrity: sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==} engines: {node: '>= 8'} @@ -20241,13 +19811,6 @@ packages: engines: {node: '>= 0.6'} dev: true - /stream-browserify/2.0.2: - resolution: {integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==} - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: true - /stream-browserify/3.0.0: resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} dependencies: @@ -20268,23 +19831,6 @@ packages: through: 2.3.8 dev: true - /stream-each/1.2.3: - resolution: {integrity: sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==} - dependencies: - end-of-stream: 1.4.4 - stream-shift: 1.0.1 - dev: true - - /stream-http/2.8.3: - resolution: {integrity: sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==} - dependencies: - builtin-status-codes: 3.0.0 - inherits: 2.0.4 - readable-stream: 2.3.7 - to-arraybuffer: 1.0.1 - xtend: 4.0.2 - dev: true - /stream-http/3.1.1: resolution: {integrity: sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==} dependencies: @@ -20302,10 +19848,6 @@ packages: - supports-color dev: true - /stream-shift/1.0.1: - resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} - dev: true - /streamsearch/0.1.2: resolution: {integrity: sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=} engines: {node: '>=0.8.0'} @@ -20738,11 +20280,6 @@ packages: reduce-css-calc: 2.1.7 dev: true - /tapable/1.1.3: - resolution: {integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==} - engines: {node: '>=6'} - dev: true - /tapable/2.2.0: resolution: {integrity: sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==} engines: {node: '>=6'} @@ -20835,21 +20372,30 @@ packages: supports-hyperlinks: 2.1.0 dev: true - /terser-webpack-plugin/1.4.4: - resolution: {integrity: sha512-U4mACBHIegmfoEe5fdongHESNJWqsGU+W0S/9+BmYGVQDw1+c2Ow05TpMhxjPK1sRb7cuYq1BPl1e5YHJMTCqA==} - engines: {node: '>= 6.9.0'} + /terser-webpack-plugin/5.2.4_bhtm7a3ixzishl2uxypy6qnuwu: + resolution: {integrity: sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==} + engines: {node: '>= 10.13.0'} peerDependencies: - webpack: ^4.0.0 + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true dependencies: - cacache: 12.0.3 - find-cache-dir: 2.1.0 - is-wsl: 1.1.0 - schema-utils: 1.0.0 - serialize-javascript: 3.1.0 + '@swc/core': 1.2.203 + jest-worker: 27.0.6 + p-limit: 3.1.0 + schema-utils: 3.1.1 + serialize-javascript: 6.0.0 source-map: 0.6.1 - terser: 4.8.0 - webpack-sources: 1.4.3 - worker-farm: 1.7.0 + terser: 5.14.1 + webpack: 5.74.0_@swc+core@1.2.203 dev: true /terser-webpack-plugin/5.2.4_webpack@5.74.0: @@ -20877,17 +20423,6 @@ packages: webpack: 5.74.0 dev: true - /terser/4.8.0: - resolution: {integrity: sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - acorn: 8.8.0 - commander: 2.20.3 - source-map: 0.6.1 - source-map-support: 0.5.20 - dev: true - /terser/5.10.0: resolution: {integrity: sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==} engines: {node: '>=10'} @@ -21040,10 +20575,6 @@ packages: resolution: {integrity: sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=} dev: true - /to-arraybuffer/1.0.1: - resolution: {integrity: sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==} - dev: true - /to-fast-properties/2.0.0: resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} engines: {node: '>=4'} @@ -21224,10 +20755,6 @@ packages: tslib: 1.11.1 typescript: 4.6.3 - /tty-browserify/0.0.0: - resolution: {integrity: sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==} - dev: true - /tty-browserify/0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} dev: true @@ -21814,13 +21341,6 @@ packages: has-value: 0.3.1 isobject: 3.0.1 - /upath/1.2.0: - resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} - engines: {node: '>=4'} - requiresBuild: true - dev: true - optional: true - /upath/2.0.1: resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} engines: {node: '>=4'} @@ -21914,13 +21434,6 @@ packages: engines: {node: '>= 4'} dev: true - /url/0.11.0: - resolution: {integrity: sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==} - dependencies: - punycode: 1.3.2 - querystring: 0.2.0 - dev: true - /use-sync-external-store/1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: @@ -21949,18 +21462,6 @@ packages: object.getownpropertydescriptors: 2.1.0 dev: true - /util/0.10.3: - resolution: {integrity: sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==} - dependencies: - inherits: 2.0.1 - dev: true - - /util/0.11.1: - resolution: {integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==} - dependencies: - inherits: 2.0.3 - dev: true - /util/0.12.4: resolution: {integrity: sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==} dependencies: @@ -22144,29 +21645,6 @@ packages: makeerror: 1.0.11 dev: true - /watchpack-chokidar2/2.0.0: - resolution: {integrity: sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA==} - engines: {node: <8.10.0} - requiresBuild: true - dependencies: - chokidar: 2.1.8 - transitivePeerDependencies: - - supports-color - dev: true - optional: true - - /watchpack/1.7.4: - resolution: {integrity: sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==} - dependencies: - graceful-fs: 4.2.9 - neo-async: 2.6.2 - optionalDependencies: - chokidar: 3.4.3 - watchpack-chokidar2: 2.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /watchpack/2.4.0: resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} engines: {node: '>=10.13.0'} @@ -22237,47 +21715,47 @@ packages: engines: {node: '>=10.13.0'} dev: true - /webpack/4.44.1: - resolution: {integrity: sha512-4UOGAohv/VGUNQJstzEywwNxqX417FnjZgZJpJQegddzPmTvph37eBIRbRTfdySXzVtJXLJfbMN3mMYhM6GdmQ==} - engines: {node: '>=6.11.5'} + /webpack/5.74.0: + resolution: {integrity: sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==} + engines: {node: '>=10.13.0'} hasBin: true peerDependencies: webpack-cli: '*' - webpack-command: '*' peerDependenciesMeta: webpack-cli: optional: true - webpack-command: - optional: true dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-module-context': 1.9.0 - '@webassemblyjs/wasm-edit': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - acorn: 6.4.2 - ajv: 6.12.6 - ajv-keywords: 3.5.2_ajv@6.12.6 + '@types/eslint-scope': 3.7.3 + '@types/estree': 0.0.51 + '@webassemblyjs/ast': 1.11.1 + '@webassemblyjs/wasm-edit': 1.11.1 + '@webassemblyjs/wasm-parser': 1.11.1 + acorn: 8.8.0 + acorn-import-assertions: 1.7.6_acorn@8.8.0 + browserslist: 4.20.2 chrome-trace-event: 1.0.2 - enhanced-resolve: 4.3.0 - eslint-scope: 4.0.3 - json-parse-better-errors: 1.0.2 - loader-runner: 2.4.0 - loader-utils: 1.4.0 - memory-fs: 0.4.1 - micromatch: 3.1.10 - mkdirp: 0.5.5 + enhanced-resolve: 5.10.0 + es-module-lexer: 0.9.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.9 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.2.0 + mime-types: 2.1.30 neo-async: 2.6.2 - node-libs-browser: 2.2.1 - schema-utils: 1.0.0 - tapable: 1.1.3 - terser-webpack-plugin: 1.4.4 - watchpack: 1.7.4 - webpack-sources: 1.4.3 + schema-utils: 3.1.1 + tapable: 2.2.0 + terser-webpack-plugin: 5.2.4_webpack@5.74.0 + watchpack: 2.4.0 + webpack-sources: 3.2.3 transitivePeerDependencies: - - supports-color + - '@swc/core' + - esbuild + - uglify-js dev: true - /webpack/5.74.0: + /webpack/5.74.0_@swc+core@1.2.203: resolution: {integrity: sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==} engines: {node: '>=10.13.0'} hasBin: true @@ -22308,7 +21786,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.0 - terser-webpack-plugin: 5.2.4_webpack@5.74.0 + terser-webpack-plugin: 5.2.4_bhtm7a3ixzishl2uxypy6qnuwu watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -22433,12 +21911,6 @@ packages: resolution: {integrity: sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=} dev: true - /worker-farm/1.7.0: - resolution: {integrity: sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==} - dependencies: - errno: 0.1.7 - dev: true - /wrap-ansi/3.0.1: resolution: {integrity: sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=} engines: {node: '>=4'} diff --git a/scripts/check-pre-compiled.sh b/scripts/check-pre-compiled.sh index f6a5c634f2bd2d8..69274b90e0d7556 100755 --- a/scripts/check-pre-compiled.sh +++ b/scripts/check-pre-compiled.sh @@ -4,10 +4,10 @@ set -e cd packages/next -cp node_modules/webpack5/lib/hmr/HotModuleReplacement.runtime.js bundles/webpack/packages/ -cp node_modules/webpack5/lib/hmr/JavascriptHotModuleReplacement.runtime.js bundles/webpack/packages/ -cp node_modules/webpack5/hot/lazy-compilation-node.js bundles/webpack/packages/ -cp node_modules/webpack5/hot/lazy-compilation-web.js bundles/webpack/packages/ +cp node_modules/webpack/lib/hmr/HotModuleReplacement.runtime.js bundles/webpack/packages/ +cp node_modules/webpack/lib/hmr/JavascriptHotModuleReplacement.runtime.js bundles/webpack/packages/ +cp node_modules/webpack/hot/lazy-compilation-node.js bundles/webpack/packages/ +cp node_modules/webpack/hot/lazy-compilation-web.js bundles/webpack/packages/ pnpm run ncc-compiled