Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
5
my-app/node_modules/css-loader/dist/cjs.js
generated
vendored
Executable file
5
my-app/node_modules/css-loader/dist/cjs.js
generated
vendored
Executable file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
const loader = require("./index");
|
||||
module.exports = loader.default;
|
||||
module.exports.defaultGetLocalIdent = require("./utils").defaultGetLocalIdent;
|
176
my-app/node_modules/css-loader/dist/index.js
generated
vendored
Executable file
176
my-app/node_modules/css-loader/dist/index.js
generated
vendored
Executable file
|
@ -0,0 +1,176 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = loader;
|
||||
var _postcss = _interopRequireDefault(require("postcss"));
|
||||
var _package = _interopRequireDefault(require("postcss/package.json"));
|
||||
var _semver = require("semver");
|
||||
var _options = _interopRequireDefault(require("./options.json"));
|
||||
var _plugins = require("./plugins");
|
||||
var _utils = require("./utils");
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
|
||||
async function loader(content, map, meta) {
|
||||
const rawOptions = this.getOptions(_options.default);
|
||||
const callback = this.async();
|
||||
if (this._compiler && this._compiler.options && this._compiler.options.experiments && this._compiler.options.experiments.css && this._module && this._module.type === "css") {
|
||||
this.emitWarning(new Error('You can\'t use `experiments.css` (`experiments.futureDefaults` enable built-in CSS support by default) and `css-loader` together, please set `experiments.css` to `false` or set `{ type: "javascript/auto" }` for rules with `css-loader` in your webpack config (now css-loader does nothing).'));
|
||||
callback(null, content, map, meta);
|
||||
return;
|
||||
}
|
||||
let options;
|
||||
try {
|
||||
options = (0, _utils.normalizeOptions)(rawOptions, this);
|
||||
} catch (error) {
|
||||
callback(error);
|
||||
return;
|
||||
}
|
||||
const plugins = [];
|
||||
const replacements = [];
|
||||
const exports = [];
|
||||
if ((0, _utils.shouldUseModulesPlugins)(options)) {
|
||||
plugins.push(...(0, _utils.getModulesPlugins)(options, this));
|
||||
}
|
||||
const importPluginImports = [];
|
||||
const importPluginApi = [];
|
||||
let isSupportAbsoluteURL = false;
|
||||
|
||||
// TODO enable by default in the next major release
|
||||
if (this._compilation && this._compilation.options && this._compilation.options.experiments && this._compilation.options.experiments.buildHttp) {
|
||||
isSupportAbsoluteURL = true;
|
||||
}
|
||||
const isSupportDataURL = options.esModule && Boolean("fsStartTime" in this._compiler);
|
||||
if ((0, _utils.shouldUseImportPlugin)(options)) {
|
||||
plugins.push((0, _plugins.importParser)({
|
||||
isSupportAbsoluteURL: false,
|
||||
isSupportDataURL: false,
|
||||
isCSSStyleSheet: options.exportType === "css-style-sheet",
|
||||
loaderContext: this,
|
||||
imports: importPluginImports,
|
||||
api: importPluginApi,
|
||||
filter: options.import.filter,
|
||||
urlHandler: url => (0, _utils.stringifyRequest)(this, (0, _utils.combineRequests)((0, _utils.getPreRequester)(this)(options.importLoaders), url))
|
||||
}));
|
||||
}
|
||||
const urlPluginImports = [];
|
||||
if ((0, _utils.shouldUseURLPlugin)(options)) {
|
||||
const needToResolveURL = !options.esModule;
|
||||
plugins.push((0, _plugins.urlParser)({
|
||||
isSupportAbsoluteURL,
|
||||
isSupportDataURL,
|
||||
imports: urlPluginImports,
|
||||
replacements,
|
||||
context: this.context,
|
||||
rootContext: this.rootContext,
|
||||
filter: (0, _utils.getFilter)(options.url.filter, this.resourcePath),
|
||||
resolver: needToResolveURL ? this.getResolve({
|
||||
mainFiles: [],
|
||||
extensions: []
|
||||
}) :
|
||||
// eslint-disable-next-line no-undefined
|
||||
undefined,
|
||||
urlHandler: url => (0, _utils.stringifyRequest)(this, url)
|
||||
// Support data urls as input in new URL added in webpack@5.38.0
|
||||
}));
|
||||
}
|
||||
|
||||
const icssPluginImports = [];
|
||||
const icssPluginApi = [];
|
||||
const needToUseIcssPlugin = (0, _utils.shouldUseIcssPlugin)(options);
|
||||
if (needToUseIcssPlugin) {
|
||||
plugins.push((0, _plugins.icssParser)({
|
||||
loaderContext: this,
|
||||
imports: icssPluginImports,
|
||||
api: icssPluginApi,
|
||||
replacements,
|
||||
exports,
|
||||
urlHandler: url => (0, _utils.stringifyRequest)(this, (0, _utils.combineRequests)((0, _utils.getPreRequester)(this)(options.importLoaders), url))
|
||||
}));
|
||||
}
|
||||
|
||||
// Reuse CSS AST (PostCSS AST e.g 'postcss-loader') to avoid reparsing
|
||||
if (meta) {
|
||||
const {
|
||||
ast
|
||||
} = meta;
|
||||
if (ast && ast.type === "postcss" && (0, _semver.satisfies)(ast.version, `^${_package.default.version}`)) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
content = ast.root;
|
||||
}
|
||||
}
|
||||
const {
|
||||
resourcePath
|
||||
} = this;
|
||||
let result;
|
||||
try {
|
||||
result = await (0, _postcss.default)(plugins).process(content, {
|
||||
hideNothingWarning: true,
|
||||
from: resourcePath,
|
||||
to: resourcePath,
|
||||
map: options.sourceMap ? {
|
||||
prev: map ? (0, _utils.normalizeSourceMap)(map, resourcePath) : null,
|
||||
inline: false,
|
||||
annotation: false
|
||||
} : false
|
||||
});
|
||||
} catch (error) {
|
||||
if (error.file) {
|
||||
this.addDependency(error.file);
|
||||
}
|
||||
callback(error.name === "CssSyntaxError" ? (0, _utils.syntaxErrorFactory)(error) : error);
|
||||
return;
|
||||
}
|
||||
for (const warning of result.warnings()) {
|
||||
this.emitWarning((0, _utils.warningFactory)(warning));
|
||||
}
|
||||
const imports = [].concat(icssPluginImports.sort(_utils.sort)).concat(importPluginImports.sort(_utils.sort)).concat(urlPluginImports.sort(_utils.sort));
|
||||
const api = [].concat(importPluginApi.sort(_utils.sort)).concat(icssPluginApi.sort(_utils.sort));
|
||||
if (options.modules.exportOnlyLocals !== true) {
|
||||
imports.unshift({
|
||||
type: "api_import",
|
||||
importName: "___CSS_LOADER_API_IMPORT___",
|
||||
url: (0, _utils.stringifyRequest)(this, require.resolve("./runtime/api"))
|
||||
});
|
||||
if (options.sourceMap) {
|
||||
imports.unshift({
|
||||
importName: "___CSS_LOADER_API_SOURCEMAP_IMPORT___",
|
||||
url: (0, _utils.stringifyRequest)(this, require.resolve("./runtime/sourceMaps"))
|
||||
});
|
||||
} else {
|
||||
imports.unshift({
|
||||
importName: "___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___",
|
||||
url: (0, _utils.stringifyRequest)(this, require.resolve("./runtime/noSourceMaps"))
|
||||
});
|
||||
}
|
||||
}
|
||||
let isTemplateLiteralSupported = false;
|
||||
if (
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
this._compilation &&
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
this._compilation.options &&
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
this._compilation.options.output &&
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
this._compilation.options.output.environment &&
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
this._compilation.options.output.environment.templateLiteral) {
|
||||
isTemplateLiteralSupported = true;
|
||||
}
|
||||
const importCode = (0, _utils.getImportCode)(imports, options);
|
||||
let moduleCode;
|
||||
try {
|
||||
moduleCode = (0, _utils.getModuleCode)(result, api, replacements, options, isTemplateLiteralSupported, this);
|
||||
} catch (error) {
|
||||
callback(error);
|
||||
return;
|
||||
}
|
||||
const exportCode = (0, _utils.getExportCode)(exports, replacements, needToUseIcssPlugin, options, isTemplateLiteralSupported);
|
||||
callback(null, `${importCode}${moduleCode}${exportCode}`);
|
||||
}
|
209
my-app/node_modules/css-loader/dist/options.json
generated
vendored
Executable file
209
my-app/node_modules/css-loader/dist/options.json
generated
vendored
Executable file
|
@ -0,0 +1,209 @@
|
|||
{
|
||||
"title": "CSS Loader options",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "Allows to enables/disables `url()`/`image-set()` functions handling.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#url",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"filter": {
|
||||
"instanceof": "Function"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"import": {
|
||||
"description": "Allows to enables/disables `@import` at-rules handling.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#import",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"filter": {
|
||||
"instanceof": "Function"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"modules": {
|
||||
"description": "Allows to enable/disable CSS Modules or ICSS and setup configuration.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#modules",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"enum": ["local", "global", "pure", "icss"]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"auto": {
|
||||
"description": "Allows auto enable CSS modules based on filename.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#auto",
|
||||
"anyOf": [
|
||||
{
|
||||
"instanceof": "RegExp"
|
||||
},
|
||||
{
|
||||
"instanceof": "Function"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode": {
|
||||
"description": "Setup `mode` option.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#mode",
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": ["local", "global", "pure", "icss"]
|
||||
},
|
||||
{
|
||||
"instanceof": "Function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"localIdentName": {
|
||||
"description": "Allows to configure the generated local ident name.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#localidentname",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"localIdentContext": {
|
||||
"description": "Allows to redefine basic loader context for local ident name.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#localidentcontext",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"localIdentHashSalt": {
|
||||
"description": "Allows to add custom hash to generate more unique classes.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#localidenthashsalt",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"localIdentHashFunction": {
|
||||
"description": "Allows to specify hash function to generate classes.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#localidenthashfunction",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"localIdentHashDigest": {
|
||||
"description": "Allows to specify hash digest to generate classes.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#localidenthashdigest",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"localIdentHashDigestLength": {
|
||||
"description": "Allows to specify hash digest length to generate classes.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#localidenthashdigestlength",
|
||||
"type": "number"
|
||||
},
|
||||
"hashStrategy": {
|
||||
"description": "Allows to specify should localName be used when computing the hash.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#hashstrategy",
|
||||
"enum": ["resource-path-and-local-name", "minimal-subset"]
|
||||
},
|
||||
"localIdentRegExp": {
|
||||
"description": "Allows to specify custom RegExp for local ident name.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#localidentregexp",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
{
|
||||
"instanceof": "RegExp"
|
||||
}
|
||||
]
|
||||
},
|
||||
"getLocalIdent": {
|
||||
"description": "Allows to specify a function to generate the classname.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#getlocalident",
|
||||
"instanceof": "Function"
|
||||
},
|
||||
"namedExport": {
|
||||
"description": "Enables/disables ES modules named export for locals.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#namedexport",
|
||||
"type": "boolean"
|
||||
},
|
||||
"exportGlobals": {
|
||||
"description": "Allows to export names from global class or id, so you can use that as local name.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#exportglobals",
|
||||
"type": "boolean"
|
||||
},
|
||||
"exportLocalsConvention": {
|
||||
"description": "Style of exported classnames.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#localsconvention",
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": [
|
||||
"asIs",
|
||||
"camelCase",
|
||||
"camelCaseOnly",
|
||||
"dashes",
|
||||
"dashesOnly"
|
||||
]
|
||||
},
|
||||
{
|
||||
"instanceof": "Function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"exportOnlyLocals": {
|
||||
"description": "Export only locals.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#exportonlylocals",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceMap": {
|
||||
"description": "Allows to enable/disable source maps.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#sourcemap",
|
||||
"type": "boolean"
|
||||
},
|
||||
"importLoaders": {
|
||||
"description": "Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#importloaders",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
}
|
||||
]
|
||||
},
|
||||
"esModule": {
|
||||
"description": "Use the ES modules syntax.",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#esmodule",
|
||||
"type": "boolean"
|
||||
},
|
||||
"exportType": {
|
||||
"description": "Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).",
|
||||
"link": "https://github.com/webpack-contrib/css-loader#exporttype",
|
||||
"enum": ["array", "string", "css-style-sheet"]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
27
my-app/node_modules/css-loader/dist/plugins/index.js
generated
vendored
Executable file
27
my-app/node_modules/css-loader/dist/plugins/index.js
generated
vendored
Executable file
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "icssParser", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _postcssIcssParser.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "importParser", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _postcssImportParser.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "urlParser", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _postcssUrlParser.default;
|
||||
}
|
||||
});
|
||||
var _postcssImportParser = _interopRequireDefault(require("./postcss-import-parser"));
|
||||
var _postcssIcssParser = _interopRequireDefault(require("./postcss-icss-parser"));
|
||||
var _postcssUrlParser = _interopRequireDefault(require("./postcss-url-parser"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
114
my-app/node_modules/css-loader/dist/plugins/postcss-icss-parser.js
generated
vendored
Executable file
114
my-app/node_modules/css-loader/dist/plugins/postcss-icss-parser.js
generated
vendored
Executable file
|
@ -0,0 +1,114 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _icssUtils = require("icss-utils");
|
||||
var _utils = require("../utils");
|
||||
const plugin = (options = {}) => {
|
||||
return {
|
||||
postcssPlugin: "postcss-icss-parser",
|
||||
async OnceExit(root) {
|
||||
const importReplacements = Object.create(null);
|
||||
const {
|
||||
icssImports,
|
||||
icssExports
|
||||
} = (0, _icssUtils.extractICSS)(root);
|
||||
const imports = new Map();
|
||||
const tasks = [];
|
||||
const {
|
||||
loaderContext
|
||||
} = options;
|
||||
const resolver = loaderContext.getResolve({
|
||||
dependencyType: "icss",
|
||||
conditionNames: ["style"],
|
||||
extensions: ["..."],
|
||||
mainFields: ["css", "style", "main", "..."],
|
||||
mainFiles: ["index", "..."],
|
||||
preferRelative: true
|
||||
});
|
||||
|
||||
// eslint-disable-next-line guard-for-in
|
||||
for (const url in icssImports) {
|
||||
const tokens = icssImports[url];
|
||||
if (Object.keys(tokens).length === 0) {
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
let normalizedUrl = url;
|
||||
let prefix = "";
|
||||
const queryParts = normalizedUrl.split("!");
|
||||
if (queryParts.length > 1) {
|
||||
normalizedUrl = queryParts.pop();
|
||||
prefix = queryParts.join("!");
|
||||
}
|
||||
const request = (0, _utils.requestify)((0, _utils.normalizeUrl)(normalizedUrl, true), loaderContext.rootContext);
|
||||
const doResolve = async () => {
|
||||
const resolvedUrl = await (0, _utils.resolveRequests)(resolver, loaderContext.context, [...new Set([normalizedUrl, request])]);
|
||||
if (!resolvedUrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return {
|
||||
url: resolvedUrl,
|
||||
prefix,
|
||||
tokens
|
||||
};
|
||||
};
|
||||
tasks.push(doResolve());
|
||||
}
|
||||
const results = await Promise.all(tasks);
|
||||
for (let index = 0; index <= results.length - 1; index++) {
|
||||
const item = results[index];
|
||||
if (!item) {
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
const newUrl = item.prefix ? `${item.prefix}!${item.url}` : item.url;
|
||||
const importKey = newUrl;
|
||||
let importName = imports.get(importKey);
|
||||
if (!importName) {
|
||||
importName = `___CSS_LOADER_ICSS_IMPORT_${imports.size}___`;
|
||||
imports.set(importKey, importName);
|
||||
options.imports.push({
|
||||
type: "icss_import",
|
||||
importName,
|
||||
url: options.urlHandler(newUrl),
|
||||
icss: true,
|
||||
index
|
||||
});
|
||||
options.api.push({
|
||||
importName,
|
||||
dedupe: true,
|
||||
index
|
||||
});
|
||||
}
|
||||
for (const [replacementIndex, token] of Object.keys(item.tokens).entries()) {
|
||||
const replacementName = `___CSS_LOADER_ICSS_IMPORT_${index}_REPLACEMENT_${replacementIndex}___`;
|
||||
const localName = item.tokens[token];
|
||||
importReplacements[token] = replacementName;
|
||||
options.replacements.push({
|
||||
replacementName,
|
||||
importName,
|
||||
localName
|
||||
});
|
||||
}
|
||||
}
|
||||
if (Object.keys(importReplacements).length > 0) {
|
||||
(0, _icssUtils.replaceSymbols)(root, importReplacements);
|
||||
}
|
||||
for (const name of Object.keys(icssExports)) {
|
||||
const value = (0, _icssUtils.replaceValueSymbols)(icssExports[name], importReplacements);
|
||||
options.exports.push({
|
||||
name,
|
||||
value
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
plugin.postcss = true;
|
||||
var _default = plugin;
|
||||
exports.default = _default;
|
283
my-app/node_modules/css-loader/dist/plugins/postcss-import-parser.js
generated
vendored
Executable file
283
my-app/node_modules/css-loader/dist/plugins/postcss-import-parser.js
generated
vendored
Executable file
|
@ -0,0 +1,283 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
|
||||
var _utils = require("../utils");
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
function parseNode(atRule, key, options) {
|
||||
// Convert only top-level @import
|
||||
if (atRule.parent.type !== "root") {
|
||||
return;
|
||||
}
|
||||
if (atRule.raws && atRule.raws.afterName && atRule.raws.afterName.trim().length > 0) {
|
||||
const lastCommentIndex = atRule.raws.afterName.lastIndexOf("/*");
|
||||
const matched = atRule.raws.afterName.slice(lastCommentIndex).match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
|
||||
if (matched && matched[2] === "true") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const prevNode = atRule.prev();
|
||||
if (prevNode && prevNode.type === "comment") {
|
||||
const matched = prevNode.text.match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
|
||||
if (matched && matched[2] === "true") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Nodes do not exists - `@import url('http://') :root {}`
|
||||
if (atRule.nodes) {
|
||||
const error = new Error("It looks like you didn't end your @import statement correctly. Child nodes are attached to it.");
|
||||
error.node = atRule;
|
||||
throw error;
|
||||
}
|
||||
const rawParams = atRule.raws && atRule.raws[key] && typeof atRule.raws[key].raw !== "undefined" ? atRule.raws[key].raw : atRule[key];
|
||||
const {
|
||||
nodes: paramsNodes
|
||||
} = (0, _postcssValueParser.default)(rawParams);
|
||||
|
||||
// No nodes - `@import ;`
|
||||
// Invalid type - `@import foo-bar;`
|
||||
if (paramsNodes.length === 0 || paramsNodes[0].type !== "string" && paramsNodes[0].type !== "function") {
|
||||
const error = new Error(`Unable to find uri in "${atRule.toString()}"`);
|
||||
error.node = atRule;
|
||||
throw error;
|
||||
}
|
||||
let isStringValue;
|
||||
let url;
|
||||
if (paramsNodes[0].type === "string") {
|
||||
isStringValue = true;
|
||||
url = paramsNodes[0].value;
|
||||
} else {
|
||||
// Invalid function - `@import nourl(test.css);`
|
||||
if (paramsNodes[0].value.toLowerCase() !== "url") {
|
||||
const error = new Error(`Unable to find uri in "${atRule.toString()}"`);
|
||||
error.node = atRule;
|
||||
throw error;
|
||||
}
|
||||
isStringValue = paramsNodes[0].nodes.length !== 0 && paramsNodes[0].nodes[0].type === "string";
|
||||
url = isStringValue ? paramsNodes[0].nodes[0].value : _postcssValueParser.default.stringify(paramsNodes[0].nodes);
|
||||
}
|
||||
url = (0, _utils.normalizeUrl)(url, isStringValue);
|
||||
const {
|
||||
requestable,
|
||||
needResolve
|
||||
} = (0, _utils.isURLRequestable)(url, options);
|
||||
let prefix;
|
||||
if (requestable && needResolve) {
|
||||
const queryParts = url.split("!");
|
||||
if (queryParts.length > 1) {
|
||||
url = queryParts.pop();
|
||||
prefix = queryParts.join("!");
|
||||
}
|
||||
}
|
||||
|
||||
// Empty url - `@import "";` or `@import url();`
|
||||
if (url.trim().length === 0) {
|
||||
const error = new Error(`Unable to find uri in "${atRule.toString()}"`);
|
||||
error.node = atRule;
|
||||
throw error;
|
||||
}
|
||||
const additionalNodes = paramsNodes.slice(1);
|
||||
let supports;
|
||||
let layer;
|
||||
let media;
|
||||
if (additionalNodes.length > 0) {
|
||||
let nodes = [];
|
||||
for (const node of additionalNodes) {
|
||||
nodes.push(node);
|
||||
const isLayerFunction = node.type === "function" && node.value.toLowerCase() === "layer";
|
||||
const isLayerWord = node.type === "word" && node.value.toLowerCase() === "layer";
|
||||
if (isLayerFunction || isLayerWord) {
|
||||
if (isLayerFunction) {
|
||||
nodes.splice(nodes.length - 1, 1, ...node.nodes);
|
||||
} else {
|
||||
nodes.splice(nodes.length - 1, 1, {
|
||||
type: "string",
|
||||
value: "",
|
||||
unclosed: false
|
||||
});
|
||||
}
|
||||
layer = _postcssValueParser.default.stringify(nodes).trim().toLowerCase();
|
||||
nodes = [];
|
||||
} else if (node.type === "function" && node.value.toLowerCase() === "supports") {
|
||||
nodes.splice(nodes.length - 1, 1, ...node.nodes);
|
||||
supports = _postcssValueParser.default.stringify(nodes).trim().toLowerCase();
|
||||
nodes = [];
|
||||
}
|
||||
}
|
||||
if (nodes.length > 0) {
|
||||
media = _postcssValueParser.default.stringify(nodes).trim().toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return {
|
||||
atRule,
|
||||
prefix,
|
||||
url,
|
||||
layer,
|
||||
supports,
|
||||
media,
|
||||
requestable,
|
||||
needResolve
|
||||
};
|
||||
}
|
||||
const plugin = (options = {}) => {
|
||||
return {
|
||||
postcssPlugin: "postcss-import-parser",
|
||||
prepare(result) {
|
||||
const parsedAtRules = [];
|
||||
return {
|
||||
AtRule: {
|
||||
import(atRule) {
|
||||
if (options.isCSSStyleSheet) {
|
||||
options.loaderContext.emitError(new Error(atRule.error("'@import' rules are not allowed here and will not be processed").message));
|
||||
return;
|
||||
}
|
||||
const {
|
||||
isSupportDataURL,
|
||||
isSupportAbsoluteURL
|
||||
} = options;
|
||||
let parsedAtRule;
|
||||
try {
|
||||
parsedAtRule = parseNode(atRule, "params", {
|
||||
isSupportAbsoluteURL,
|
||||
isSupportDataURL
|
||||
});
|
||||
} catch (error) {
|
||||
result.warn(error.message, {
|
||||
node: error.node
|
||||
});
|
||||
}
|
||||
if (!parsedAtRule) {
|
||||
return;
|
||||
}
|
||||
parsedAtRules.push(parsedAtRule);
|
||||
}
|
||||
},
|
||||
async OnceExit() {
|
||||
if (parsedAtRules.length === 0) {
|
||||
return;
|
||||
}
|
||||
const {
|
||||
loaderContext
|
||||
} = options;
|
||||
const resolver = loaderContext.getResolve({
|
||||
dependencyType: "css",
|
||||
conditionNames: ["style"],
|
||||
mainFields: ["css", "style", "main", "..."],
|
||||
mainFiles: ["index", "..."],
|
||||
extensions: [".css", "..."],
|
||||
preferRelative: true
|
||||
});
|
||||
const resolvedAtRules = await Promise.all(parsedAtRules.map(async parsedAtRule => {
|
||||
const {
|
||||
atRule,
|
||||
requestable,
|
||||
needResolve,
|
||||
prefix,
|
||||
url,
|
||||
layer,
|
||||
supports,
|
||||
media
|
||||
} = parsedAtRule;
|
||||
if (options.filter) {
|
||||
const needKeep = await options.filter(url, media, loaderContext.resourcePath, supports, layer);
|
||||
if (!needKeep) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (needResolve) {
|
||||
const request = (0, _utils.requestify)(url, loaderContext.rootContext);
|
||||
const resolvedUrl = await (0, _utils.resolveRequests)(resolver, loaderContext.context, [...new Set([request, url])]);
|
||||
if (!resolvedUrl) {
|
||||
return;
|
||||
}
|
||||
if (resolvedUrl === loaderContext.resourcePath) {
|
||||
atRule.remove();
|
||||
return;
|
||||
}
|
||||
atRule.remove();
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return {
|
||||
url: resolvedUrl,
|
||||
layer,
|
||||
supports,
|
||||
media,
|
||||
prefix,
|
||||
requestable
|
||||
};
|
||||
}
|
||||
atRule.remove();
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return {
|
||||
url,
|
||||
layer,
|
||||
supports,
|
||||
media,
|
||||
prefix,
|
||||
requestable
|
||||
};
|
||||
}));
|
||||
const urlToNameMap = new Map();
|
||||
for (let index = 0; index <= resolvedAtRules.length - 1; index++) {
|
||||
const resolvedAtRule = resolvedAtRules[index];
|
||||
if (!resolvedAtRule) {
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
const {
|
||||
url,
|
||||
requestable,
|
||||
layer,
|
||||
supports,
|
||||
media
|
||||
} = resolvedAtRule;
|
||||
if (!requestable) {
|
||||
options.api.push({
|
||||
url,
|
||||
layer,
|
||||
supports,
|
||||
media,
|
||||
index
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
const {
|
||||
prefix
|
||||
} = resolvedAtRule;
|
||||
const newUrl = prefix ? `${prefix}!${url}` : url;
|
||||
let importName = urlToNameMap.get(newUrl);
|
||||
if (!importName) {
|
||||
importName = `___CSS_LOADER_AT_RULE_IMPORT_${urlToNameMap.size}___`;
|
||||
urlToNameMap.set(newUrl, importName);
|
||||
options.imports.push({
|
||||
type: "rule_import",
|
||||
importName,
|
||||
url: options.urlHandler(newUrl),
|
||||
index
|
||||
});
|
||||
}
|
||||
options.api.push({
|
||||
importName,
|
||||
layer,
|
||||
supports,
|
||||
media,
|
||||
index
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
plugin.postcss = true;
|
||||
var _default = plugin;
|
||||
exports.default = _default;
|
357
my-app/node_modules/css-loader/dist/plugins/postcss-url-parser.js
generated
vendored
Executable file
357
my-app/node_modules/css-loader/dist/plugins/postcss-url-parser.js
generated
vendored
Executable file
|
@ -0,0 +1,357 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
|
||||
var _utils = require("../utils");
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
const isUrlFunc = /url/i;
|
||||
const isImageSetFunc = /^(?:-webkit-)?image-set$/i;
|
||||
const needParseDeclaration = /(?:url|(?:-webkit-)?image-set)\(/i;
|
||||
function getNodeFromUrlFunc(node) {
|
||||
return node.nodes && node.nodes[0];
|
||||
}
|
||||
function getWebpackIgnoreCommentValue(index, nodes, inBetween) {
|
||||
if (index === 0 && typeof inBetween !== "undefined") {
|
||||
return inBetween;
|
||||
}
|
||||
let prevValueNode = nodes[index - 1];
|
||||
if (!prevValueNode) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return;
|
||||
}
|
||||
if (prevValueNode.type === "space") {
|
||||
if (!nodes[index - 2]) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return;
|
||||
}
|
||||
prevValueNode = nodes[index - 2];
|
||||
}
|
||||
if (prevValueNode.type !== "comment") {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return;
|
||||
}
|
||||
const matched = prevValueNode.value.match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
|
||||
return matched && matched[2] === "true";
|
||||
}
|
||||
function shouldHandleURL(url, declaration, result, options) {
|
||||
if (url.length === 0) {
|
||||
result.warn(`Unable to find uri in '${declaration.toString()}'`, {
|
||||
node: declaration
|
||||
});
|
||||
return {
|
||||
requestable: false,
|
||||
needResolve: false
|
||||
};
|
||||
}
|
||||
return (0, _utils.isURLRequestable)(url, options);
|
||||
}
|
||||
function parseDeclaration(declaration, key, result, options) {
|
||||
if (!needParseDeclaration.test(declaration[key])) {
|
||||
return;
|
||||
}
|
||||
const parsed = (0, _postcssValueParser.default)(declaration.raws && declaration.raws.value && declaration.raws.value.raw ? declaration.raws.value.raw : declaration[key]);
|
||||
let inBetween;
|
||||
if (declaration.raws && declaration.raws.between) {
|
||||
const lastCommentIndex = declaration.raws.between.lastIndexOf("/*");
|
||||
const matched = declaration.raws.between.slice(lastCommentIndex).match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
|
||||
if (matched) {
|
||||
inBetween = matched[2] === "true";
|
||||
}
|
||||
}
|
||||
let isIgnoreOnDeclaration = false;
|
||||
const prevNode = declaration.prev();
|
||||
if (prevNode && prevNode.type === "comment") {
|
||||
const matched = prevNode.text.match(_utils.WEBPACK_IGNORE_COMMENT_REGEXP);
|
||||
if (matched) {
|
||||
isIgnoreOnDeclaration = matched[2] === "true";
|
||||
}
|
||||
}
|
||||
let needIgnore;
|
||||
const parsedURLs = [];
|
||||
parsed.walk((valueNode, index, valueNodes) => {
|
||||
if (valueNode.type !== "function") {
|
||||
return;
|
||||
}
|
||||
if (isUrlFunc.test(valueNode.value)) {
|
||||
needIgnore = getWebpackIgnoreCommentValue(index, valueNodes, inBetween);
|
||||
if (isIgnoreOnDeclaration && typeof needIgnore === "undefined" || needIgnore) {
|
||||
if (needIgnore) {
|
||||
// eslint-disable-next-line no-undefined
|
||||
needIgnore = undefined;
|
||||
}
|
||||
return;
|
||||
}
|
||||
const {
|
||||
nodes
|
||||
} = valueNode;
|
||||
const isStringValue = nodes.length !== 0 && nodes[0].type === "string";
|
||||
let url = isStringValue ? nodes[0].value : _postcssValueParser.default.stringify(nodes);
|
||||
url = (0, _utils.normalizeUrl)(url, isStringValue);
|
||||
const {
|
||||
requestable,
|
||||
needResolve
|
||||
} = shouldHandleURL(url, declaration, result, options);
|
||||
|
||||
// Do not traverse inside `url`
|
||||
if (!requestable) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return false;
|
||||
}
|
||||
const queryParts = url.split("!");
|
||||
let prefix;
|
||||
if (queryParts.length > 1) {
|
||||
url = queryParts.pop();
|
||||
prefix = queryParts.join("!");
|
||||
}
|
||||
parsedURLs.push({
|
||||
declaration,
|
||||
parsed,
|
||||
node: getNodeFromUrlFunc(valueNode),
|
||||
prefix,
|
||||
url,
|
||||
needQuotes: false,
|
||||
needResolve
|
||||
});
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return false;
|
||||
} else if (isImageSetFunc.test(valueNode.value)) {
|
||||
for (const [innerIndex, nNode] of valueNode.nodes.entries()) {
|
||||
const {
|
||||
type,
|
||||
value
|
||||
} = nNode;
|
||||
if (type === "function" && isUrlFunc.test(value)) {
|
||||
needIgnore = getWebpackIgnoreCommentValue(innerIndex, valueNode.nodes);
|
||||
if (isIgnoreOnDeclaration && typeof needIgnore === "undefined" || needIgnore) {
|
||||
if (needIgnore) {
|
||||
// eslint-disable-next-line no-undefined
|
||||
needIgnore = undefined;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
const {
|
||||
nodes
|
||||
} = nNode;
|
||||
const isStringValue = nodes.length !== 0 && nodes[0].type === "string";
|
||||
let url = isStringValue ? nodes[0].value : _postcssValueParser.default.stringify(nodes);
|
||||
url = (0, _utils.normalizeUrl)(url, isStringValue);
|
||||
const {
|
||||
requestable,
|
||||
needResolve
|
||||
} = shouldHandleURL(url, declaration, result, options);
|
||||
|
||||
// Do not traverse inside `url`
|
||||
if (!requestable) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return false;
|
||||
}
|
||||
const queryParts = url.split("!");
|
||||
let prefix;
|
||||
if (queryParts.length > 1) {
|
||||
url = queryParts.pop();
|
||||
prefix = queryParts.join("!");
|
||||
}
|
||||
parsedURLs.push({
|
||||
declaration,
|
||||
parsed,
|
||||
node: getNodeFromUrlFunc(nNode),
|
||||
prefix,
|
||||
url,
|
||||
needQuotes: false,
|
||||
needResolve
|
||||
});
|
||||
} else if (type === "string") {
|
||||
needIgnore = getWebpackIgnoreCommentValue(innerIndex, valueNode.nodes);
|
||||
if (isIgnoreOnDeclaration && typeof needIgnore === "undefined" || needIgnore) {
|
||||
if (needIgnore) {
|
||||
// eslint-disable-next-line no-undefined
|
||||
needIgnore = undefined;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
let url = (0, _utils.normalizeUrl)(value, true);
|
||||
const {
|
||||
requestable,
|
||||
needResolve
|
||||
} = shouldHandleURL(url, declaration, result, options);
|
||||
|
||||
// Do not traverse inside `url`
|
||||
if (!requestable) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return false;
|
||||
}
|
||||
const queryParts = url.split("!");
|
||||
let prefix;
|
||||
if (queryParts.length > 1) {
|
||||
url = queryParts.pop();
|
||||
prefix = queryParts.join("!");
|
||||
}
|
||||
parsedURLs.push({
|
||||
declaration,
|
||||
parsed,
|
||||
node: nNode,
|
||||
prefix,
|
||||
url,
|
||||
needQuotes: true,
|
||||
needResolve
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Do not traverse inside `image-set`
|
||||
// eslint-disable-next-line consistent-return
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return parsedURLs;
|
||||
}
|
||||
const plugin = (options = {}) => {
|
||||
return {
|
||||
postcssPlugin: "postcss-url-parser",
|
||||
prepare(result) {
|
||||
const parsedDeclarations = [];
|
||||
return {
|
||||
Declaration(declaration) {
|
||||
const {
|
||||
isSupportDataURL,
|
||||
isSupportAbsoluteURL
|
||||
} = options;
|
||||
const parsedURL = parseDeclaration(declaration, "value", result, {
|
||||
isSupportDataURL,
|
||||
isSupportAbsoluteURL
|
||||
});
|
||||
if (!parsedURL) {
|
||||
return;
|
||||
}
|
||||
parsedDeclarations.push(...parsedURL);
|
||||
},
|
||||
async OnceExit() {
|
||||
if (parsedDeclarations.length === 0) {
|
||||
return;
|
||||
}
|
||||
const resolvedDeclarations = await Promise.all(parsedDeclarations.map(async parsedDeclaration => {
|
||||
const {
|
||||
url,
|
||||
needResolve
|
||||
} = parsedDeclaration;
|
||||
if (options.filter) {
|
||||
const needKeep = await options.filter(url);
|
||||
if (!needKeep) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!needResolve) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return parsedDeclaration;
|
||||
}
|
||||
const splittedUrl = url.split(/(\?)?#/);
|
||||
const [pathname, query, hashOrQuery] = splittedUrl;
|
||||
let hash = query ? "?" : "";
|
||||
hash += hashOrQuery ? `#${hashOrQuery}` : "";
|
||||
const {
|
||||
resolver,
|
||||
rootContext
|
||||
} = options;
|
||||
const request = (0, _utils.requestify)(pathname, rootContext, Boolean(resolver));
|
||||
if (!resolver) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return {
|
||||
...parsedDeclaration,
|
||||
url: request,
|
||||
hash
|
||||
};
|
||||
}
|
||||
const resolvedURL = await (0, _utils.resolveRequests)(resolver, options.context, [...new Set([request, url])]);
|
||||
if (!resolvedURL) {
|
||||
// eslint-disable-next-line consistent-return
|
||||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
return {
|
||||
...parsedDeclaration,
|
||||
url: resolvedURL,
|
||||
hash
|
||||
};
|
||||
}));
|
||||
const urlToNameMap = new Map();
|
||||
const urlToReplacementMap = new Map();
|
||||
let hasUrlImportHelper = false;
|
||||
for (let index = 0; index <= resolvedDeclarations.length - 1; index++) {
|
||||
const item = resolvedDeclarations[index];
|
||||
if (!item) {
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
if (!hasUrlImportHelper) {
|
||||
options.imports.push({
|
||||
type: "get_url_import",
|
||||
importName: "___CSS_LOADER_GET_URL_IMPORT___",
|
||||
url: options.urlHandler(require.resolve("../runtime/getUrl.js")),
|
||||
index: -1
|
||||
});
|
||||
hasUrlImportHelper = true;
|
||||
}
|
||||
const {
|
||||
url,
|
||||
prefix
|
||||
} = item;
|
||||
const newUrl = prefix ? `${prefix}!${url}` : url;
|
||||
let importName = urlToNameMap.get(newUrl);
|
||||
if (!importName) {
|
||||
importName = `___CSS_LOADER_URL_IMPORT_${urlToNameMap.size}___`;
|
||||
urlToNameMap.set(newUrl, importName);
|
||||
options.imports.push({
|
||||
type: "url",
|
||||
importName,
|
||||
url: options.resolver ? options.urlHandler(newUrl) : JSON.stringify(newUrl),
|
||||
index
|
||||
});
|
||||
}
|
||||
const {
|
||||
hash,
|
||||
needQuotes
|
||||
} = item;
|
||||
const replacementKey = JSON.stringify({
|
||||
newUrl,
|
||||
hash,
|
||||
needQuotes
|
||||
});
|
||||
let replacementName = urlToReplacementMap.get(replacementKey);
|
||||
if (!replacementName) {
|
||||
replacementName = `___CSS_LOADER_URL_REPLACEMENT_${urlToReplacementMap.size}___`;
|
||||
urlToReplacementMap.set(replacementKey, replacementName);
|
||||
options.replacements.push({
|
||||
replacementName,
|
||||
importName,
|
||||
hash,
|
||||
needQuotes
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
item.node.type = "word";
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
item.node.value = replacementName;
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
item.declaration.value = item.parsed.toString();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
plugin.postcss = true;
|
||||
var _default = plugin;
|
||||
exports.default = _default;
|
85
my-app/node_modules/css-loader/dist/runtime/api.js
generated
vendored
Executable file
85
my-app/node_modules/css-loader/dist/runtime/api.js
generated
vendored
Executable file
|
@ -0,0 +1,85 @@
|
|||
"use strict";
|
||||
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
module.exports = function (cssWithMappingToString) {
|
||||
var list = [];
|
||||
|
||||
// return the list of modules as css string
|
||||
list.toString = function toString() {
|
||||
return this.map(function (item) {
|
||||
var content = "";
|
||||
var needLayer = typeof item[5] !== "undefined";
|
||||
if (item[4]) {
|
||||
content += "@supports (".concat(item[4], ") {");
|
||||
}
|
||||
if (item[2]) {
|
||||
content += "@media ".concat(item[2], " {");
|
||||
}
|
||||
if (needLayer) {
|
||||
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
|
||||
}
|
||||
content += cssWithMappingToString(item);
|
||||
if (needLayer) {
|
||||
content += "}";
|
||||
}
|
||||
if (item[2]) {
|
||||
content += "}";
|
||||
}
|
||||
if (item[4]) {
|
||||
content += "}";
|
||||
}
|
||||
return content;
|
||||
}).join("");
|
||||
};
|
||||
|
||||
// import a list of modules into the list
|
||||
list.i = function i(modules, media, dedupe, supports, layer) {
|
||||
if (typeof modules === "string") {
|
||||
modules = [[null, modules, undefined]];
|
||||
}
|
||||
var alreadyImportedModules = {};
|
||||
if (dedupe) {
|
||||
for (var k = 0; k < this.length; k++) {
|
||||
var id = this[k][0];
|
||||
if (id != null) {
|
||||
alreadyImportedModules[id] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var _k = 0; _k < modules.length; _k++) {
|
||||
var item = [].concat(modules[_k]);
|
||||
if (dedupe && alreadyImportedModules[item[0]]) {
|
||||
continue;
|
||||
}
|
||||
if (typeof layer !== "undefined") {
|
||||
if (typeof item[5] === "undefined") {
|
||||
item[5] = layer;
|
||||
} else {
|
||||
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
|
||||
item[5] = layer;
|
||||
}
|
||||
}
|
||||
if (media) {
|
||||
if (!item[2]) {
|
||||
item[2] = media;
|
||||
} else {
|
||||
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
|
||||
item[2] = media;
|
||||
}
|
||||
}
|
||||
if (supports) {
|
||||
if (!item[4]) {
|
||||
item[4] = "".concat(supports);
|
||||
} else {
|
||||
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
|
||||
item[4] = supports;
|
||||
}
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
};
|
||||
return list;
|
||||
};
|
26
my-app/node_modules/css-loader/dist/runtime/getUrl.js
generated
vendored
Executable file
26
my-app/node_modules/css-loader/dist/runtime/getUrl.js
generated
vendored
Executable file
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (url, options) {
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
if (!url) {
|
||||
return url;
|
||||
}
|
||||
url = String(url.__esModule ? url.default : url);
|
||||
|
||||
// If url is already wrapped in quotes, remove them
|
||||
if (/^['"].*['"]$/.test(url)) {
|
||||
url = url.slice(1, -1);
|
||||
}
|
||||
if (options.hash) {
|
||||
url += options.hash;
|
||||
}
|
||||
|
||||
// Should url be wrapped?
|
||||
// See https://drafts.csswg.org/css-values-3/#urls
|
||||
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
||||
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
||||
}
|
||||
return url;
|
||||
};
|
5
my-app/node_modules/css-loader/dist/runtime/noSourceMaps.js
generated
vendored
Executable file
5
my-app/node_modules/css-loader/dist/runtime/noSourceMaps.js
generated
vendored
Executable file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (i) {
|
||||
return i[1];
|
||||
};
|
16
my-app/node_modules/css-loader/dist/runtime/sourceMaps.js
generated
vendored
Executable file
16
my-app/node_modules/css-loader/dist/runtime/sourceMaps.js
generated
vendored
Executable file
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (item) {
|
||||
var content = item[1];
|
||||
var cssMapping = item[3];
|
||||
if (!cssMapping) {
|
||||
return content;
|
||||
}
|
||||
if (typeof btoa === "function") {
|
||||
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
|
||||
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
||||
var sourceMapping = "/*# ".concat(data, " */");
|
||||
return [content].concat([sourceMapping]).join("\n");
|
||||
}
|
||||
return [content].join("\n");
|
||||
};
|
1049
my-app/node_modules/css-loader/dist/utils.js
generated
vendored
Executable file
1049
my-app/node_modules/css-loader/dist/utils.js
generated
vendored
Executable file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue