文件操作 - load.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/unplugin/dist/webpack/loaders/load.js
编辑文件内容
import "../../context-CyqyI0ug.js"; import { normalizeAbsolutePath } from "../../webpack-like-D2Xnrc0I.js"; import { createBuildContext, createContext } from "../../context-DvA_cJ4P.js"; //#region src/webpack/loaders/load.ts async function load(source, map) { const callback = this.async(); const { plugin } = this.query; let id = this.resource; if (!plugin?.load || !id) return callback(null, source, map); if (id.startsWith(plugin.__virtualModulePrefix)) id = decodeURIComponent(id.slice(plugin.__virtualModulePrefix.length)); const context = createContext(this); const res = await plugin.load.call(Object.assign({}, createBuildContext({ addWatchFile: (file) => { this.addDependency(file); }, getWatchFiles: () => { return this.getDependencies(); } }, this._compiler, this._compilation, this), context), normalizeAbsolutePath(id)); if (res == null) callback(null, source, map); else if (typeof res !== "string") callback(null, res.code, res.map ?? map); else callback(null, res, map); } //#endregion export { load as default };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件