Files
KQL ce6aa207e9 fix: 修复图片路径以适配GitHub Pages base path
- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL
- 修复 HomePage.tsx 中所有图片引用
- 修复 CoursePage.tsx 中所有图片引用
- 确保图片在 GitHub Pages 上正确加载

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 09:24:45 +08:00

27 lines
1.1 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = require("path");
const IssueLocation_1 = require("./IssueLocation");
const forwardSlash_1 = __importDefault(require("../utils/path/forwardSlash"));
class IssueWebpackError extends Error {
constructor(message, issue) {
super(message);
this.issue = issue;
this.hideStack = true;
// to display issue location using `loc` property, webpack requires `error.module` which
// should be a NormalModule instance.
// to avoid such a dependency, we do a workaround - error.file will contain formatted location instead
if (issue.file) {
this.file = forwardSlash_1.default(path_1.relative(process.cwd(), issue.file));
if (issue.location) {
this.file += `:${IssueLocation_1.formatIssueLocation(issue.location)}`;
}
}
Error.captureStackTrace(this, this.constructor);
}
}
exports.IssueWebpackError = IssueWebpackError;