From bd2657ea4393c43fd8ce986e9dfe9f64bde2f9b8 Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Tue, 11 Jul 2023 20:01:08 +0800 Subject: [PATCH] docs: add comments for client config file path (close #1237) --- docs/reference/default-theme/extending.md | 2 ++ docs/zh/reference/default-theme/extending.md | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/reference/default-theme/extending.md b/docs/reference/default-theme/extending.md index 8d6574e075..6cc773f3f7 100644 --- a/docs/reference/default-theme/extending.md +++ b/docs/reference/default-theme/extending.md @@ -100,6 +100,8 @@ export const childTheme = (options: DefaultThemeOptions): Theme => { extends: defaultTheme(options), // override layouts in child theme's client config file + // notice that you would build ts to js before publishing to npm, + // so this should be the path to the js file clientConfigFile: path.resolve(__dirname, './client.js'), // override component alias diff --git a/docs/zh/reference/default-theme/extending.md b/docs/zh/reference/default-theme/extending.md index 002956bbfc..81099dd180 100644 --- a/docs/zh/reference/default-theme/extending.md +++ b/docs/zh/reference/default-theme/extending.md @@ -100,6 +100,7 @@ export const childTheme = (options: DefaultThemeOptions): Theme => { extends: defaultTheme(options), // 在子主题的客户端配置文件中覆盖布局 + // 注意,你在发布到 NPM 之前会将 TS 构建为 JS ,因此这里需要设置为 JS 文件的路径 clientConfigFile: path.resolve(__dirname, './client.js'), // 覆盖组件别名