- 将所有图片路径从绝对路径改为使用 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>
22 lines
567 B
JavaScript
22 lines
567 B
JavaScript
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Alexander Akait @alexander-akait
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
// regexp to match at least one "magic comment"
|
|
module.exports.webpackCommentRegExp = new RegExp(
|
|
/(^|\W)webpack[A-Z]{1,}[A-Za-z]{1,}:/
|
|
);
|
|
|
|
// regexp to match at least one "magic comment"
|
|
/**
|
|
* @returns {import("vm").Context} magic comment context
|
|
*/
|
|
module.exports.createMagicCommentContext = () =>
|
|
require("vm").createContext(undefined, {
|
|
name: "Webpack Magic Comment Parser",
|
|
codeGeneration: { strings: false, wasm: false }
|
|
});
|