- 将所有图片路径从绝对路径改为使用 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>
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
import webpack, { Compiler, Module } from 'webpack';
|
|
import { EmitCountMap, InternalOptions } from './';
|
|
interface BeforeRunHookArgs {
|
|
emitCountMap: EmitCountMap;
|
|
manifestFileName: string;
|
|
}
|
|
interface EmitHookArgs {
|
|
compiler: Compiler;
|
|
emitCountMap: EmitCountMap;
|
|
manifestAssetId: string;
|
|
manifestFileName: string;
|
|
moduleAssets: Record<any, any>;
|
|
options: InternalOptions;
|
|
}
|
|
declare const getCompilerHooks: (compiler: Compiler) => any;
|
|
declare const beforeRunHook: ({ emitCountMap, manifestFileName }: BeforeRunHookArgs, _: Compiler, callback: Function) => void;
|
|
declare const emitHook: ({ compiler, emitCountMap, manifestAssetId, manifestFileName, moduleAssets, options }: EmitHookArgs, compilation: webpack.compilation.Compilation) => void;
|
|
interface LegacyModule extends Module {
|
|
userRequest?: any;
|
|
}
|
|
declare const normalModuleLoaderHook: ({ moduleAssets }: {
|
|
moduleAssets: Record<any, any>;
|
|
}, loaderContext: webpack.loader.LoaderContext, module: LegacyModule) => void;
|
|
export { beforeRunHook, emitHook, getCompilerHooks, normalModuleLoaderHook };
|