- 将所有图片路径从绝对路径改为使用 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>
18 lines
648 B
TypeScript
18 lines
648 B
TypeScript
export interface MappingEntry {
|
|
readonly pattern: string;
|
|
readonly paths: ReadonlyArray<string>;
|
|
}
|
|
export interface Paths {
|
|
readonly [key: string]: ReadonlyArray<string>;
|
|
}
|
|
/**
|
|
* Converts an absolute baseUrl and paths to an array of absolute mapping entries.
|
|
* The array is sorted by longest prefix.
|
|
* Having an array with entries allows us to keep a sorting order rather than
|
|
* sort by keys each time we use the mappings.
|
|
* @param absoluteBaseUrl
|
|
* @param paths
|
|
* @param addMatchAll
|
|
*/
|
|
export declare function getAbsoluteMappingEntries(absoluteBaseUrl: string, paths: Paths, addMatchAll: boolean): ReadonlyArray<MappingEntry>;
|