fixed version control heatmap and activity
This commit is contained in:
58
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/base.js
generated
vendored
Normal file
58
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/base.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "base", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return base;
|
||||
}
|
||||
});
|
||||
const _lodashcurry = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/lodash.curry"));
|
||||
const _constants = require("../../../../shared/lib/constants");
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
const base = (0, _lodashcurry.default)(function base(ctx, config) {
|
||||
config.mode = ctx.isDevelopment ? "development" : "production";
|
||||
config.name = ctx.isServer ? ctx.isEdgeRuntime ? _constants.COMPILER_NAMES.edgeServer : _constants.COMPILER_NAMES.server : _constants.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
|
||||
568
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/index.js
generated
vendored
Normal file
568
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/index.js
generated
vendored
Normal file
@@ -0,0 +1,568 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
css: null,
|
||||
lazyPostCSS: null,
|
||||
regexLikeCss: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
css: function() {
|
||||
return css;
|
||||
},
|
||||
lazyPostCSS: function() {
|
||||
return lazyPostCSS;
|
||||
},
|
||||
regexLikeCss: function() {
|
||||
return regexLikeCss;
|
||||
}
|
||||
});
|
||||
const _lodashcurry = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/lodash.curry"));
|
||||
const _helpers = require("../../helpers");
|
||||
const _utils = require("../../utils");
|
||||
const _loaders = require("./loaders");
|
||||
const _nextfont = require("./loaders/next-font");
|
||||
const _messages = require("./messages");
|
||||
const _plugins = require("./plugins");
|
||||
const _nonnullable = require("../../../../../lib/non-nullable");
|
||||
const _constants = require("../../../../../lib/constants");
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
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: [
|
||||
_constants.WEBPACK_LAYERS.reactServerComponents,
|
||||
_constants.WEBPACK_LAYERS.serverSideRendering,
|
||||
_constants.WEBPACK_LAYERS.appPagesBrowser
|
||||
]
|
||||
};
|
||||
const PAGES_LAYER_RULE = {
|
||||
not: [
|
||||
_constants.WEBPACK_LAYERS.reactServerComponents,
|
||||
_constants.WEBPACK_LAYERS.serverSideRendering,
|
||||
_constants.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;
|
||||
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 (0, _plugins.getPostCssPlugins)(rootDirectory, supportedBrowsers, disablePostcssPresetEnv);
|
||||
return {
|
||||
postcss,
|
||||
postcssWithPlugins: postcss(postCssPlugins)
|
||||
};
|
||||
})();
|
||||
}
|
||||
return postcssInstancePromise;
|
||||
}
|
||||
const css = (0, _lodashcurry.default)(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((0, _helpers.loader)({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
sideEffects: false,
|
||||
test: fontLoaderTarget,
|
||||
use: (0, _nextfont.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((0, _helpers.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: (0, _messages.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`.
|
||||
(0, _helpers.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
|
||||
}
|
||||
},
|
||||
...(0, _loaders.getCssModuleLoader)({
|
||||
...ctx,
|
||||
isAppDir: true
|
||||
}, lazyPostCSSInitializer)
|
||||
]
|
||||
}) : null,
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexCssModules,
|
||||
issuerLayer: PAGES_LAYER_RULE,
|
||||
use: (0, _loaders.getCssModuleLoader)({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer)
|
||||
})
|
||||
].filter(_nonnullable.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`.
|
||||
(0, _helpers.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
|
||||
}
|
||||
},
|
||||
...(0, _loaders.getCssModuleLoader)({
|
||||
...ctx,
|
||||
isAppDir: true
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
]
|
||||
}) : null,
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexSassModules,
|
||||
issuerLayer: PAGES_LAYER_RULE,
|
||||
use: (0, _loaders.getCssModuleLoader)({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
})
|
||||
].filter(_nonnullable.nonNullable)
|
||||
}), // Throw an error for CSS Modules used outside their supported scope
|
||||
(0, _helpers.loader)({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
test: [
|
||||
regexCssModules,
|
||||
regexSassModules
|
||||
],
|
||||
use: {
|
||||
loader: "error-loader",
|
||||
options: {
|
||||
reason: (0, _messages.getLocalModuleImportError)()
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}));
|
||||
// Global CSS and SASS support.
|
||||
if (ctx.isServer) {
|
||||
fns.push((0, _helpers.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.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((0, _helpers.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
|
||||
}
|
||||
},
|
||||
...(0, _loaders.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
|
||||
}
|
||||
},
|
||||
...(0, _loaders.getGlobalCssLoader)({
|
||||
...ctx,
|
||||
isAppDir: true
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
]
|
||||
})
|
||||
] : [],
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexCssGlobal,
|
||||
include: allowedPagesGlobalCSSPath,
|
||||
issuer: allowedPagesGlobalCSSIssuer,
|
||||
issuerLayer: PAGES_LAYER_RULE,
|
||||
use: (0, _loaders.getGlobalCssLoader)({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer)
|
||||
}),
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexSassGlobal,
|
||||
include: allowedPagesGlobalCSSPath,
|
||||
issuer: allowedPagesGlobalCSSIssuer,
|
||||
issuerLayer: PAGES_LAYER_RULE,
|
||||
use: (0, _loaders.getGlobalCssLoader)({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
})
|
||||
].filter(_nonnullable.nonNullable)
|
||||
}));
|
||||
if (ctx.customAppFile) {
|
||||
fns.push((0, _helpers.loader)({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexCssGlobal,
|
||||
issuer: {
|
||||
and: [
|
||||
ctx.customAppFile
|
||||
]
|
||||
},
|
||||
use: (0, _loaders.getGlobalCssLoader)({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer)
|
||||
})
|
||||
]
|
||||
}), (0, _helpers.loader)({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
sideEffects: true,
|
||||
test: regexSassGlobal,
|
||||
issuer: {
|
||||
and: [
|
||||
ctx.customAppFile
|
||||
]
|
||||
},
|
||||
use: (0, _loaders.getGlobalCssLoader)({
|
||||
...ctx,
|
||||
isAppDir: false
|
||||
}, lazyPostCSSInitializer, sassPreprocessors)
|
||||
})
|
||||
]
|
||||
}));
|
||||
}
|
||||
}
|
||||
// Throw an error for Global CSS used inside of `node_modules`
|
||||
if (!shouldIncludeExternalCSSImports) {
|
||||
fns.push((0, _helpers.loader)({
|
||||
oneOf: [
|
||||
markRemovable({
|
||||
test: [
|
||||
regexCssGlobal,
|
||||
regexSassGlobal
|
||||
],
|
||||
issuer: {
|
||||
and: [
|
||||
/node_modules/
|
||||
]
|
||||
},
|
||||
use: {
|
||||
loader: "error-loader",
|
||||
options: {
|
||||
reason: (0, _messages.getGlobalModuleImportError)()
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}));
|
||||
}
|
||||
// Throw an error for Global CSS used outside of our custom <App> file
|
||||
fns.push((0, _helpers.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: (0, _messages.getGlobalImportError)()
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}));
|
||||
if (ctx.isClient) {
|
||||
// Automatically transform references to files (i.e. url()) into URLs
|
||||
// e.g. url(./logo.svg)
|
||||
fns.push((0, _helpers.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((0, _helpers.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 = (0, _utils.pipe)(...fns);
|
||||
return fn(config);
|
||||
});
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
47
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/client.js
generated
vendored
Normal file
47
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/client.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getClientStyleLoader", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getClientStyleLoader;
|
||||
}
|
||||
});
|
||||
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
|
||||
21
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/file-resolve.js
generated
vendored
Normal file
21
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/file-resolve.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "cssFileResolve", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return cssFileResolve;
|
||||
}
|
||||
});
|
||||
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
|
||||
37
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.js
generated
vendored
Normal file
37
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getCssModuleLocalIdent", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getCssModuleLocalIdent;
|
||||
}
|
||||
});
|
||||
const _loaderutils3 = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/loader-utils3"));
|
||||
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
const regexLikeIndexModule = /(?<!pages[\\/])index\.module\.(scss|sass|css)$/;
|
||||
function getCssModuleLocalIdent(context, _, exportName, options) {
|
||||
const relativePath = _path.default.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 = _loaderutils3.default.getHashDigest(Buffer.from(`filePath:${relativePath}#className:${exportName}`), "sha1", "base64", 5);
|
||||
// Have webpack interpolate the `[folder]` or `[name]` to its real value.
|
||||
return _loaderutils3.default.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
|
||||
62
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/global.js
generated
vendored
Normal file
62
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/global.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getGlobalCssLoader", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getGlobalCssLoader;
|
||||
}
|
||||
});
|
||||
const _client = require("./client");
|
||||
const _fileresolve = require("./file-resolve");
|
||||
function getGlobalCssLoader(ctx, postcss, preProcessors = []) {
|
||||
const loaders = [];
|
||||
if (ctx.isClient) {
|
||||
// Add appropriate development more or production mode style
|
||||
// loader
|
||||
loaders.push((0, _client.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)=>(0, _fileresolve.cssFileResolve)(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>(0, _fileresolve.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)=>(0, _fileresolve.cssFileResolve)(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>(0, _fileresolve.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
|
||||
22
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/index.js
generated
vendored
Normal file
22
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && __export(require("./global")) && __export(require("./modules"));
|
||||
_export_star(require("./global"), exports);
|
||||
_export_star(require("./modules"), exports);
|
||||
function _export_star(from, to) {
|
||||
Object.keys(from).forEach(function(k) {
|
||||
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
||||
Object.defineProperty(to, k, {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return from[k];
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return from;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
84
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/modules.js
generated
vendored
Normal file
84
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/modules.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getCssModuleLoader", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getCssModuleLoader;
|
||||
}
|
||||
});
|
||||
const _client = require("./client");
|
||||
const _fileresolve = require("./file-resolve");
|
||||
const _getCssModuleLocalIdent = require("./getCssModuleLocalIdent");
|
||||
function getCssModuleLoader(ctx, postcss, preProcessors = []) {
|
||||
const loaders = [];
|
||||
if (ctx.isClient) {
|
||||
// Add appropriate development more or production mode style
|
||||
// loader
|
||||
loaders.push((0, _client.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)=>(0, _fileresolve.cssFileResolve)(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>(0, _fileresolve.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)=>(0, _fileresolve.cssFileResolve)(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>(0, _fileresolve.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.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
|
||||
62
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/next-font.js
generated
vendored
Normal file
62
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/next-font.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getNextFontLoader", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getNextFontLoader;
|
||||
}
|
||||
});
|
||||
const _client = require("./client");
|
||||
const _fileresolve = require("./file-resolve");
|
||||
function getNextFontLoader(ctx, postcss, fontLoaderPath) {
|
||||
const loaders = [];
|
||||
if (ctx.isClient) {
|
||||
// Add appropriate development mode or production mode style
|
||||
// loader
|
||||
loaders.push((0, _client.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)=>(0, _fileresolve.cssFileResolve)(url, resourcePath, ctx.experimental.urlImports),
|
||||
import: (url, _, resourcePath)=>(0, _fileresolve.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
|
||||
45
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/messages.js
generated
vendored
Normal file
45
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/messages.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
getCustomDocumentError: null,
|
||||
getGlobalImportError: null,
|
||||
getGlobalModuleImportError: null,
|
||||
getLocalModuleImportError: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
getCustomDocumentError: function() {
|
||||
return getCustomDocumentError;
|
||||
},
|
||||
getGlobalImportError: function() {
|
||||
return getGlobalImportError;
|
||||
},
|
||||
getGlobalModuleImportError: function() {
|
||||
return getGlobalModuleImportError;
|
||||
},
|
||||
getLocalModuleImportError: function() {
|
||||
return getLocalModuleImportError;
|
||||
}
|
||||
});
|
||||
const _picocolors = require("../../../../../lib/picocolors");
|
||||
function getGlobalImportError() {
|
||||
return `Global CSS ${(0, _picocolors.bold)("cannot")} be imported from files other than your ${(0, _picocolors.bold)("Custom <App>")}. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to ${(0, _picocolors.cyan)("pages/_app.js")}. Or convert the import to Component-Level CSS (CSS Modules).\nRead more: https://nextjs.org/docs/messages/css-global`;
|
||||
}
|
||||
function getGlobalModuleImportError() {
|
||||
return `Global CSS ${(0, _picocolors.bold)("cannot")} be imported from within ${(0, _picocolors.bold)("node_modules")}.\nRead more: https://nextjs.org/docs/messages/css-npm`;
|
||||
}
|
||||
function getLocalModuleImportError() {
|
||||
return `CSS Modules ${(0, _picocolors.bold)("cannot")} be imported from within ${(0, _picocolors.bold)("node_modules")}.\nRead more: https://nextjs.org/docs/messages/css-modules-npm`;
|
||||
}
|
||||
function getCustomDocumentError() {
|
||||
return `CSS ${(0, _picocolors.bold)("cannot")} be imported within ${(0, _picocolors.cyan)("pages/_document.js")}. Please move global styles to ${(0, _picocolors.cyan)("pages/_app.js")}.`;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=messages.js.map
|
||||
162
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js
generated
vendored
Normal file
162
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js
generated
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getPostCssPlugins", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getPostCssPlugins;
|
||||
}
|
||||
});
|
||||
const _picocolors = require("../../../../../lib/picocolors");
|
||||
const _findconfig = require("../../../../../lib/find-config");
|
||||
const genericErrorText = "Malformed PostCSS Configuration";
|
||||
function getError_NullConfig(pluginName) {
|
||||
return `${(0, _picocolors.red)((0, _picocolors.bold)("Error"))}: Your PostCSS configuration for '${pluginName}' cannot have ${(0, _picocolors.bold)("null")} configuration.\nTo disable '${pluginName}', pass ${(0, _picocolors.bold)("false")}, otherwise, pass ${(0, _picocolors.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(`${(0, _picocolors.yellow)((0, _picocolors.bold)("Warning"))}: Please remove the ${(0, _picocolors.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);
|
||||
}
|
||||
async function getPostCssPlugins(dir, supportedBrowsers, disablePostcssPresetEnv = false) {
|
||||
let config = await (0, _findconfig.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(`${(0, _picocolors.yellow)((0, _picocolors.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(`${(0, _picocolors.yellow)((0, _picocolors.bold)("Warning"))}: A ${(0, _picocolors.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(`${(0, _picocolors.red)((0, _picocolors.bold)("Error"))}: A PostCSS Plugin must be provided as a ${(0, _picocolors.bold)("string")}. Instead, we got: '${pluginName}'.\n` + "Read more: https://nextjs.org/docs/messages/postcss-shape");
|
||||
} else {
|
||||
console.error(`${(0, _picocolors.red)((0, _picocolors.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(`${(0, _picocolors.red)((0, _picocolors.bold)("Error"))}: A PostCSS Plugin was passed as a function using require(), but it must be provided as a ${(0, _picocolors.bold)("string")}.\nRead more: https://nextjs.org/docs/messages/postcss-shape`);
|
||||
throw new Error(genericErrorText);
|
||||
} else {
|
||||
console.error(`${(0, _picocolors.red)((0, _picocolors.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
|
||||
42
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/images/index.js
generated
vendored
Normal file
42
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/images/index.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "images", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return images;
|
||||
}
|
||||
});
|
||||
const _lodashcurry = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/lodash.curry"));
|
||||
const _webpackconfig = require("../../../../webpack-config");
|
||||
const _helpers = require("../../helpers");
|
||||
const _utils = require("../../utils");
|
||||
const _messages = require("./messages");
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
const images = (0, _lodashcurry.default)(async function images(_ctx, config) {
|
||||
const fns = [
|
||||
(0, _helpers.loader)({
|
||||
oneOf: [
|
||||
{
|
||||
test: _webpackconfig.nextImageLoaderRegex,
|
||||
use: {
|
||||
loader: "error-loader",
|
||||
options: {
|
||||
reason: (0, _messages.getCustomDocumentImageError)()
|
||||
}
|
||||
},
|
||||
issuer: /pages[\\/]_document\./
|
||||
}
|
||||
]
|
||||
})
|
||||
];
|
||||
const fn = (0, _utils.pipe)(...fns);
|
||||
return fn(config);
|
||||
});
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
16
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/images/messages.js
generated
vendored
Normal file
16
.next/standalone/node_modules/next/dist/build/webpack/config/blocks/images/messages.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "getCustomDocumentImageError", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return getCustomDocumentImageError;
|
||||
}
|
||||
});
|
||||
const _picocolors = require("../../../../../lib/picocolors");
|
||||
function getCustomDocumentImageError() {
|
||||
return `Images ${(0, _picocolors.bold)("cannot")} be imported within ${(0, _picocolors.cyan)("pages/_document.js")}. Please move image imports that need to be displayed on every page into ${(0, _picocolors.cyan)("pages/_app.js")}.\nRead more: https://nextjs.org/docs/messages/custom-document-image-import`;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=messages.js.map
|
||||
78
.next/standalone/node_modules/next/dist/build/webpack/config/helpers.js
generated
vendored
Normal file
78
.next/standalone/node_modules/next/dist/build/webpack/config/helpers.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
loader: null,
|
||||
plugin: null,
|
||||
unshiftLoader: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
loader: function() {
|
||||
return loader;
|
||||
},
|
||||
plugin: function() {
|
||||
return plugin;
|
||||
},
|
||||
unshiftLoader: function() {
|
||||
return unshiftLoader;
|
||||
}
|
||||
});
|
||||
const _lodashcurry = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/lodash.curry"));
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
const loader = (0, _lodashcurry.default)(function loader(rule, config) {
|
||||
var _config_module_rules;
|
||||
if (!config.module) {
|
||||
config.module = {
|
||||
rules: []
|
||||
};
|
||||
}
|
||||
if (rule.oneOf) {
|
||||
var _config_module_rules1;
|
||||
const existing = (_config_module_rules1 = config.module.rules) == null ? void 0 : _config_module_rules1.find((arrayRule)=>arrayRule && typeof arrayRule === "object" && arrayRule.oneOf);
|
||||
if (existing && typeof existing === "object") {
|
||||
existing.oneOf.push(...rule.oneOf);
|
||||
return config;
|
||||
}
|
||||
}
|
||||
(_config_module_rules = config.module.rules) == null ? void 0 : _config_module_rules.push(rule);
|
||||
return config;
|
||||
});
|
||||
const unshiftLoader = (0, _lodashcurry.default)(function unshiftLoader(rule, config) {
|
||||
var _config_module_rules;
|
||||
if (!config.module) {
|
||||
config.module = {
|
||||
rules: []
|
||||
};
|
||||
}
|
||||
if (rule.oneOf) {
|
||||
var _config_module_rules1;
|
||||
const existing = (_config_module_rules1 = config.module.rules) == null ? void 0 : _config_module_rules1.find((arrayRule)=>arrayRule && typeof arrayRule === "object" && arrayRule.oneOf);
|
||||
if (existing && typeof existing === "object") {
|
||||
var _existing_oneOf;
|
||||
(_existing_oneOf = existing.oneOf) == null ? void 0 : _existing_oneOf.unshift(...rule.oneOf);
|
||||
return config;
|
||||
}
|
||||
}
|
||||
(_config_module_rules = config.module.rules) == null ? void 0 : _config_module_rules.unshift(rule);
|
||||
return config;
|
||||
});
|
||||
const plugin = (0, _lodashcurry.default)(function plugin(p, config) {
|
||||
if (!config.plugins) {
|
||||
config.plugins = [];
|
||||
}
|
||||
config.plugins.push(p);
|
||||
return config;
|
||||
});
|
||||
|
||||
//# sourceMappingURL=helpers.js.map
|
||||
46
.next/standalone/node_modules/next/dist/build/webpack/config/index.js
generated
vendored
Normal file
46
.next/standalone/node_modules/next/dist/build/webpack/config/index.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "buildConfiguration", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return buildConfiguration;
|
||||
}
|
||||
});
|
||||
const _base = require("./blocks/base");
|
||||
const _css = require("./blocks/css");
|
||||
const _images = require("./blocks/images");
|
||||
const _utils = require("./utils");
|
||||
async function buildConfiguration(config, { hasAppDir, supportedBrowsers, rootDirectory, customAppFile, isDevelopment, isServer, isEdgeRuntime, targetWeb, assetPrefix, sassOptions, productionBrowserSourceMaps, future, transpilePackages, experimental, disableStaticImages, serverSourceMaps }) {
|
||||
const ctx = {
|
||||
hasAppDir,
|
||||
supportedBrowsers,
|
||||
rootDirectory,
|
||||
customAppFile,
|
||||
isDevelopment,
|
||||
isProduction: !isDevelopment,
|
||||
isServer,
|
||||
isEdgeRuntime,
|
||||
isClient: !isServer,
|
||||
targetWeb,
|
||||
assetPrefix: assetPrefix ? assetPrefix.endsWith("/") ? assetPrefix.slice(0, -1) : assetPrefix : "",
|
||||
sassOptions,
|
||||
productionBrowserSourceMaps,
|
||||
transpilePackages,
|
||||
future,
|
||||
experimental,
|
||||
serverSourceMaps: serverSourceMaps ?? false
|
||||
};
|
||||
let fns = [
|
||||
(0, _base.base)(ctx),
|
||||
(0, _css.css)(ctx)
|
||||
];
|
||||
if (!disableStaticImages) {
|
||||
fns.push((0, _images.images)(ctx));
|
||||
}
|
||||
const fn = (0, _utils.pipe)(...fns);
|
||||
return fn(config);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
13
.next/standalone/node_modules/next/dist/build/webpack/config/utils.js
generated
vendored
Normal file
13
.next/standalone/node_modules/next/dist/build/webpack/config/utils.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "pipe", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return pipe;
|
||||
}
|
||||
});
|
||||
const pipe = (...fns)=>(param)=>fns.reduce(async (result, next)=>next(await result), param);
|
||||
|
||||
//# sourceMappingURL=utils.js.map
|
||||
Reference in New Issue
Block a user