This commit is contained in:
2025-09-19 14:25:20 +08:00
parent 269893a435
commit fbf3f77229
24949 changed files with 2839404 additions and 0 deletions

17
node_modules/vue-loader/dist/formatError.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatError = void 0;
const compiler_1 = require("./compiler");
const chalk = require("chalk");
const { generateCodeFrame } = compiler_1.compiler;
function formatError(err, source, file) {
const loc = err.loc;
if (!loc) {
return;
}
const locString = `:${loc.start.line}:${loc.start.column}`;
const filePath = chalk.gray(`at ${file}${locString}`);
const codeframe = generateCodeFrame(source, loc.start.offset, loc.end.offset);
err.message = `\n${chalk.red(`VueCompilerError: ${err.message}`)}\n${filePath}\n${chalk.yellow(codeframe)}\n`;
}
exports.formatError = formatError;