- 将所有图片路径从绝对路径改为使用 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>
23 lines
672 B
JavaScript
23 lines
672 B
JavaScript
;
|
|
exports.getImportSource = function ({
|
|
node
|
|
}) {
|
|
if (node.specifiers.length === 0) return node.source.value;
|
|
};
|
|
exports.getRequireSource = function ({
|
|
node
|
|
}) {
|
|
if (node.type !== "ExpressionStatement") return;
|
|
const {
|
|
expression
|
|
} = node;
|
|
if (expression.type === "CallExpression" && expression.callee.type === "Identifier" && expression.callee.name === "require" && expression.arguments.length === 1 && expression.arguments[0].type === "StringLiteral") {
|
|
return expression.arguments[0].value;
|
|
}
|
|
};
|
|
exports.isPolyfillSource = function (source) {
|
|
return source === "@babel/polyfill" || source === "core-js";
|
|
};
|
|
|
|
//# sourceMappingURL=utils.cjs.map
|