first commit

This commit is contained in:
jefferyzhao
2025-07-31 17:44:12 +08:00
commit b9bdc8598b
42390 changed files with 4467935 additions and 0 deletions

6
node_modules/file-loader/dist/cjs.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
"use strict";
const loader = require('./index');
module.exports = loader.default;
module.exports.raw = loader.raw;

67
node_modules/file-loader/dist/index.js generated vendored Normal file
View File

@ -0,0 +1,67 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = loader;
exports.raw = void 0;
var _path = _interopRequireDefault(require("path"));
var _loaderUtils = _interopRequireDefault(require("loader-utils"));
var _schemaUtils = _interopRequireDefault(require("schema-utils"));
var _options = _interopRequireDefault(require("./options.json"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function loader(content) {
const options = _loaderUtils.default.getOptions(this) || {};
(0, _schemaUtils.default)(_options.default, options, {
name: 'File Loader',
baseDataPath: 'options'
});
const context = options.context || this.rootContext;
const url = _loaderUtils.default.interpolateName(this, options.name || '[contenthash].[ext]', {
context,
content,
regExp: options.regExp
});
let outputPath = url;
if (options.outputPath) {
if (typeof options.outputPath === 'function') {
outputPath = options.outputPath(url, this.resourcePath, context);
} else {
outputPath = _path.default.posix.join(options.outputPath, url);
}
}
let publicPath = `__webpack_public_path__ + ${JSON.stringify(outputPath)}`;
if (options.publicPath) {
if (typeof options.publicPath === 'function') {
publicPath = options.publicPath(url, this.resourcePath, context);
} else {
publicPath = `${options.publicPath.endsWith('/') ? options.publicPath : `${options.publicPath}/`}${url}`;
}
publicPath = JSON.stringify(publicPath);
}
if (options.postTransformPublicPath) {
publicPath = options.postTransformPublicPath(publicPath);
}
if (typeof options.emitFile === 'undefined' || options.emitFile) {
this.emitFile(outputPath, content);
}
return `${options.esModules ? 'export default' : 'module.exports ='} ${publicPath};`;
}
const raw = true;
exports.raw = raw;

65
node_modules/file-loader/dist/options.json generated vendored Normal file
View File

@ -0,0 +1,65 @@
{
"additionalProperties": true,
"properties": {
"name": {
"description": "The filename template for the target file(s) (https://github.com/webpack-contrib/file-loader#name).",
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Function"
}
]
},
"outputPath": {
"description": "A filesystem path where the target file(s) will be placed (https://github.com/webpack-contrib/file-loader#outputpath).",
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Function"
}
]
},
"publicPath": {
"description": "A custom public path for the target file(s) (https://github.com/webpack-contrib/file-loader#publicpath).",
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Function"
}
]
},
"postTransformPublicPath": {
"description": "A custom transformation function for post-processing the publicPath (https://github.com/webpack-contrib/file-loader#posttransformpublicpath).",
"instanceof": "Function"
},
"context": {
"description": "A custom file context (https://github.com/webpack-contrib/file-loader#context).",
"type": "string"
},
"emitFile": {
"description": "Enables/Disables emit files (https://github.com/webpack-contrib/file-loader#emitfile).",
"type": "boolean"
},
"regExp": {
"description": "A Regular Expression to one or many parts of the target file path. The capture groups can be reused in the name property using [N] placeholder (https://github.com/webpack-contrib/file-loader#regexp).",
"anyOf": [
{
"type": "string"
},
{
"instanceof": "RegExp"
}
]
},
"esModules": {
"type": "boolean"
}
},
"type": "object"
}