From f577b0502b02ea5917710e7715e66f9b4c87e3c8 Mon Sep 17 00:00:00 2001 From: kyli Date: Tue, 19 Dec 2023 17:43:09 +0800 Subject: [PATCH] docs(main): remove plugin-i18n case --- .../main-doc/docs/en/configure/app/auto-load-plugin.mdx | 6 +++--- .../main-doc/docs/zh/configure/app/auto-load-plugin.mdx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/document/main-doc/docs/en/configure/app/auto-load-plugin.mdx b/packages/document/main-doc/docs/en/configure/app/auto-load-plugin.mdx index 722d2becb77e..54d9223077d3 100644 --- a/packages/document/main-doc/docs/en/configure/app/auto-load-plugin.mdx +++ b/packages/document/main-doc/docs/en/configure/app/auto-load-plugin.mdx @@ -39,14 +39,14 @@ Modern.js will help you automatically register the plugin by following these ste 1. Modern.js maintains an official list of plugins internally. ```js -const InternalPlugins = ['@modern-js/app-tools', '@modern-js/plugin-i18n', ...]; +const InternalPlugins = ['@modern-js/app-tools', '@modern-js/plugin-tailwindcss', ...]; ``` 2. Modern.js will read your `package.json` and collect the dependency information. ```json title="package.json" "dependencies": { - "@modern-js/plugin-i18n": "x.x.x" + "@modern-js/plugin-tailwindcss": "x.x.x" ... }, "devDependencies": { @@ -55,7 +55,7 @@ const InternalPlugins = ['@modern-js/app-tools', '@modern-js/plugin-i18n', ...]; } ``` -3. Modern.js observes that when you install dependencies such as `@modern-js/plugin-i18n` and `@modern-js/app-tools`, automatic plugin registration will be imported. +3. Modern.js observes that when you install dependencies such as `@modern-js/plugin-tailwindcss` and `@modern-js/app-tools`, automatic plugin registration will be imported. You can notice that this approach is relatively black-box and you are not even aware of the process of loading the plugin. We want to expose more details to the developer and be able to let the developer control the process. diff --git a/packages/document/main-doc/docs/zh/configure/app/auto-load-plugin.mdx b/packages/document/main-doc/docs/zh/configure/app/auto-load-plugin.mdx index 94dc5cde608d..f960caaf629e 100644 --- a/packages/document/main-doc/docs/zh/configure/app/auto-load-plugin.mdx +++ b/packages/document/main-doc/docs/zh/configure/app/auto-load-plugin.mdx @@ -39,14 +39,14 @@ Modern.js 将通过以下几个步骤帮你自动注册插件 1. Modern.js 在内部维护一份官方插件列表。 ```js -const InternalPlugins = ['@modern-js/app-tools', '@modern-js/plugin-i18n', ...]; +const InternalPlugins = ['@modern-js/app-tools', '@modern-js/plugin-tailwindcss', ...]; ``` 2. Modern.js 将读取你的 `package.json` 文件,收集依赖信息。 ```json title="package.json" "dependencies": { - "@modern-js/plugin-i18n": "x.x.x" + "@modern-js/plugin-tailwindcss": "x.x.x" ... }, "devDependencies": { @@ -55,7 +55,7 @@ const InternalPlugins = ['@modern-js/app-tools', '@modern-js/plugin-i18n', ...]; } ``` -3. Modern.js 观察到你安装了 `@modern-js/plugin-i18n` 和 `@modern-js/app-tools` 等依赖后,将会引入插件自动注册。 +3. Modern.js 观察到你安装了 `@modern-js/plugin-tailwindcss` 和 `@modern-js/app-tools` 等依赖后,将会引入插件自动注册。 可以注意到这种方式相对黑盒,你甚至对加载插件的过程是无感知的。我们希望更多的细节暴露给开发者,能让开发者去控制这一过程。