Initial boiler plate project
This commit is contained in:
43
node_modules/next/dist/esm/build/webpack/config/blocks/base.js
generated
vendored
Normal file
43
node_modules/next/dist/esm/build/webpack/config/blocks/base.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
import curry from "next/dist/compiled/lodash.curry";
|
||||
import { COMPILER_NAMES } from "../../../../shared/lib/constants";
|
||||
export const base = curry(function base(ctx, config) {
|
||||
config.mode = ctx.isDevelopment ? "development" : "production";
|
||||
config.name = ctx.isServer ? ctx.isEdgeRuntime ? COMPILER_NAMES.edgeServer : COMPILER_NAMES.server : COMPILER_NAMES.client;
|
||||
config.target = !ctx.targetWeb ? "node18.17" // Same version defined in packages/next/package.json#engines
|
||||
: ctx.isEdgeRuntime ? [
|
||||
"web",
|
||||
"es6"
|
||||
] : [
|
||||
"web",
|
||||
"es5"
|
||||
];
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
if (ctx.isDevelopment) {
|
||||
if (process.env.__NEXT_TEST_MODE && !process.env.__NEXT_TEST_WITH_DEVTOOL) {
|
||||
config.devtool = false;
|
||||
} else {
|
||||
// `eval-source-map` provides full-fidelity source maps for the
|
||||
// original source, including columns and original variable names.
|
||||
// This is desirable so the in-browser debugger can correctly pause
|
||||
// and show scoped variables with their original names.
|
||||
config.devtool = "eval-source-map";
|
||||
}
|
||||
} else {
|
||||
if (ctx.isEdgeRuntime || ctx.isServer && ctx.serverSourceMaps || // Enable browser sourcemaps:
|
||||
ctx.productionBrowserSourceMaps && ctx.isClient) {
|
||||
config.devtool = "source-map";
|
||||
} else {
|
||||
config.devtool = false;
|
||||
}
|
||||
}
|
||||
if (!config.module) {
|
||||
config.module = {
|
||||
rules: []
|
||||
};
|
||||
}
|
||||
// TODO: add codemod for "Should not import the named export" with JSON files
|
||||
// config.module.strictExportPresence = !isWebpack5
|
||||
return config;
|
||||
});
|
||||
|
||||
//# sourceMappingURL=base.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/base.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/base.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/build/webpack/config/blocks/base.ts"],"names":["curry","COMPILER_NAMES","base","ctx","config","mode","isDevelopment","name","isServer","isEdgeRuntime","edgeServer","server","client","target","targetWeb","process","env","__NEXT_TEST_MODE","__NEXT_TEST_WITH_DEVTOOL","devtool","serverSourceMaps","productionBrowserSourceMaps","isClient","module","rules"],"mappings":"AAAA,OAAOA,WAAW,kCAAiC;AAEnD,SAASC,cAAc,QAAQ,mCAAkC;AAGjE,OAAO,MAAMC,OAAOF,MAAM,SAASE,KACjCC,GAAyB,EACzBC,MAA6B;IAE7BA,OAAOC,IAAI,GAAGF,IAAIG,aAAa,GAAG,gBAAgB;IAClDF,OAAOG,IAAI,GAAGJ,IAAIK,QAAQ,GACtBL,IAAIM,aAAa,GACfR,eAAeS,UAAU,GACzBT,eAAeU,MAAM,GACvBV,eAAeW,MAAM;IAEzBR,OAAOS,MAAM,GAAG,CAACV,IAAIW,SAAS,GAC1B,YAAY,6DAA6D;OACzEX,IAAIM,aAAa,GACjB;QAAC;QAAO;KAAM,GACd;QAAC;QAAO;KAAM;IAElB,4DAA4D;IAC5D,IAAIN,IAAIG,aAAa,EAAE;QACrB,IAAIS,QAAQC,GAAG,CAACC,gBAAgB,IAAI,CAACF,QAAQC,GAAG,CAACE,wBAAwB,EAAE;YACzEd,OAAOe,OAAO,GAAG;QACnB,OAAO;YACL,+DAA+D;YAC/D,kEAAkE;YAClE,mEAAmE;YACnE,uDAAuD;YACvDf,OAAOe,OAAO,GAAG;QACnB;IACF,OAAO;QACL,IACEhB,IAAIM,aAAa,IAChBN,IAAIK,QAAQ,IAAIL,IAAIiB,gBAAgB,IACrC,6BAA6B;QAC5BjB,IAAIkB,2BAA2B,IAAIlB,IAAImB,QAAQ,EAChD;YACAlB,OAAOe,OAAO,GAAG;QACnB,OAAO;YACLf,OAAOe,OAAO,GAAG;QACnB;IACF;IAEA,IAAI,CAACf,OAAOmB,MAAM,EAAE;QAClBnB,OAAOmB,MAAM,GAAG;YAAEC,OAAO,EAAE;QAAC;IAC9B;IAEA,6EAA6E;IAC7E,mDAAmD;IAEnD,OAAOpB;AACT,GAAE"}
|
||||
538
node_modules/next/dist/esm/build/webpack/config/blocks/css/index.js
generated
vendored
Normal file
538
node_modules/next/dist/esm/build/webpack/config/blocks/css/index.js
generated
vendored
Normal file
@ -0,0 +1,538 @@
|
||||
import curry from "next/dist/compiled/lodash.curry";
|
||||
import { loader, plugin } from "../../helpers";
|
||||
import { pipe } from "../../utils";
|
||||
import { getCssModuleLoader, getGlobalCssLoader } from "./loaders";
|
||||
import { getNextFontLoader } from "./loaders/next-font";
|
||||
import { getCustomDocumentError, getGlobalImportError, getGlobalModuleImportError, getLocalModuleImportError } from "./messages";
|
||||
import { getPostCssPlugins } from "./plugins";
|
||||
import { nonNullable } from "../../../../../lib/non-nullable";
|
||||
import { WEBPACK_LAYERS } from "../../../../../lib/constants";
|
||||
// RegExps for all Style Sheet variants
|
||||
export const regexLikeCss = /\.(css|scss|sass)$/;
|
||||
// RegExps for Style Sheets
|
||||
const regexCssGlobal = /(?<!\.module)\.css$/;
|
||||
const regexCssModules = /\.module\.css$/;
|
||||
// RegExps for Syntactically Awesome Style Sheets
|
||||
const regexSassGlobal = /(?<!\.module)\.(scss|sass)$/;
|
||||
const regexSassModules = /\.module\.(scss|sass)$/;
|
||||
const APP_LAYER_RULE = {
|
||||
or: [
|
||||
WEBPACK_LAYERS.reactServerComponents,
|
||||
WEBPACK_LAYERS.serverSideRendering,
|
||||
WEBPACK_LAYERS.appPagesBrowser
|
||||
]
|
||||
};
|
||||
const PAGES_LAYER_RULE = {
|
||||
not: [
|
||||
WEBPACK_LAYERS.reactServerComponents,
|
||||
WEBPACK_LAYERS.serverSideRendering,
|
||||
WEBPACK_LAYERS.appPagesBrowser
|
||||
]
|
||||
};
|
||||
/**
|
||||
* Mark a rule as removable if built-in CSS support is disabled
|
||||
*/ function markRemovable(r) {
|
||||
Object.defineProperty(r, Symbol.for("__next_css_remove"), {
|
||||
enumerable: false,
|
||||
value: true
|
||||
});
|
||||
return r;
|
||||
}
|
||||
let postcssInstancePromise;
|
||||
export async function lazyPostCSS(rootDirectory, supportedBrowsers, disablePostcssPresetEnv) {
|
||||
if (!postcssInstancePromise) {
|
||||
postcssInstancePromise = (async ()=>{
|
||||
const postcss = require("postcss");
|
||||
// @ts-ignore backwards compat
|
||||
postcss.plugin = function postcssPlugin(name, initializer) {
|
||||
function creator(...args) {
|
||||
let transformer = initializer(...args);
|
||||
transformer.postcssPlugin = name;
|
||||
// transformer.postcssVersion = new Processor().version
|
||||
return transformer;
|
||||
}
|
||||
let cache;
|
||||
Object.defineProperty(creator, "postcss", {
|
||||
get () {
|
||||
if (!cache) cache = creator();
|
||||
return cache;
|
||||
}
|
||||
});
|
||||
creator.process = function(css, processOpts, pluginOpts) {
|
||||
return postcss([
|
||||
creator(pluginOpts)
|
||||
]).process(css, processOpts);
|
||||
};
|
||||
return creator;
|
||||
};
|
||||
// @ts-ignore backwards compat
|
||||
postcss.vendor = {
|
||||
/**
|
||||
* Returns the vendor prefix extracted from an input string.
|
||||
*
|
||||
* @example
|
||||
* postcss.vendor.prefix('-moz-tab-size') //=> '-moz-'
|
||||
* postcss.vendor.prefix('tab-size') //=> ''
|
||||
*/ prefix: function prefix(prop) {
|
||||
const match = prop.match(/^(-\w+-)/);
|
||||
if (match) {
|
||||
return match[0];
|
||||
}
|
||||
return "";
|
||||
},
|
||||
/**
|
||||
* Returns the input string stripped of its vendor prefix.
|
||||
*
|
||||
* @example
|
||||
* postcss.vendor.unprefixed('-moz-tab-size') //=> 'tab-size'
|
||||
*/ unprefixed: function unprefixed(/**
|
||||
* String with or without vendor prefix.
|
||||
*/ prop) {
|
||||
return prop.replace(/^-\w+-/, "");
|
||||
}
|
||||
};
|
||||
const postCssPlugins = await getPostCssPlugins(rootDirectory, supportedBrowsers, disablePostcssPresetEnv);
|
||||
return {
|
||||
postcss,
|
||||
postcssWithPlugins: postcss(postCssPlugins)
|
||||
};
|
||||
})();
|
||||
}
|
||||
return postcssInstancePromise;
|
||||
}
|
||||
export const css = curry(async function css(ctx, config) {
|
||||
const { prependData: sassPrependData, additionalData: sassAdditionalData, ...sassOptions } = ctx.sassOptions;
|
||||
const lazyPostCSSInitializer = ()=>lazyPostCSS(ctx.rootDirectory, ctx.supportedBrowsers, ctx.experimental.disablePostcssPresetEnv);
|
||||
const sassPreprocessors = [
|
||||
// First, process files with `sass-loader`: this inlines content, and
|
||||
// compiles away the proprietary syntax.
|
||||
{
|
||||
loader: require.resolve("next/dist/compiled/sass-loader"),
|
||||
options: {
|
||||
// Source maps are required so that `resolve-url-loader` can locate
|
||||
// files original to their source directory.
|
||||
sourceMap: true,
|
||||
sassOptions: {
|
||||
// The "fibers" option is not needed for Node.js 16+, but it's causing
|
||||
// problems for Node.js <= 14 users as you'll have to manually install
|
||||
// the `fibers` package:
|
||||
// https://github.com/webpack-contrib/sass-loader#:~:text=We%20automatically%20inject%20the%20fibers%20package
|
||||
// https://github.com/vercel/next.js/issues/45052
|
||||
// Since it's optional and not required, we'll disable it by default
|
||||
// to avoid the confusion.
|
||||
fibers: false,
|
||||
...sassOptions
|
||||
},
|
||||
additionalData: sassPrependData || sassAdditionalData
|
||||
}
|
||||
},
|
||||
// Then, `sass-loader` will have passed-through CSS imports as-is instead
|
||||
// of inlining them. Because they were inlined, the paths are no longer
|
||||
// correct.
|
||||
// To fix this, we use `resolve-url-loader` to rewrite the CSS
|
||||
// imports to real file paths.
|
||||
{
|
||||
loader: require.resolve("../../../loaders/resolve-url-loader/index"),
|
||||
options: {
|
||||
postcss: lazyPostCSSInitializer,
|
||||
// Source maps are not required here, but we may as well emit
|
||||
// them.
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
];
|
||||
const fns = [];
|
||||
const googleLoader = require.resolve("next/dist/compiled/@next/font/google/loader");
|
||||
const localLoader = require.resolve("next/dist/compiled/@next/font/local/loader");
|
||||
const nextFontLoaders = [
|
||||
[
|
||||
require.resolve("next/font/google/target.css"),
|
||||
googleLoader
|
||||
],
|
||||
[
|
||||
require.resolve("next/font/local/target.css"),
|
||||
localLoader
|
||||
],
|
||||
// TODO: remove this in the next major version
|
||||
[
|
||||
/node_modules[\\/]@next[\\/]font[\\/]google[\\/]target.css/,
|
||||
googleLoader
|
||||
],
|
||||
[
|
||||
/node_modules[\\/]@next[\\/]font[\\/]local[\\/]target.css/,
|
||||
localLoader
|
||||
]
|
||||
];
|
||||
nextFontLoaders.forEach(([fontLoaderTarget, fontLoaderPath])=>{
|
||||
// Matches the resolved font loaders noop files to run next-font-loader
|
||||
fns.push(loader({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
sideEffects: false,
|
||||
test: fontLoaderTarget,
|
||||
use: getNextFontLoader(ctx, lazyPostCSSInitializer, fontLoaderPath)
|
||||
})
|
||||
]
|
||||
}));
|
||||
});
|
||||
// CSS cannot be imported in _document. This comes before everything because
|
||||
// global CSS nor CSS modules work in said file.
|
||||
fns.push(loader({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
test: regexLikeCss,
|
||||
// Use a loose regex so we don't have to crawl the file system to
|
||||
// find the real file name (if present).
|
||||
issuer: /pages[\\/]_document\./,
|
||||
use: {
|
||||
loader: "error-loader",
|
||||
options: {
|
||||
reason: getCustomDocumentError()
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}));
|
||||
const shouldIncludeExternalCSSImports = !!ctx.experimental.craCompat || !!ctx.transpilePackages;
|
||||
// CSS modules & SASS modules support. They are allowed to be imported in anywhere.
|
||||
fns.push(// CSS Modules should never have side effects. This setting will
|
||||
// allow unused CSS to be removed from the production build.
|
||||
// We ensure this by disallowing `:global()` CSS at the top-level
|
||||
// via the `pure` mode in `css-loader`.
|
||||
loader({
|
||||
oneOf: [
|
||||
// For app dir, we need to match the specific app layer.
|
||||
ctx.hasAppDir ? markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexCssModules,
|
||||
issuerLayer: APP_LAYER_RULE,
|
||||
use: [
|
||||
{
|
||||
loader: require.resolve("../../../loaders/next-flight-css-loader"),
|
||||
options: {
|
||||
cssModules: true
|
||||
}
|
||||
},
|
||||
...getCssModuleLoader({
|
||||
...ctx,
|
||||
isAppDir: true
|
||||
}, lazyPostCSSInitializer)
|
||||
]
|
||||
}) : null,
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexCssModules,
|
||||
issuerLayer: PAGES_LAYER_RULE,
|
||||
use: getCssModuleLoader({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer)
|
||||
})
|
||||
].filter(nonNullable)
|
||||
}), // Opt-in support for Sass (using .scss or .sass extensions).
|
||||
// Sass Modules should never have side effects. This setting will
|
||||
// allow unused Sass to be removed from the production build.
|
||||
// We ensure this by disallowing `:global()` Sass at the top-level
|
||||
// via the `pure` mode in `css-loader`.
|
||||
loader({
|
||||
oneOf: [
|
||||
// For app dir, we need to match the specific app layer.
|
||||
ctx.hasAppDir ? markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexSassModules,
|
||||
issuerLayer: APP_LAYER_RULE,
|
||||
use: [
|
||||
{
|
||||
loader: require.resolve("../../../loaders/next-flight-css-loader"),
|
||||
options: {
|
||||
cssModules: true
|
||||
}
|
||||
},
|
||||
...getCssModuleLoader({
|
||||
...ctx,
|
||||
isAppDir: true
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
]
|
||||
}) : null,
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexSassModules,
|
||||
issuerLayer: PAGES_LAYER_RULE,
|
||||
use: getCssModuleLoader({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
})
|
||||
].filter(nonNullable)
|
||||
}), // Throw an error for CSS Modules used outside their supported scope
|
||||
loader({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
test: [
|
||||
regexCssModules,
|
||||
regexSassModules
|
||||
],
|
||||
use: {
|
||||
loader: "error-loader",
|
||||
options: {
|
||||
reason: getLocalModuleImportError()
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}));
|
||||
// Global CSS and SASS support.
|
||||
if (ctx.isServer) {
|
||||
fns.push(loader({
|
||||
oneOf: [
|
||||
ctx.hasAppDir && !ctx.isProduction ? markRemovable({
|
||||
sideEffects: true,
|
||||
test: [
|
||||
regexCssGlobal,
|
||||
regexSassGlobal
|
||||
],
|
||||
issuerLayer: APP_LAYER_RULE,
|
||||
use: {
|
||||
loader: require.resolve("../../../loaders/next-flight-css-loader"),
|
||||
options: {
|
||||
cssModules: false
|
||||
}
|
||||
}
|
||||
}) : null,
|
||||
markRemovable({
|
||||
// CSS imports have side effects, even on the server side.
|
||||
sideEffects: true,
|
||||
test: [
|
||||
regexCssGlobal,
|
||||
regexSassGlobal
|
||||
],
|
||||
use: require.resolve("next/dist/compiled/ignore-loader")
|
||||
})
|
||||
].filter(nonNullable)
|
||||
}));
|
||||
} else {
|
||||
// External CSS files are allowed to be loaded when any of the following is true:
|
||||
// - hasAppDir: all CSS files are allowed
|
||||
// - If the CSS file is located in `node_modules`
|
||||
// - If the CSS file is located in another package in a monorepo (outside of the current rootDir)
|
||||
// - If the issuer is pages/_app (matched later)
|
||||
const allowedPagesGlobalCSSPath = ctx.hasAppDir ? undefined : {
|
||||
and: [
|
||||
{
|
||||
or: [
|
||||
/node_modules/,
|
||||
{
|
||||
not: [
|
||||
ctx.rootDirectory
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
const allowedPagesGlobalCSSIssuer = ctx.hasAppDir ? undefined : shouldIncludeExternalCSSImports ? undefined : {
|
||||
and: [
|
||||
ctx.rootDirectory
|
||||
],
|
||||
not: [
|
||||
/node_modules/
|
||||
]
|
||||
};
|
||||
fns.push(loader({
|
||||
oneOf: [
|
||||
...ctx.hasAppDir ? [
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexCssGlobal,
|
||||
issuerLayer: APP_LAYER_RULE,
|
||||
use: [
|
||||
{
|
||||
loader: require.resolve("../../../loaders/next-flight-css-loader"),
|
||||
options: {
|
||||
cssModules: false
|
||||
}
|
||||
},
|
||||
...getGlobalCssLoader({
|
||||
...ctx,
|
||||
isAppDir: true
|
||||
}, lazyPostCSSInitializer)
|
||||
]
|
||||
}),
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexSassGlobal,
|
||||
issuerLayer: APP_LAYER_RULE,
|
||||
use: [
|
||||
{
|
||||
loader: require.resolve("../../../loaders/next-flight-css-loader"),
|
||||
options: {
|
||||
cssModules: false
|
||||
}
|
||||
},
|
||||
...getGlobalCssLoader({
|
||||
...ctx,
|
||||
isAppDir: true
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
]
|
||||
})
|
||||
] : [],
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexCssGlobal,
|
||||
include: allowedPagesGlobalCSSPath,
|
||||
issuer: allowedPagesGlobalCSSIssuer,
|
||||
issuerLayer: PAGES_LAYER_RULE,
|
||||
use: getGlobalCssLoader({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer)
|
||||
}),
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexSassGlobal,
|
||||
include: allowedPagesGlobalCSSPath,
|
||||
issuer: allowedPagesGlobalCSSIssuer,
|
||||
issuerLayer: PAGES_LAYER_RULE,
|
||||
use: getGlobalCssLoader({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
})
|
||||
].filter(nonNullable)
|
||||
}));
|
||||
if (ctx.customAppFile) {
|
||||
fns.push(loader({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexCssGlobal,
|
||||
issuer: {
|
||||
and: [
|
||||
ctx.customAppFile
|
||||
]
|
||||
},
|
||||
use: getGlobalCssLoader({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer)
|
||||
})
|
||||
]
|
||||
}), loader({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexSassGlobal,
|
||||
issuer: {
|
||||
and: [
|
||||
ctx.customAppFile
|
||||
]
|
||||
},
|
||||
use: getGlobalCssLoader({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
})
|
||||
]
|
||||
}));
|
||||
}
|
||||
}
|
||||
// Throw an error for Global CSS used inside of `node_modules`
|
||||
if (!shouldIncludeExternalCSSImports) {
|
||||
fns.push(loader({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
test: [
|
||||
regexCssGlobal,
|
||||
regexSassGlobal
|
||||
],
|
||||
issuer: {
|
||||
and: [
|
||||
/node_modules/
|
||||
]
|
||||
},
|
||||
use: {
|
||||
loader: "error-loader",
|
||||
options: {
|
||||
reason: getGlobalModuleImportError()
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}));
|
||||
}
|
||||
// Throw an error for Global CSS used outside of our custom <App> file
|
||||
fns.push(loader({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
test: [
|
||||
regexCssGlobal,
|
||||
regexSassGlobal
|
||||
],
|
||||
issuer: ctx.hasAppDir ? {
|
||||
// If it's inside the app dir, but not importing from a layout file,
|
||||
// throw an error.
|
||||
and: [
|
||||
ctx.rootDirectory
|
||||
],
|
||||
not: [
|
||||
/layout\.(js|mjs|jsx|ts|tsx)$/
|
||||
]
|
||||
} : undefined,
|
||||
use: {
|
||||
loader: "error-loader",
|
||||
options: {
|
||||
reason: getGlobalImportError()
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}));
|
||||
if (ctx.isClient) {
|
||||
// Automatically transform references to files (i.e. url()) into URLs
|
||||
// e.g. url(./logo.svg)
|
||||
fns.push(loader({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
// This should only be applied to CSS files
|
||||
issuer: regexLikeCss,
|
||||
// Exclude extensions that webpack handles by default
|
||||
exclude: [
|
||||
/\.(js|mjs|jsx|ts|tsx)$/,
|
||||
/\.html$/,
|
||||
/\.json$/,
|
||||
/\.webpack\[[^\]]+\]$/
|
||||
],
|
||||
// `asset/resource` always emits a URL reference, where `asset`
|
||||
// might inline the asset as a data URI
|
||||
type: "asset/resource"
|
||||
})
|
||||
]
|
||||
}));
|
||||
}
|
||||
// Enable full mini-css-extract-plugin hmr for prod mode pages or app dir
|
||||
if (ctx.isClient && (ctx.isProduction || ctx.hasAppDir)) {
|
||||
// Extract CSS as CSS file(s) in the client-side production bundle.
|
||||
const MiniCssExtractPlugin = require("../../../plugins/mini-css-extract-plugin").default;
|
||||
fns.push(plugin(// @ts-ignore webpack 5 compat
|
||||
new MiniCssExtractPlugin({
|
||||
filename: ctx.isProduction ? "static/css/[contenthash].css" : "static/css/[name].css",
|
||||
chunkFilename: ctx.isProduction ? "static/css/[contenthash].css" : "static/css/[name].css",
|
||||
// Next.js guarantees that CSS order "doesn't matter", due to imposed
|
||||
// restrictions:
|
||||
// 1. Global CSS can only be defined in a single entrypoint (_app)
|
||||
// 2. CSS Modules generate scoped class names by default and cannot
|
||||
// include Global CSS (:global() selector).
|
||||
//
|
||||
// While not a perfect guarantee (e.g. liberal use of `:global()`
|
||||
// selector), this assumption is required to code-split CSS.
|
||||
//
|
||||
// If this warning were to trigger, it'd be unactionable by the user,
|
||||
// but likely not valid -- so we disable it.
|
||||
ignoreOrder: true
|
||||
})));
|
||||
}
|
||||
const fn = pipe(...fns);
|
||||
return fn(config);
|
||||
});
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
37
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/client.js
generated
vendored
Normal file
37
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/client.js
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
export function getClientStyleLoader({ hasAppDir, isAppDir, isDevelopment, assetPrefix }) {
|
||||
const shouldEnableApp = typeof isAppDir === "boolean" ? isAppDir : hasAppDir;
|
||||
// Keep next-style-loader for development mode in `pages/`
|
||||
if (isDevelopment && !shouldEnableApp) {
|
||||
return {
|
||||
loader: "next-style-loader",
|
||||
options: {
|
||||
insert: function(element) {
|
||||
// By default, style-loader injects CSS into the bottom
|
||||
// of <head>. This causes ordering problems between dev
|
||||
// and prod. To fix this, we render a <noscript> tag as
|
||||
// an anchor for the styles to be placed before. These
|
||||
// styles will be applied _before_ <style jsx global>.
|
||||
// These elements should always exist. If they do not,
|
||||
// this code should fail.
|
||||
var anchorElement = document.querySelector("#__next_css__DO_NOT_USE__");
|
||||
var parentNode = anchorElement.parentNode// Normally <head>
|
||||
;
|
||||
// Each style tag should be placed right before our
|
||||
// anchor. By inserting before and not after, we do not
|
||||
// need to track the last inserted element.
|
||||
parentNode.insertBefore(element, anchorElement);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
const MiniCssExtractPlugin = require("../../../../plugins/mini-css-extract-plugin").default;
|
||||
return {
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
publicPath: `${assetPrefix}/_next/`,
|
||||
esModule: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=client.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/client.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/client.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/build/webpack/config/blocks/css/loaders/client.ts"],"names":["getClientStyleLoader","hasAppDir","isAppDir","isDevelopment","assetPrefix","shouldEnableApp","loader","options","insert","element","anchorElement","document","querySelector","parentNode","insertBefore","MiniCssExtractPlugin","require","default","publicPath","esModule"],"mappings":"AAEA,OAAO,SAASA,qBAAqB,EACnCC,SAAS,EACTC,QAAQ,EACRC,aAAa,EACbC,WAAW,EAMZ;IACC,MAAMC,kBAAkB,OAAOH,aAAa,YAAYA,WAAWD;IAEnE,0DAA0D;IAC1D,IAAIE,iBAAiB,CAACE,iBAAiB;QACrC,OAAO;YACLC,QAAQ;YACRC,SAAS;gBACPC,QAAQ,SAAUC,OAAa;oBAC7B,uDAAuD;oBACvD,uDAAuD;oBACvD,uDAAuD;oBACvD,sDAAsD;oBACtD,sDAAsD;oBAEtD,sDAAsD;oBACtD,yBAAyB;oBACzB,IAAIC,gBAAgBC,SAASC,aAAa,CACxC;oBAEF,IAAIC,aAAaH,cAAcG,UAAU,AAAE,kBAAkB;;oBAE7D,mDAAmD;oBACnD,uDAAuD;oBACvD,2CAA2C;oBAC3CA,WAAWC,YAAY,CAACL,SAASC;gBACnC;YACF;QACF;IACF;IAEA,MAAMK,uBACJC,QAAQ,+CAA+CC,OAAO;IAChE,OAAO;QACLX,QAAQS,qBAAqBT,MAAM;QACnCC,SAAS;YACPW,YAAY,CAAC,EAAEd,YAAY,OAAO,CAAC;YACnCe,UAAU;QACZ;IACF;AACF"}
|
||||
11
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/file-resolve.js
generated
vendored
Normal file
11
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/file-resolve.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export function cssFileResolve(url, _resourcePath, urlImports) {
|
||||
if (url.startsWith("/")) {
|
||||
return false;
|
||||
}
|
||||
if (!urlImports && /^[a-z][a-z0-9+.-]*:/i.test(url)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=file-resolve.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/file-resolve.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/file-resolve.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/build/webpack/config/blocks/css/loaders/file-resolve.ts"],"names":["cssFileResolve","url","_resourcePath","urlImports","startsWith","test"],"mappings":"AAAA,OAAO,SAASA,eACdC,GAAW,EACXC,aAAqB,EACrBC,UAAe;IAEf,IAAIF,IAAIG,UAAU,CAAC,MAAM;QACvB,OAAO;IACT;IACA,IAAI,CAACD,cAAc,uBAAuBE,IAAI,CAACJ,MAAM;QACnD,OAAO;IACT;IACA,OAAO;AACT"}
|
||||
22
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.js
generated
vendored
Normal file
22
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
import loaderUtils from "next/dist/compiled/loader-utils3";
|
||||
import path from "path";
|
||||
const regexLikeIndexModule = /(?<!pages[\\/])index\.module\.(scss|sass|css)$/;
|
||||
export function getCssModuleLocalIdent(context, _, exportName, options) {
|
||||
const relativePath = path.relative(context.rootContext, context.resourcePath).replace(/\\+/g, "/");
|
||||
// Generate a more meaningful name (parent folder) when the user names the
|
||||
// file `index.module.css`.
|
||||
const fileNameOrFolder = regexLikeIndexModule.test(relativePath) ? "[folder]" : "[name]";
|
||||
// Generate a hash to make the class name unique.
|
||||
const hash = loaderUtils.getHashDigest(Buffer.from(`filePath:${relativePath}#className:${exportName}`), "sha1", "base64", 5);
|
||||
// Have webpack interpolate the `[folder]` or `[name]` to its real value.
|
||||
return loaderUtils.interpolateName(context, fileNameOrFolder + "_" + exportName + "__" + hash, options).replace(// Webpack name interpolation returns `about.module_root__2oFM9` for
|
||||
// `.root {}` inside a file named `about.module.css`. Let's simplify
|
||||
// this.
|
||||
/\.module_/, "_")// Replace invalid symbols with underscores instead of escaping
|
||||
// https://mathiasbynens.be/notes/css-escapes#identifiers-strings
|
||||
.replace(/[^a-zA-Z0-9-_]/g, "_")// "they cannot start with a digit, two hyphens, or a hyphen followed by a digit [sic]"
|
||||
// https://www.w3.org/TR/CSS21/syndata.html#characters
|
||||
.replace(/^(\d|--|-\d)/, "__$1");
|
||||
}
|
||||
|
||||
//# sourceMappingURL=getCssModuleLocalIdent.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.ts"],"names":["loaderUtils","path","regexLikeIndexModule","getCssModuleLocalIdent","context","_","exportName","options","relativePath","relative","rootContext","resourcePath","replace","fileNameOrFolder","test","hash","getHashDigest","Buffer","from","interpolateName"],"mappings":"AAAA,OAAOA,iBAAiB,mCAAkC;AAC1D,OAAOC,UAAU,OAAM;AAGvB,MAAMC,uBAAuB;AAE7B,OAAO,SAASC,uBACdC,OAAkC,EAClCC,CAAM,EACNC,UAAkB,EAClBC,OAAe;IAEf,MAAMC,eAAeP,KAClBQ,QAAQ,CAACL,QAAQM,WAAW,EAAEN,QAAQO,YAAY,EAClDC,OAAO,CAAC,QAAQ;IAEnB,0EAA0E;IAC1E,2BAA2B;IAC3B,MAAMC,mBAAmBX,qBAAqBY,IAAI,CAACN,gBAC/C,aACA;IAEJ,iDAAiD;IACjD,MAAMO,OAAOf,YAAYgB,aAAa,CACpCC,OAAOC,IAAI,CAAC,CAAC,SAAS,EAAEV,aAAa,WAAW,EAAEF,WAAW,CAAC,GAC9D,QACA,UACA;IAGF,yEAAyE;IACzE,OACEN,YACGmB,eAAe,CACdf,SACAS,mBAAmB,MAAMP,aAAa,OAAOS,MAC7CR,SAEDK,OAAO,CACN,oEAAoE;IACpE,oEAAoE;IACpE,QAAQ;IACR,aACA,IAEF,+DAA+D;IAC/D,iEAAiE;KAChEA,OAAO,CAAC,mBAAmB,IAC5B,uFAAuF;IACvF,sDAAsD;KACrDA,OAAO,CAAC,gBAAgB;AAE/B"}
|
||||
52
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/global.js
generated
vendored
Normal file
52
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/global.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
import { getClientStyleLoader } from "./client";
|
||||
import { cssFileResolve } from "./file-resolve";
|
||||
export function getGlobalCssLoader(ctx, postcss, preProcessors = []) {
|
||||
const loaders = [];
|
||||
if (ctx.isClient) {
|
||||
// Add appropriate development more or production mode style
|
||||
// loader
|
||||
loaders.push(getClientStyleLoader({
|
||||
hasAppDir: ctx.hasAppDir,
|
||||
isAppDir: ctx.isAppDir,
|
||||
isDevelopment: ctx.isDevelopment,
|
||||
assetPrefix: ctx.assetPrefix
|
||||
}));
|
||||
}
|
||||
if (ctx.experimental.useLightningcss) {
|
||||
loaders.push({
|
||||
loader: require.resolve("../../../../loaders/lightningcss-loader/src"),
|
||||
options: {
|
||||
importLoaders: 1 + preProcessors.length,
|
||||
url: (url, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
targets: ctx.supportedBrowsers
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Resolve CSS `@import`s and `url()`s
|
||||
loaders.push({
|
||||
loader: require.resolve("../../../../loaders/css-loader/src"),
|
||||
options: {
|
||||
postcss,
|
||||
importLoaders: 1 + preProcessors.length,
|
||||
// Next.js controls CSS Modules eligibility:
|
||||
modules: false,
|
||||
url: (url, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports)
|
||||
}
|
||||
});
|
||||
// Compile CSS
|
||||
loaders.push({
|
||||
loader: require.resolve("../../../../loaders/postcss-loader/src"),
|
||||
options: {
|
||||
postcss
|
||||
}
|
||||
});
|
||||
}
|
||||
loaders.push(// Webpack loaders run like a stack, so we need to reverse the natural
|
||||
// order of preprocessors.
|
||||
...preProcessors.slice().reverse());
|
||||
return loaders;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=global.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/global.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/global.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/build/webpack/config/blocks/css/loaders/global.ts"],"names":["getClientStyleLoader","cssFileResolve","getGlobalCssLoader","ctx","postcss","preProcessors","loaders","isClient","push","hasAppDir","isAppDir","isDevelopment","assetPrefix","experimental","useLightningcss","loader","require","resolve","options","importLoaders","length","url","resourcePath","urlImports","import","_","targets","supportedBrowsers","modules","slice","reverse"],"mappings":"AAGA,SAASA,oBAAoB,QAAQ,WAAU;AAC/C,SAASC,cAAc,QAAQ,iBAAgB;AAE/C,OAAO,SAASC,mBACdC,GAAyB,EACzBC,OAAY,EACZC,gBAAmD,EAAE;IAErD,MAAMC,UAAoC,EAAE;IAE5C,IAAIH,IAAII,QAAQ,EAAE;QAChB,4DAA4D;QAC5D,SAAS;QACTD,QAAQE,IAAI,CACVR,qBAAqB;YACnBS,WAAWN,IAAIM,SAAS;YACxBC,UAAUP,IAAIO,QAAQ;YACtBC,eAAeR,IAAIQ,aAAa;YAChCC,aAAaT,IAAIS,WAAW;QAC9B;IAEJ;IAEA,IAAIT,IAAIU,YAAY,CAACC,eAAe,EAAE;QACpCR,QAAQE,IAAI,CAAC;YACXO,QAAQC,QAAQC,OAAO,CAAC;YACxBC,SAAS;gBACPC,eAAe,IAAId,cAAce,MAAM;gBACvCC,KAAK,CAACA,KAAaC,eACjBrB,eAAeoB,KAAKC,cAAcnB,IAAIU,YAAY,CAACU,UAAU;gBAC/DC,QAAQ,CAACH,KAAaI,GAAQH,eAC5BrB,eAAeoB,KAAKC,cAAcnB,IAAIU,YAAY,CAACU,UAAU;gBAC/DG,SAASvB,IAAIwB,iBAAiB;YAChC;QACF;IACF,OAAO;QACL,sCAAsC;QACtCrB,QAAQE,IAAI,CAAC;YACXO,QAAQC,QAAQC,OAAO,CAAC;YACxBC,SAAS;gBACPd;gBACAe,eAAe,IAAId,cAAce,MAAM;gBACvC,4CAA4C;gBAC5CQ,SAAS;gBACTP,KAAK,CAACA,KAAaC,eACjBrB,eAAeoB,KAAKC,cAAcnB,IAAIU,YAAY,CAACU,UAAU;gBAC/DC,QAAQ,CAACH,KAAaI,GAAQH,eAC5BrB,eAAeoB,KAAKC,cAAcnB,IAAIU,YAAY,CAACU,UAAU;YACjE;QACF;QAEA,cAAc;QACdjB,QAAQE,IAAI,CAAC;YACXO,QAAQC,QAAQC,OAAO,CAAC;YACxBC,SAAS;gBACPd;YACF;QACF;IACF;IAEAE,QAAQE,IAAI,CACV,sEAAsE;IACtE,0BAA0B;OACvBH,cAAcwB,KAAK,GAAGC,OAAO;IAGlC,OAAOxB;AACT"}
|
||||
4
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/index.js
generated
vendored
Normal file
4
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/index.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export * from "./global";
|
||||
export * from "./modules";
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/build/webpack/config/blocks/css/loaders/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAU;AACxB,cAAc,YAAW"}
|
||||
74
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/modules.js
generated
vendored
Normal file
74
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/modules.js
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
import { getClientStyleLoader } from "./client";
|
||||
import { cssFileResolve } from "./file-resolve";
|
||||
import { getCssModuleLocalIdent } from "./getCssModuleLocalIdent";
|
||||
export function getCssModuleLoader(ctx, postcss, preProcessors = []) {
|
||||
const loaders = [];
|
||||
if (ctx.isClient) {
|
||||
// Add appropriate development more or production mode style
|
||||
// loader
|
||||
loaders.push(getClientStyleLoader({
|
||||
hasAppDir: ctx.hasAppDir,
|
||||
isAppDir: ctx.isAppDir,
|
||||
isDevelopment: ctx.isDevelopment,
|
||||
assetPrefix: ctx.assetPrefix
|
||||
}));
|
||||
}
|
||||
if (ctx.experimental.useLightningcss) {
|
||||
loaders.push({
|
||||
loader: require.resolve("../../../../loaders/lightningcss-loader/src"),
|
||||
options: {
|
||||
importLoaders: 1 + preProcessors.length,
|
||||
url: (url, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
modules: {
|
||||
// Do not transform class names (CJS mode backwards compatibility):
|
||||
exportLocalsConvention: "asIs",
|
||||
// Server-side (Node.js) rendering support:
|
||||
exportOnlyLocals: ctx.isServer
|
||||
},
|
||||
targets: ctx.supportedBrowsers
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Resolve CSS `@import`s and `url()`s
|
||||
loaders.push({
|
||||
loader: require.resolve("../../../../loaders/css-loader/src"),
|
||||
options: {
|
||||
postcss,
|
||||
importLoaders: 1 + preProcessors.length,
|
||||
// Use CJS mode for backwards compatibility:
|
||||
esModule: false,
|
||||
url: (url, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
modules: {
|
||||
// Do not transform class names (CJS mode backwards compatibility):
|
||||
exportLocalsConvention: "asIs",
|
||||
// Server-side (Node.js) rendering support:
|
||||
exportOnlyLocals: ctx.isServer,
|
||||
// Disallow global style exports so we can code-split CSS and
|
||||
// not worry about loading order.
|
||||
mode: "pure",
|
||||
// Generate a friendly production-ready name so it's
|
||||
// reasonably understandable. The same name is used for
|
||||
// development.
|
||||
// TODO: Consider making production reduce this to a single
|
||||
// character?
|
||||
getLocalIdent: getCssModuleLocalIdent
|
||||
}
|
||||
}
|
||||
});
|
||||
// Compile CSS
|
||||
loaders.push({
|
||||
loader: require.resolve("../../../../loaders/postcss-loader/src"),
|
||||
options: {
|
||||
postcss
|
||||
}
|
||||
});
|
||||
}
|
||||
loaders.push(// Webpack loaders run like a stack, so we need to reverse the natural
|
||||
// order of preprocessors.
|
||||
...preProcessors.slice().reverse());
|
||||
return loaders;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=modules.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/modules.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/modules.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/build/webpack/config/blocks/css/loaders/modules.ts"],"names":["getClientStyleLoader","cssFileResolve","getCssModuleLocalIdent","getCssModuleLoader","ctx","postcss","preProcessors","loaders","isClient","push","hasAppDir","isAppDir","isDevelopment","assetPrefix","experimental","useLightningcss","loader","require","resolve","options","importLoaders","length","url","resourcePath","urlImports","import","_","modules","exportLocalsConvention","exportOnlyLocals","isServer","targets","supportedBrowsers","esModule","mode","getLocalIdent","slice","reverse"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ,WAAU;AAC/C,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,SAASC,sBAAsB,QAAQ,2BAA0B;AAEjE,OAAO,SAASC,mBACdC,GAAyB,EACzBC,OAAY,EACZC,gBAAmD,EAAE;IAErD,MAAMC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uDAAuD;oBACvD,eAAe;oBACf,2DAA2D;oBAC3D,aAAa;oBACbC,eAAejC;gBACjB;YACF;QACF;QAEA,cAAc;QACdK,QAAQE,IAAI,CAAC;YACXO,QAAQC,QAAQC,OAAO,CAAC;YACxBC,SAAS;gBACPd;YACF;QACF;IACF;IAEAE,QAAQE,IAAI,CACV,sEAAsE;IACtE,0BAA0B;OACvBH,cAAc8B,KAAK,GAAGC,OAAO;IAGlC,OAAO9B;AACT"}
|
||||
52
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/next-font.js
generated
vendored
Normal file
52
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/next-font.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
import { getClientStyleLoader } from "./client";
|
||||
import { cssFileResolve } from "./file-resolve";
|
||||
export function getNextFontLoader(ctx, postcss, fontLoaderPath) {
|
||||
const loaders = [];
|
||||
if (ctx.isClient) {
|
||||
// Add appropriate development mode or production mode style
|
||||
// loader
|
||||
loaders.push(getClientStyleLoader({
|
||||
hasAppDir: ctx.hasAppDir,
|
||||
isDevelopment: ctx.isDevelopment,
|
||||
assetPrefix: ctx.assetPrefix
|
||||
}));
|
||||
}
|
||||
loaders.push({
|
||||
loader: require.resolve("../../../../loaders/css-loader/src"),
|
||||
options: {
|
||||
postcss,
|
||||
importLoaders: 1,
|
||||
// Use CJS mode for backwards compatibility:
|
||||
esModule: false,
|
||||
url: (url, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
|
||||
modules: {
|
||||
// Do not transform class names (CJS mode backwards compatibility):
|
||||
exportLocalsConvention: "asIs",
|
||||
// Server-side (Node.js) rendering support:
|
||||
exportOnlyLocals: ctx.isServer,
|
||||
// Disallow global style exports so we can code-split CSS and
|
||||
// not worry about loading order.
|
||||
mode: "pure",
|
||||
getLocalIdent: (_context, _localIdentName, exportName, _options, meta)=>{
|
||||
// hash from next-font-loader
|
||||
return `__${exportName}_${meta.fontFamilyHash}`;
|
||||
}
|
||||
},
|
||||
fontLoader: true
|
||||
}
|
||||
});
|
||||
loaders.push({
|
||||
loader: "next-font-loader",
|
||||
options: {
|
||||
isDev: ctx.isDevelopment,
|
||||
isServer: ctx.isServer,
|
||||
assetPrefix: ctx.assetPrefix,
|
||||
fontLoaderPath,
|
||||
postcss
|
||||
}
|
||||
});
|
||||
return loaders;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=next-font.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/next-font.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/loaders/next-font.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../../src/build/webpack/config/blocks/css/loaders/next-font.ts"],"names":["getClientStyleLoader","cssFileResolve","getNextFontLoader","ctx","postcss","fontLoaderPath","loaders","isClient","push","hasAppDir","isDevelopment","assetPrefix","loader","require","resolve","options","importLoaders","esModule","url","resourcePath","experimental","urlImports","import","_","modules","exportLocalsConvention","exportOnlyLocals","isServer","mode","getLocalIdent","_context","_localIdentName","exportName","_options","meta","fontFamilyHash","fontLoader","isDev"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ,WAAU;AAC/C,SAASC,cAAc,QAAQ,iBAAgB;AAE/C,OAAO,SAASC,kBACdC,GAAyB,EACzBC,OAAY,EACZC,cAAsB;IAEtB,MAAMC,UAAoC,EAAE;IAE5C,IAAIH,IAAII,QAAQ,EAAE;QAChB,4DAA4D;QAC5D,SAAS;QACTD,QAAQE,IAAI,CACVR,qBAAqB;YACnBS,WAAWN,IAAIM,SAAS;YACxBC,eAAeP,IAAIO,aAAa;YAChCC,aAAaR,IAAIQ,WAAW;QAC9B;IAEJ;IAEAL,QAAQE,IAAI,CAAC;QACXI,QAAQC,QAAQC,OAAO,CAAC;QACxBC,SAAS;YACPX;YACAY,eAAe;YACf,4CAA4C;YAC5CC,UAAU;YACVC,KAAK,CAACA,KAAaC,eACjBlB,eAAeiB,KAAKC,cAAchB,IAAIiB,YAAY,CAACC,UAAU;YAC/DC,QAAQ,CAACJ,KAAaK,GAAQJ,eAC5BlB,eAAeiB,KAAKC,cAAchB,IAAIiB,YAAY,CAACC,UAAU;YAC/DG,SAAS;gBACP,mEAAmE;gBACnEC,wBAAwB;gBACxB,2CAA2C;gBAC3CC,kBAAkBvB,IAAIwB,QAAQ;gBAC9B,6DAA6D;gBAC7D,iCAAiC;gBACjCC,MAAM;gBACNC,eAAe,CACbC,UACAC,iBACAC,YACAC,UACAC;oBAEA,6BAA6B;oBAC7B,OAAO,CAAC,EAAE,EAAEF,WAAW,CAAC,EAAEE,KAAKC,cAAc,CAAC,CAAC;gBACjD;YACF;YACAC,YAAY;QACd;IACF;IAEA9B,QAAQE,IAAI,CAAC;QACXI,QAAQ;QACRG,SAAS;YACPsB,OAAOlC,IAAIO,aAAa;YACxBiB,UAAUxB,IAAIwB,QAAQ;YACtBhB,aAAaR,IAAIQ,WAAW;YAC5BN;YACAD;QACF;IACF;IAEA,OAAOE;AACT"}
|
||||
15
node_modules/next/dist/esm/build/webpack/config/blocks/css/messages.js
generated
vendored
Normal file
15
node_modules/next/dist/esm/build/webpack/config/blocks/css/messages.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import { bold, cyan } from "../../../../../lib/picocolors";
|
||||
export function getGlobalImportError() {
|
||||
return `Global CSS ${bold("cannot")} be imported from files other than your ${bold("Custom <App>")}. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to ${cyan("pages/_app.js")}. Or convert the import to Component-Level CSS (CSS Modules).\nRead more: https://nextjs.org/docs/messages/css-global`;
|
||||
}
|
||||
export function getGlobalModuleImportError() {
|
||||
return `Global CSS ${bold("cannot")} be imported from within ${bold("node_modules")}.\nRead more: https://nextjs.org/docs/messages/css-npm`;
|
||||
}
|
||||
export function getLocalModuleImportError() {
|
||||
return `CSS Modules ${bold("cannot")} be imported from within ${bold("node_modules")}.\nRead more: https://nextjs.org/docs/messages/css-modules-npm`;
|
||||
}
|
||||
export function getCustomDocumentError() {
|
||||
return `CSS ${bold("cannot")} be imported within ${cyan("pages/_document.js")}. Please move global styles to ${cyan("pages/_app.js")}.`;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=messages.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/messages.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/messages.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../src/build/webpack/config/blocks/css/messages.ts"],"names":["bold","cyan","getGlobalImportError","getGlobalModuleImportError","getLocalModuleImportError","getCustomDocumentError"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,QAAQ,gCAA+B;AAE1D,OAAO,SAASC;IACd,OAAO,CAAC,WAAW,EAAEF,KACnB,UACA,wCAAwC,EAAEA,KAC1C,gBACA,qHAAqH,EAAEC,KACvH,iBACA,qHAAqH,CAAC;AAC1H;AAEA,OAAO,SAASE;IACd,OAAO,CAAC,WAAW,EAAEH,KAAK,UAAU,yBAAyB,EAAEA,KAC7D,gBACA,sDAAsD,CAAC;AAC3D;AAEA,OAAO,SAASI;IACd,OAAO,CAAC,YAAY,EAAEJ,KAAK,UAAU,yBAAyB,EAAEA,KAC9D,gBACA,8DAA8D,CAAC;AACnE;AAEA,OAAO,SAASK;IACd,OAAO,CAAC,IAAI,EAAEL,KAAK,UAAU,oBAAoB,EAAEC,KACjD,sBACA,+BAA+B,EAAEA,KAAK,iBAAiB,CAAC,CAAC;AAC7D"}
|
||||
152
node_modules/next/dist/esm/build/webpack/config/blocks/css/plugins.js
generated
vendored
Normal file
152
node_modules/next/dist/esm/build/webpack/config/blocks/css/plugins.js
generated
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
import { bold, red, underline, yellow } from "../../../../../lib/picocolors";
|
||||
import { findConfig } from "../../../../../lib/find-config";
|
||||
const genericErrorText = "Malformed PostCSS Configuration";
|
||||
function getError_NullConfig(pluginName) {
|
||||
return `${red(bold("Error"))}: Your PostCSS configuration for '${pluginName}' cannot have ${bold("null")} configuration.\nTo disable '${pluginName}', pass ${bold("false")}, otherwise, pass ${bold("true")} or a configuration object.`;
|
||||
}
|
||||
function isIgnoredPlugin(pluginPath) {
|
||||
const ignoredRegex = /(?:^|[\\/])(postcss-modules-values|postcss-modules-scope|postcss-modules-extract-imports|postcss-modules-local-by-default|postcss-modules)(?:[\\/]|$)/i;
|
||||
const match = ignoredRegex.exec(pluginPath);
|
||||
if (match == null) {
|
||||
return false;
|
||||
}
|
||||
const plugin = match.pop();
|
||||
console.warn(`${yellow(bold("Warning"))}: Please remove the ${underline(plugin)} plugin from your PostCSS configuration. ` + `This plugin is automatically configured by Next.js.\n` + "Read more: https://nextjs.org/docs/messages/postcss-ignored-plugin");
|
||||
return true;
|
||||
}
|
||||
const createLazyPostCssPlugin = (fn)=>{
|
||||
let result = undefined;
|
||||
const plugin = (...args)=>{
|
||||
if (result === undefined) result = fn();
|
||||
if (result.postcss === true) {
|
||||
return result(...args);
|
||||
} else if (result.postcss) {
|
||||
return result.postcss;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
plugin.postcss = true;
|
||||
return plugin;
|
||||
};
|
||||
async function loadPlugin(dir, pluginName, options) {
|
||||
if (options === false || isIgnoredPlugin(pluginName)) {
|
||||
return false;
|
||||
}
|
||||
if (options == null) {
|
||||
console.error(getError_NullConfig(pluginName));
|
||||
throw new Error(genericErrorText);
|
||||
}
|
||||
const pluginPath = require.resolve(pluginName, {
|
||||
paths: [
|
||||
dir
|
||||
]
|
||||
});
|
||||
if (isIgnoredPlugin(pluginPath)) {
|
||||
return false;
|
||||
} else if (options === true) {
|
||||
return createLazyPostCssPlugin(()=>require(pluginPath));
|
||||
} else {
|
||||
if (typeof options === "object" && Object.keys(options).length === 0) {
|
||||
return createLazyPostCssPlugin(()=>require(pluginPath));
|
||||
}
|
||||
return createLazyPostCssPlugin(()=>require(pluginPath)(options));
|
||||
}
|
||||
}
|
||||
function getDefaultPlugins(supportedBrowsers, disablePostcssPresetEnv) {
|
||||
return [
|
||||
require.resolve("next/dist/compiled/postcss-flexbugs-fixes"),
|
||||
disablePostcssPresetEnv ? false : [
|
||||
require.resolve("next/dist/compiled/postcss-preset-env"),
|
||||
{
|
||||
browsers: supportedBrowsers ?? [
|
||||
"defaults"
|
||||
],
|
||||
autoprefixer: {
|
||||
// Disable legacy flexbox support
|
||||
flexbox: "no-2009"
|
||||
},
|
||||
// Enable CSS features that have shipped to the
|
||||
// web platform, i.e. in 2+ browsers unflagged.
|
||||
stage: 3,
|
||||
features: {
|
||||
"custom-properties": false
|
||||
}
|
||||
}
|
||||
]
|
||||
].filter(Boolean);
|
||||
}
|
||||
export async function getPostCssPlugins(dir, supportedBrowsers, disablePostcssPresetEnv = false) {
|
||||
let config = await findConfig(dir, "postcss");
|
||||
if (config == null) {
|
||||
config = {
|
||||
plugins: getDefaultPlugins(supportedBrowsers, disablePostcssPresetEnv)
|
||||
};
|
||||
}
|
||||
if (typeof config === "function") {
|
||||
throw new Error(`Your custom PostCSS configuration may not export a function. Please export a plain object instead.\n` + "Read more: https://nextjs.org/docs/messages/postcss-function");
|
||||
}
|
||||
// Warn user about configuration keys which are not respected
|
||||
const invalidKey = Object.keys(config).find((key)=>key !== "plugins");
|
||||
if (invalidKey) {
|
||||
console.warn(`${yellow(bold("Warning"))}: Your PostCSS configuration defines a field which is not supported (\`${invalidKey}\`). ` + `Please remove this configuration value.`);
|
||||
}
|
||||
// Enforce the user provided plugins if the configuration file is present
|
||||
let plugins = config.plugins;
|
||||
if (plugins == null || typeof plugins !== "object") {
|
||||
throw new Error(`Your custom PostCSS configuration must export a \`plugins\` key.`);
|
||||
}
|
||||
if (!Array.isArray(plugins)) {
|
||||
// Capture variable so TypeScript is happy
|
||||
const pc = plugins;
|
||||
plugins = Object.keys(plugins).reduce((acc, curr)=>{
|
||||
const p = pc[curr];
|
||||
if (typeof p === "undefined") {
|
||||
console.error(getError_NullConfig(curr));
|
||||
throw new Error(genericErrorText);
|
||||
}
|
||||
acc.push([
|
||||
curr,
|
||||
p
|
||||
]);
|
||||
return acc;
|
||||
}, []);
|
||||
}
|
||||
const parsed = [];
|
||||
plugins.forEach((plugin)=>{
|
||||
if (plugin == null) {
|
||||
console.warn(`${yellow(bold("Warning"))}: A ${bold("null")} PostCSS plugin was provided. This entry will be ignored.`);
|
||||
} else if (typeof plugin === "string") {
|
||||
parsed.push([
|
||||
plugin,
|
||||
true
|
||||
]);
|
||||
} else if (Array.isArray(plugin)) {
|
||||
const pluginName = plugin[0];
|
||||
const pluginConfig = plugin[1];
|
||||
if (typeof pluginName === "string" && (typeof pluginConfig === "boolean" || typeof pluginConfig === "object" || typeof pluginConfig === "string")) {
|
||||
parsed.push([
|
||||
pluginName,
|
||||
pluginConfig
|
||||
]);
|
||||
} else {
|
||||
if (typeof pluginName !== "string") {
|
||||
console.error(`${red(bold("Error"))}: A PostCSS Plugin must be provided as a ${bold("string")}. Instead, we got: '${pluginName}'.\n` + "Read more: https://nextjs.org/docs/messages/postcss-shape");
|
||||
} else {
|
||||
console.error(`${red(bold("Error"))}: A PostCSS Plugin was passed as an array but did not provide its configuration ('${pluginName}').\n` + "Read more: https://nextjs.org/docs/messages/postcss-shape");
|
||||
}
|
||||
throw new Error(genericErrorText);
|
||||
}
|
||||
} else if (typeof plugin === "function") {
|
||||
console.error(`${red(bold("Error"))}: A PostCSS Plugin was passed as a function using require(), but it must be provided as a ${bold("string")}.\nRead more: https://nextjs.org/docs/messages/postcss-shape`);
|
||||
throw new Error(genericErrorText);
|
||||
} else {
|
||||
console.error(`${red(bold("Error"))}: An unknown PostCSS plugin was provided (${plugin}).\n` + "Read more: https://nextjs.org/docs/messages/postcss-shape");
|
||||
throw new Error(genericErrorText);
|
||||
}
|
||||
});
|
||||
const resolved = await Promise.all(parsed.map((p)=>loadPlugin(dir, p[0], p[1])));
|
||||
const filtered = resolved.filter(Boolean);
|
||||
return filtered;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=plugins.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/plugins.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/css/plugins.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../src/build/webpack/config/blocks/css/plugins.ts"],"names":["bold","red","underline","yellow","findConfig","genericErrorText","getError_NullConfig","pluginName","isIgnoredPlugin","pluginPath","ignoredRegex","match","exec","plugin","pop","console","warn","createLazyPostCssPlugin","fn","result","undefined","args","postcss","loadPlugin","dir","options","error","Error","require","resolve","paths","Object","keys","length","getDefaultPlugins","supportedBrowsers","disablePostcssPresetEnv","browsers","autoprefixer","flexbox","stage","features","filter","Boolean","getPostCssPlugins","config","plugins","invalidKey","find","key","Array","isArray","pc","reduce","acc","curr","p","push","parsed","forEach","pluginConfig","resolved","Promise","all","map","filtered"],"mappings":"AAAA,SAASA,IAAI,EAAEC,GAAG,EAAEC,SAAS,EAAEC,MAAM,QAAQ,gCAA+B;AAC5E,SAASC,UAAU,QAAQ,iCAAgC;AAY3D,MAAMC,mBAAmB;AAEzB,SAASC,oBAAoBC,UAAkB;IAC7C,OAAO,CAAC,EAAEN,IACRD,KAAK,UACL,kCAAkC,EAAEO,WAAW,cAAc,EAAEP,KAC/D,QACA,6BAA6B,EAAEO,WAAW,QAAQ,EAAEP,KACpD,SACA,kBAAkB,EAAEA,KAAK,QAAQ,2BAA2B,CAAC;AACjE;AAEA,SAASQ,gBAAgBC,UAAkB;IACzC,MAAMC,eACJ;IACF,MAAMC,QAAQD,aAAaE,IAAI,CAACH;IAChC,IAAIE,SAAS,MAAM;QACjB,OAAO;IACT;IAEA,MAAME,SAASF,MAAMG,GAAG;IACxBC,QAAQC,IAAI,CACV,CAAC,EAAEb,OAAOH,KAAK,YAAY,oBAAoB,EAA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AE,EAAEA,CAAC,CAAC,EAAE;IAE9C,MAAMS,WAA+CJ,SAASnB,MAAM,CAClEC;IAGF,OAAOsB;AACT"}
|
||||
27
node_modules/next/dist/esm/build/webpack/config/blocks/images/index.js
generated
vendored
Normal file
27
node_modules/next/dist/esm/build/webpack/config/blocks/images/index.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
import curry from "next/dist/compiled/lodash.curry";
|
||||
import { nextImageLoaderRegex } from "../../../../webpack-config";
|
||||
import { loader } from "../../helpers";
|
||||
import { pipe } from "../../utils";
|
||||
import { getCustomDocumentImageError } from "./messages";
|
||||
export const images = curry(async function images(_ctx, config) {
|
||||
const fns = [
|
||||
loader({
|
||||
oneOf: [
|
||||
{
|
||||
test: nextImageLoaderRegex,
|
||||
use: {
|
||||
loader: "error-loader",
|
||||
options: {
|
||||
reason: getCustomDocumentImageError()
|
||||
}
|
||||
},
|
||||
issuer: /pages[\\/]_document\./
|
||||
}
|
||||
]
|
||||
})
|
||||
];
|
||||
const fn = pipe(...fns);
|
||||
return fn(config);
|
||||
});
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/images/index.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/images/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../src/build/webpack/config/blocks/images/index.ts"],"names":["curry","nextImageLoaderRegex","loader","pipe","getCustomDocumentImageError","images","_ctx","config","fns","oneOf","test","use","options","reason","issuer","fn"],"mappings":"AAAA,OAAOA,WAAW,kCAAiC;AAEnD,SAASC,oBAAoB,QAAQ,6BAA4B;AACjE,SAASC,MAAM,QAAQ,gBAAe;AACtC,SAASC,IAAI,QAAQ,cAAa;AAElC,SAASC,2BAA2B,QAAQ,aAAY;AAExD,OAAO,MAAMC,SAASL,MAAM,eAAeK,OACzCC,IAA0B,EAC1BC,MAA6B;IAE7B,MAAMC,MAAyB;QAC7BN,OAAO;YACLO,OAAO;gBACL;oBACEC,MAAMT;oBACNU,KAAK;wBACHT,QAAQ;wBACRU,SAAS;4BACPC,QAAQT;wBACV;oBACF;oBACAU,QAAQ;gBACV;aACD;QACH;KACD;IAED,MAAMC,KAAKZ,QAAQK;IACnB,OAAOO,GAAGR;AACZ,GAAE"}
|
||||
6
node_modules/next/dist/esm/build/webpack/config/blocks/images/messages.js
generated
vendored
Normal file
6
node_modules/next/dist/esm/build/webpack/config/blocks/images/messages.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import { bold, cyan } from "../../../../../lib/picocolors";
|
||||
export function getCustomDocumentImageError() {
|
||||
return `Images ${bold("cannot")} be imported within ${cyan("pages/_document.js")}. Please move image imports that need to be displayed on every page into ${cyan("pages/_app.js")}.\nRead more: https://nextjs.org/docs/messages/custom-document-image-import`;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=messages.js.map
|
||||
1
node_modules/next/dist/esm/build/webpack/config/blocks/images/messages.js.map
generated
vendored
Normal file
1
node_modules/next/dist/esm/build/webpack/config/blocks/images/messages.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../../src/build/webpack/config/blocks/images/messages.ts"],"names":["bold","cyan","getCustomDocumentImageError"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,QAAQ,gCAA+B;AAE1D,OAAO,SAASC;IACd,OAAO,CAAC,OAAO,EAAEF,KAAK,UAAU,oBAAoB,EAAEC,KACpD,sBACA,yEAAyE,EAAEA,KAC3E,iBACA,2EAA2E,CAAC;AAChF"}
|
||||
Reference in New Issue
Block a user