@modern-js/module-tools-docs 2.0.2 → 2.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/doc_build/html/main/index.html +1 -1
- package/doc_build/static/css/main.css +267 -660
- package/doc_build/static/css/main.css.map +1 -1
- package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css +6 -23
- package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css.map +1 -1
- package/doc_build/static/js/async/en_api_config_build-config.js +79 -36
- package/doc_build/static/js/async/en_api_config_build-config.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_build-preset.js +40 -20
- package/doc_build/static/js/async/en_api_config_build-preset.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_design-system.js +33800 -2340
- package/doc_build/static/js/async/en_api_config_design-system.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_plugins.js +15 -19
- package/doc_build/static/js/async/en_api_config_testing.js +26 -24
- package/doc_build/static/js/async/en_api_config_testing.js.map +1 -1
- package/doc_build/static/js/async/{en_api_.js → en_api_index.js} +10 -14
- package/doc_build/static/js/async/en_api_index.js.map +1 -0
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js +24 -26
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_asset.js +16 -41
- package/doc_build/static/js/async/en_guide_advance_asset.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_build-umd.js +20 -24
- package/doc_build/static/js/async/en_guide_advance_copy.js +25 -23
- package/doc_build/static/js/async/en_guide_advance_copy.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_external-dependency.js +15 -19
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js +352 -94
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js +11 -15
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_theme-config.js +26 -24
- package/doc_build/static/js/async/en_guide_advance_theme-config.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.js +275 -88
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_command-preview.js +45 -33
- package/doc_build/static/js/async/en_guide_basic_command-preview.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.js +274 -196
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.js +18 -20
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_test-your-project.js +27 -32
- package/doc_build/static/js/async/en_guide_basic_test-your-project.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js +33 -15
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_using-storybook.js +24 -63
- package/doc_build/static/js/async/en_guide_basic_using-storybook.js.map +1 -1
- package/doc_build/static/js/async/en_guide_best-practices_components.js +39 -27
- package/doc_build/static/js/async/en_guide_best-practices_components.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_getting-started.js +288 -45
- package/doc_build/static/js/async/en_guide_intro_getting-started.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_welcome.js +27 -13
- package/doc_build/static/js/async/en_guide_intro_welcome.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js +16 -12
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js.map +1 -1
- package/doc_build/static/js/async/{en_.js → en_index.js} +12 -16
- package/doc_build/static/js/async/en_index.js.map +1 -0
- package/doc_build/static/js/async/en_plugins_guide_getting-started.js +17 -21
- package/doc_build/static/js/async/en_plugins_guide_plugin-object.js +20 -24
- package/doc_build/static/js/async/en_plugins_guide_setup-function.js +19 -23
- package/doc_build/static/js/async/en_plugins_guide_setup-function.js.map +1 -1
- package/doc_build/static/js/async/en_plugins_official-list_overview.js +8 -12
- package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js +166 -367
- package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js.map +1 -1
- package/doc_build/static/js/async/{api_config_build-config.js → zh_api_config_build-config.js} +80 -35
- package/doc_build/static/js/async/{api_config_build-config.js.map → zh_api_config_build-config.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_build-preset.js → zh_api_config_build-preset.js} +39 -21
- package/doc_build/static/js/async/{api_config_build-preset.js.map → zh_api_config_build-preset.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_design-system.js → zh_api_config_design-system.js} +27 -23
- package/doc_build/static/js/async/{api_config_design-system.js.map → zh_api_config_design-system.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_plugins.js → zh_api_config_plugins.js} +17 -21
- package/doc_build/static/js/async/{api_config_plugins.js.map → zh_api_config_plugins.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_testing.js → zh_api_config_testing.js} +28 -26
- package/doc_build/static/js/async/{api_config_testing.js.map → zh_api_config_testing.js.map} +1 -1
- package/doc_build/static/js/async/{api_.js → zh_api_index.js} +10 -14
- package/doc_build/static/js/async/zh_api_index.js.map +1 -0
- package/doc_build/static/js/async/{api_plugin-api_plugin-hooks.js → zh_api_plugin-api_plugin-hooks.js} +25 -27
- package/doc_build/static/js/async/{api_plugin-api_plugin-hooks.js.map → zh_api_plugin-api_plugin-hooks.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_asset.js → zh_guide_advance_asset.js} +18 -43
- package/doc_build/static/js/async/{guide_advance_asset.js.map → zh_guide_advance_asset.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_build-umd.js → zh_guide_advance_build-umd.js} +22 -26
- package/doc_build/static/js/async/{guide_advance_build-umd.js.map → zh_guide_advance_build-umd.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_copy.js → zh_guide_advance_copy.js} +26 -24
- package/doc_build/static/js/async/{guide_advance_copy.js.map → zh_guide_advance_copy.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_external-dependency.js → zh_guide_advance_external-dependency.js} +17 -21
- package/doc_build/static/js/async/{guide_advance_external-dependency.js.map → zh_guide_advance_external-dependency.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_in-depth-about-build.js → zh_guide_advance_in-depth-about-build.js} +353 -95
- package/doc_build/static/js/async/{guide_advance_in-depth-about-build.js.map → zh_guide_advance_in-depth-about-build.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_in-depth-about-dev-command.js → zh_guide_advance_in-depth-about-dev-command.js} +16 -18
- package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.js.map +1 -0
- package/doc_build/static/js/async/{guide_advance_theme-config.js → zh_guide_advance_theme-config.js} +24 -22
- package/doc_build/static/js/async/{guide_advance_theme-config.js.map → zh_guide_advance_theme-config.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_before-getting-started.js → zh_guide_basic_before-getting-started.js} +272 -85
- package/doc_build/static/js/async/zh_guide_basic_before-getting-started.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_command-preview.js → zh_guide_basic_command-preview.js} +47 -35
- package/doc_build/static/js/async/zh_guide_basic_command-preview.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_modify-output-product.js → zh_guide_basic_modify-output-product.js} +203 -88
- package/doc_build/static/js/async/zh_guide_basic_modify-output-product.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_publish-your-project.js → zh_guide_basic_publish-your-project.js} +20 -22
- package/doc_build/static/js/async/{guide_basic_publish-your-project.js.map → zh_guide_basic_publish-your-project.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_test-your-project.js → zh_guide_basic_test-your-project.js} +30 -35
- package/doc_build/static/js/async/{guide_basic_test-your-project.js.map → zh_guide_basic_test-your-project.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_use-micro-generator.js → zh_guide_basic_use-micro-generator.js} +40 -20
- package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_using-storybook.js → zh_guide_basic_using-storybook.js} +78 -171
- package/doc_build/static/js/async/{guide_basic_using-storybook.js.map → zh_guide_basic_using-storybook.js.map} +1 -1
- package/doc_build/static/js/async/{guide_best-practices_components.js → zh_guide_best-practices_components.js} +41 -29
- package/doc_build/static/js/async/{guide_best-practices_components.js.map → zh_guide_best-practices_components.js.map} +1 -1
- package/doc_build/static/js/async/{guide_intro_getting-started.js → zh_guide_intro_getting-started.js} +291 -42
- package/doc_build/static/js/async/{guide_intro_getting-started.js.map → zh_guide_intro_getting-started.js.map} +1 -1
- package/doc_build/static/js/async/{guide_intro_welcome.js → zh_guide_intro_welcome.js} +28 -14
- package/doc_build/static/js/async/zh_guide_intro_welcome.js.map +1 -0
- package/doc_build/static/js/async/{guide_intro_why-module-engineering-solution.js → zh_guide_intro_why-module-engineering-solution.js} +18 -14
- package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.js.map +1 -0
- package/doc_build/static/js/async/{index.js → zh_index.js} +11 -15
- package/doc_build/static/js/async/zh_index.js.map +1 -0
- package/doc_build/static/js/async/{plugins_guide_getting-started.js → zh_plugins_guide_getting-started.js} +19 -23
- package/doc_build/static/js/async/{plugins_guide_getting-started.js.map → zh_plugins_guide_getting-started.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_guide_plugin-object.js → zh_plugins_guide_plugin-object.js} +22 -26
- package/doc_build/static/js/async/{plugins_guide_plugin-object.js.map → zh_plugins_guide_plugin-object.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_guide_setup-function.js → zh_plugins_guide_setup-function.js} +21 -25
- package/doc_build/static/js/async/{plugins_guide_setup-function.js.map → zh_plugins_guide_setup-function.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_official-list_overview.js → zh_plugins_official-list_overview.js} +10 -14
- package/doc_build/static/js/async/zh_plugins_official-list_overview.js.map +1 -0
- package/doc_build/static/js/builder-runtime.js +1 -1
- package/doc_build/static/js/builder-runtime.js.map +1 -1
- package/doc_build/static/js/lib-polyfill.js +3433 -16355
- package/doc_build/static/js/lib-polyfill.js.map +1 -1
- package/doc_build/static/js/main.js +2073 -2700
- package/doc_build/static/js/main.js.map +1 -1
- package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js +485 -1689
- package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js.map +1 -1
- package/doc_build/static/search_index.json +1 -0
- package/docs/.island/dist/404.html +41 -0
- package/docs/.island/dist/assets/asset.26aea654.js +160 -0
- package/docs/.island/dist/assets/asset.36e3d3c9.js +160 -0
- package/docs/.island/dist/assets/before-getting-started.0e863740.js +87 -0
- package/docs/.island/dist/assets/before-getting-started.2c6e6b8a.js +87 -0
- package/docs/.island/dist/assets/build-config.460d11d9.js +804 -0
- package/docs/.island/dist/assets/build-config.e155e534.js +854 -0
- package/docs/.island/dist/assets/build-preset.6c2c6c62.js +256 -0
- package/docs/.island/dist/assets/build-preset.d3da921d.js +256 -0
- package/docs/.island/dist/assets/build-umd.ba00f028.js +264 -0
- package/docs/.island/dist/assets/build-umd.edb9d163.js +273 -0
- package/docs/.island/dist/assets/command-preview.1dc93921.js +264 -0
- package/docs/.island/dist/assets/command-preview.ef7a9d01.js +264 -0
- package/docs/.island/dist/assets/components.esm.03560353.js +9 -0
- package/docs/.island/dist/assets/copy.28dc4d5f.js +277 -0
- package/docs/.island/dist/assets/copy.f4625565.js +277 -0
- package/docs/.island/dist/assets/design-system.8993234c.js +1254 -0
- package/docs/.island/dist/assets/design-system.b0ba163f.js +639 -0
- package/docs/.island/dist/assets/dev.b373b152.js +37 -0
- package/docs/.island/dist/assets/dev.b39fd42a.js +37 -0
- package/docs/.island/dist/assets/down.f35427d3.svg +1 -0
- package/docs/.island/dist/assets/extension.4bf3526b.js +1 -0
- package/docs/.island/dist/assets/extension.d64ed0b8.js +469 -0
- package/docs/.island/dist/assets/external-dependency.2ede7532.js +156 -0
- package/docs/.island/dist/assets/external-dependency.92ca89e0.js +156 -0
- package/docs/.island/dist/assets/getting-started.822cf0b2.js +117 -0
- package/docs/.island/dist/assets/getting-started.e2764829.js +114 -0
- package/docs/.island/dist/assets/github.3bf8ccee.svg +1 -0
- package/docs/.island/dist/assets/in-depth-about-build.94cc902d.js +375 -0
- package/docs/.island/dist/assets/in-depth-about-build.aa74de10.js +374 -0
- package/docs/.island/dist/assets/in-depth-about-dev-command.877bdb83.js +33 -0
- package/docs/.island/dist/assets/in-depth-about-dev-command.9736befd.js +39 -0
- package/docs/.island/dist/assets/index.01786ba7.js +30 -0
- package/docs/.island/dist/assets/index.6cef6f5f.js +4 -0
- package/docs/.island/dist/assets/index.cb118238.js +36 -0
- package/docs/.island/dist/assets/index.ccb6ce27.js +4 -0
- package/docs/.island/dist/assets/island_inject.69495876.js +1 -0
- package/docs/.island/dist/assets/island_inject.cdfb22d9.js +1 -0
- package/docs/.island/dist/assets/loading.8c9bb911.svg +1 -0
- package/docs/.island/dist/assets/modify-output-product.9e2394d7.js +100 -0
- package/docs/.island/dist/assets/modify-output-product.f363845a.js +100 -0
- package/docs/.island/dist/assets/moon.6b705924.svg +3 -0
- package/docs/.island/dist/assets/plugin.70a61997.js +42 -0
- package/docs/.island/dist/assets/plugin.80b12ee2.js +42 -0
- package/docs/.island/dist/assets/publish-your-project.7321c10e.js +164 -0
- package/docs/.island/dist/assets/publish-your-project.7326359f.js +166 -0
- package/docs/.island/dist/assets/right.89674cd7.svg +1 -0
- package/docs/.island/dist/assets/search.0aea6901.svg +1 -0
- package/docs/.island/dist/assets/search.11353245.js +222 -0
- package/docs/.island/dist/assets/search.a1b1cff3.js +3 -0
- package/docs/.island/dist/assets/search.f9025ced.js +3 -0
- package/docs/.island/dist/assets/style.09015a4b.css +1 -0
- package/docs/.island/dist/assets/style.2e5f7bc2.css +1970 -0
- package/docs/.island/dist/assets/sun.841dac10.svg +11 -0
- package/docs/.island/dist/assets/test-your-project.8ab2809e.js +190 -0
- package/docs/.island/dist/assets/test-your-project.9ae2a49e.js +190 -0
- package/docs/.island/dist/assets/test.2bfe276b.js +66 -0
- package/docs/.island/dist/assets/test.a2c00a3f.js +67 -0
- package/docs/.island/dist/assets/translator.b1077c44.svg +1 -0
- package/docs/.island/dist/assets/use-micro-generator.13c1a09f.js +60 -0
- package/docs/.island/dist/assets/use-micro-generator.dfe877f6.js +60 -0
- package/docs/.island/dist/assets/using-storybook.adb88cb8.js +260 -0
- package/docs/.island/dist/assets/using-storybook.b8e7dd04.js +260 -0
- package/docs/.island/dist/assets/welcome.94880043.js +13 -0
- package/docs/.island/dist/assets/welcome.b2140e7e.js +13 -0
- package/docs/.island/dist/assets/why-module-engineering-solution.bfe7981a.js +26 -0
- package/docs/.island/dist/assets/why-module-engineering-solution.e31cd19f.js +26 -0
- package/docs/.island/dist/chunk-COLCRJ2V.js +1 -0
- package/docs/.island/dist/chunk-K5FMOYDC.js +10 -0
- package/docs/.island/dist/chunk-WE42KMYS.js +26 -0
- package/docs/.island/dist/client-entry.js +3 -0
- package/docs/.island/dist/en/api/build-config.html +344 -0
- package/docs/.island/dist/en/api/build-preset.html +82 -0
- package/docs/.island/dist/en/api/design-system.html +155 -0
- package/docs/.island/dist/en/api/dev.html +45 -0
- package/docs/.island/dist/en/api/index.html +41 -0
- package/docs/.island/dist/en/api/plugin.html +48 -0
- package/docs/.island/dist/en/api/test.html +58 -0
- package/docs/.island/dist/en/guide/advance/asset.html +68 -0
- package/docs/.island/dist/en/guide/advance/build-umd.html +72 -0
- package/docs/.island/dist/en/guide/advance/copy.html +82 -0
- package/docs/.island/dist/en/guide/advance/extension.html +41 -0
- package/docs/.island/dist/en/guide/advance/external-dependency.html +71 -0
- package/docs/.island/dist/en/guide/advance/in-depth-about-build.html +148 -0
- package/docs/.island/dist/en/guide/advance/in-depth-about-dev-command.html +51 -0
- package/docs/.island/dist/en/guide/basic/before-getting-started.html +127 -0
- package/docs/.island/dist/en/guide/basic/command-preview.html +100 -0
- package/docs/.island/dist/en/guide/basic/modify-output-product.html +140 -0
- package/docs/.island/dist/en/guide/basic/publish-your-project.html +91 -0
- package/docs/.island/dist/en/guide/basic/test-your-project.html +72 -0
- package/docs/.island/dist/en/guide/basic/use-micro-generator.html +65 -0
- package/docs/.island/dist/en/guide/basic/using-storybook.html +113 -0
- package/docs/.island/dist/en/guide/intro/getting-started.html +76 -0
- package/docs/.island/dist/en/guide/intro/welcome.html +53 -0
- package/docs/.island/dist/en/guide/intro/why-module-engineering-solution.html +49 -0
- package/docs/.island/dist/en/index.html +42 -0
- package/docs/.island/dist/react-dom.js +1 -0
- package/docs/.island/dist/react-dom_client.js +1 -0
- package/docs/.island/dist/react.js +1 -0
- package/docs/.island/dist/react_jsx-runtime.js +10 -0
- package/docs/.island/dist/ssr-manifest.json +57 -0
- package/docs/.island/dist/test-result.png +0 -0
- package/docs/.island/dist/why-module-solution.png +0 -0
- package/docs/.island/dist/zh/api/build-config.html +361 -0
- package/docs/.island/dist/zh/api/build-preset.html +82 -0
- package/docs/.island/dist/zh/api/design-system.html +149 -0
- package/docs/.island/dist/zh/api/dev.html +46 -0
- package/docs/.island/dist/zh/api/index.html +41 -0
- package/docs/.island/dist/zh/api/plugin.html +48 -0
- package/docs/.island/dist/zh/api/test.html +59 -0
- package/docs/.island/dist/zh/guide/advance/asset.html +68 -0
- package/docs/.island/dist/zh/guide/advance/build-umd.html +72 -0
- package/docs/.island/dist/zh/guide/advance/copy.html +82 -0
- package/docs/.island/dist/zh/guide/advance/extension.html +127 -0
- package/docs/.island/dist/zh/guide/advance/external-dependency.html +71 -0
- package/docs/.island/dist/zh/guide/advance/in-depth-about-build.html +148 -0
- package/docs/.island/dist/zh/guide/advance/in-depth-about-dev-command.html +53 -0
- package/docs/.island/dist/zh/guide/basic/before-getting-started.html +127 -0
- package/docs/.island/dist/zh/guide/basic/command-preview.html +100 -0
- package/docs/.island/dist/zh/guide/basic/modify-output-product.html +140 -0
- package/docs/.island/dist/zh/guide/basic/publish-your-project.html +92 -0
- package/docs/.island/dist/zh/guide/basic/test-your-project.html +72 -0
- package/docs/.island/dist/zh/guide/basic/use-micro-generator.html +65 -0
- package/docs/.island/dist/zh/guide/basic/using-storybook.html +114 -0
- package/docs/.island/dist/zh/guide/intro/getting-started.html +79 -0
- package/docs/.island/dist/zh/guide/intro/welcome.html +53 -0
- package/docs/.island/dist/zh/guide/intro/why-module-engineering-solution.html +49 -0
- package/docs/.island/dist/zh/index.html +42 -0
- package/docs/en/api/config/build-config.md +15 -5
- package/docs/en/api/config/build-preset.md +3 -2
- package/docs/en/api/config/design-system.md +623 -615
- package/docs/en/api/config/plugins.md +2 -2
- package/docs/en/api/config/testing.md +2 -1
- package/docs/en/guide/advance/asset.mdx +0 -4
- package/docs/en/guide/advance/build-umd.mdx +3 -3
- package/docs/en/guide/advance/in-depth-about-build.md +14 -13
- package/docs/en/guide/advance/in-depth-about-dev-command.md +2 -1
- package/docs/en/guide/basic/before-getting-started.md +16 -9
- package/docs/en/guide/basic/command-preview.md +2 -2
- package/docs/en/guide/basic/modify-output-product.md +65 -69
- package/docs/en/guide/basic/test-your-project.mdx +1 -3
- package/docs/en/guide/basic/use-micro-generator.md +4 -0
- package/docs/en/guide/basic/using-storybook.mdx +1 -13
- package/docs/en/guide/intro/getting-started.md +16 -7
- package/docs/en/plugins/guide/getting-started.mdx +2 -2
- package/docs/en/plugins/guide/plugin-object.mdx +5 -5
- package/docs/zh/api/config/build-config.md +18 -6
- package/docs/zh/api/config/build-preset.md +3 -2
- package/docs/zh/api/config/design-system.md +2 -2
- package/docs/zh/api/config/plugins.md +2 -2
- package/docs/zh/api/config/testing.md +3 -2
- package/docs/zh/guide/advance/asset.mdx +0 -5
- package/docs/zh/guide/advance/build-umd.mdx +3 -3
- package/docs/zh/guide/advance/in-depth-about-build.md +14 -13
- package/docs/zh/guide/advance/in-depth-about-dev-command.md +2 -1
- package/docs/zh/guide/basic/before-getting-started.md +15 -8
- package/docs/zh/guide/basic/command-preview.md +2 -2
- package/docs/zh/guide/basic/modify-output-product.md +17 -19
- package/docs/zh/guide/basic/test-your-project.mdx +1 -3
- package/docs/zh/guide/basic/use-micro-generator.md +5 -1
- package/docs/zh/guide/basic/using-storybook.mdx +9 -19
- package/docs/zh/guide/intro/getting-started.md +17 -11
- package/docs/zh/plugins/guide/getting-started.mdx +2 -2
- package/docs/zh/plugins/guide/plugin-object.mdx +5 -5
- package/modern.config.ts +11 -5
- package/package.json +4 -4
- package/doc_build/static/js/async/api_.js.map +0 -1
- package/doc_build/static/js/async/en_.js.map +0 -1
- package/doc_build/static/js/async/en_api_.js.map +0 -1
- package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_before-getting-started.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_command-preview.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_modify-output-product.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_use-micro-generator.js.map +0 -1
- package/doc_build/static/js/async/guide_intro_welcome.js.map +0 -1
- package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js.map +0 -1
- package/doc_build/static/js/async/index.js.map +0 -1
- package/doc_build/static/js/async/plugins_official-list_overview.js.map +0 -1
|
@@ -18,11 +18,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18
18
|
/*@jsxRuntime automatic @jsxImportSource react*/
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const CH = {
|
|
22
22
|
annotations: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.annotations,
|
|
23
23
|
Code: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Code
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
const chCodeConfig = {
|
|
26
26
|
"staticMediaQuery": "not screen, (max-width: 768px)",
|
|
27
27
|
"theme": {
|
|
28
28
|
"name": "nord",
|
|
@@ -1185,12 +1185,12 @@ var chCodeConfig = {
|
|
|
1185
1185
|
"autoImport": true,
|
|
1186
1186
|
"showCopyButton": true,
|
|
1187
1187
|
"skipLanguages": [],
|
|
1188
|
-
"filepath": "/Users/
|
|
1188
|
+
"filepath": "/Users/targeral/github/targeral-modern-js/website/module-tools/docs/en/guide/advance/copy.md"
|
|
1189
1189
|
};
|
|
1190
|
-
|
|
1190
|
+
const frontmatter = {
|
|
1191
1191
|
"sidebar_position": 3
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
const toc = [{
|
|
1194
1194
|
"id": "understanding-the-copy-api",
|
|
1195
1195
|
"text": "Understanding the Copy API",
|
|
1196
1196
|
"depth": 2
|
|
@@ -1223,10 +1223,10 @@ var toc = [{
|
|
|
1223
1223
|
"text": "使用 Glob",
|
|
1224
1224
|
"depth": 3
|
|
1225
1225
|
}];
|
|
1226
|
-
|
|
1227
|
-
|
|
1226
|
+
const title = `Use the Copy Tools`;
|
|
1227
|
+
const content = "\"---\\nsidebar_position: 3\\n---\\n\\n# Use the Copy Tools\\n\\nThe Module Project provides the Copy utility for copying already existing individual files or entire directories into the product directory. Next we learn how to use it.\\n\\n## Understanding the Copy API\\n\\nWe can use the Copy tool via the [`buildConfig.copy`](/en/api/config/build-config#copy) API, which contains the following two main configurations.\\n\\n- [`patterns`](/en/api/config/build-config#copypatterns)\\n- [`options`](/en/api/config/build-config#copyoptions)\\n\\nIt is recommended to spend some time getting to know them before you start learning.\\n\\n## API Description\\n\\n`copy.patterns` 用于寻找复制的文件以及配置输出的路径。\\n\\n其中 `patterns.from` 用于指定要复制的文件或者目录。它接收 Glob 形式字符串或具体路径。Glob 形式字符串是指 [fast-glob pattern-syntax](https://github.com/mrmlnc/fast-glob#pattern-syntax)。因此我们可以按照如下两种方式使用它:\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: {\\n copy: {\\n patterns: [\\n { from: './index.html', to: '' },\\n { from: './*.html', to: '' },\\n ],\\n },\\n },\\n});\\n```\\n\\n`patterns.context` 一般和 `patterns.from` 配合使用,默认情况下它的值与 [`buildConfig.sourceDir`](/api/config/build-config#sourcedir) 相同,因此我们可以按照如下方式指定 `src/data.json` 文件为要复制的文件:\\n\\n> 默认情况下,`buildConfig.sourceDir` 为 `src`\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: {\\n copy: {\\n patterns: [\\n { from: './data.json' to: ''},\\n ],\\n },\\n },\\n});\\n```\\n\\n当指定的文件不在源码目录的时候,可以修改 `context` 配置。例如指定项目目录下的 `temp/index.html` 为要复制的文件:\\n\\n```ts\\nimport path from 'path';\\n\\nexport default defineConfig({\\n buildConfig: {\\n copy: {\\n patterns: [\\n {\\n from: './index.html',\\n context: path.join(__dirname, './temp')\\n to: '',\\n }\\n ],\\n },\\n },\\n});\\n```\\n\\n`patterns.to` 用于指定复制文件的输出路径,默认情况下它的值为 [`buildConfig.outDir`](/api/config/build-config#outDir)对应的值。因此我们按照如下方式将 `src/index.html` 复制到 `dist` 目录下:\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: {\\n copy: {\\n patterns: [{ from: './index.html' }],\\n },\\n },\\n});\\n```\\n\\n当我们配置了 `patterns.to` 的时候:\\n\\n- 如果是相对路径,则该路径会相对于 `buildConfig.outDir` 计算出复制文件输出的绝对路径。\\n- 如果是绝对路径,则会直接使用该值。\\n\\n最后 `patterns.globOptions` 用于配置寻找复制文件 [globby](https://github.com/sindresorhus/globby) 对象,其配置可参考:\\n\\n- [globby.options](https://github.com/sindresorhus/globby#options)\\n\\n## 不同场景使用示例\\n\\n### 将文件复制文件\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: [\\n {\\n outDir: 'dist',\\n copy: {\\n patterns: [\\n /**\\n * copy file to file\\n */\\n {\\n from: './temp-1/a.png',\\n context: __dirname,\\n to: './temp-1/b.png',\\n },\\n ],\\n },\\n },\\n ],\\n});\\n```\\n\\n### 将文件复制到目录\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: [\\n {\\n outDir: 'dist',\\n copy: {\\n patterns: [\\n /**\\n * copy file to dir\\n */\\n {\\n from: './temp-2/a.png',\\n context: __dirname,\\n to: './temp-2',\\n },\\n ],\\n },\\n },\\n ],\\n});\\n```\\n\\n### 从目录复制到目录\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: [\\n {\\n outDir: 'dist',\\n copy: {\\n patterns: [\\n /**\\n * copy dir to dir\\n */\\n {\\n from: './temp-3/',\\n to: './temp-3',\\n context: __dirname,\\n },\\n ],\\n options: {\\n enableCopySync: true,\\n },\\n },\\n },\\n ],\\n});\\n```\\n\\n### 从目录到文件\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: [\\n {\\n outDir: 'dist',\\n copy: {\\n patterns: [\\n /**\\n * copy dir to file\\n */\\n {\\n from: './temp-4/',\\n context: __dirname,\\n to: './temp-4/_index.html',\\n },\\n ],\\n options: {\\n enableCopySync: true,\\n },\\n },\\n },\\n ],\\n});\\n```\\n\\n### 使用 Glob\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: [\\n {\\n outDir: 'dist',\\n copy: {\\n patterns: [\\n /**\\n * copy glob to dir\\n */\\n {\\n from: './*.html',\\n to: './temp-5',\\n },\\n ],\\n options: {\\n enableCopySync: true,\\n },\\n },\\n },\\n {\\n copy: {\\n patterns: [\\n /**\\n * copy glob to file\\n */\\n {\\n from: './*.html',\\n to: './temp-6/index.html',\\n },\\n ],\\n options: {\\n enableCopySync: true,\\n },\\n },\\n },\\n ],\\n});\\n```\\n\"";
|
|
1228
1228
|
function _createMdxContent(props) {
|
|
1229
|
-
|
|
1229
|
+
const _components = Object.assign({
|
|
1230
1230
|
h1: "h1",
|
|
1231
1231
|
a: "a",
|
|
1232
1232
|
p: "p",
|
|
@@ -1260,7 +1260,7 @@ function _createMdxContent(props) {
|
|
|
1260
1260
|
}), "Understanding the Copy API"]
|
|
1261
1261
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
1262
1262
|
children: ["We can use the Copy tool via the ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1263
|
-
href: "/en/api/config/build-config#copy
|
|
1263
|
+
href: "/module-tools/en/api/config/build-config.html#copy-3",
|
|
1264
1264
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1265
1265
|
children: "buildConfig.copy"
|
|
1266
1266
|
})
|
|
@@ -1268,14 +1268,14 @@ function _createMdxContent(props) {
|
|
|
1268
1268
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
1269
1269
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1270
1270
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1271
|
-
href: "/en/api/config/build-config#copypatterns
|
|
1271
|
+
href: "/module-tools/en/api/config/build-config.html#copypatterns-1",
|
|
1272
1272
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1273
1273
|
children: "patterns"
|
|
1274
1274
|
})
|
|
1275
1275
|
})
|
|
1276
1276
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1277
1277
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1278
|
-
href: "/en/api/config/build-config#copyoptions
|
|
1278
|
+
href: "/module-tools/en/api/config/build-config.html#copyoptions-1",
|
|
1279
1279
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1280
1280
|
children: "options"
|
|
1281
1281
|
})
|
|
@@ -1299,7 +1299,9 @@ function _createMdxContent(props) {
|
|
|
1299
1299
|
children: ["其中 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1300
1300
|
children: "patterns.from"
|
|
1301
1301
|
}), " 用于指定要复制的文件或者目录。它接收 Glob 形式字符串或具体路径。Glob 形式字符串是指 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1302
|
-
href: "https://github.com/mrmlnc/fast-glob#pattern-syntax",
|
|
1302
|
+
href: "https://github.com/mrmlnc/fast-glob#pattern-syntax-1",
|
|
1303
|
+
target: "_blank",
|
|
1304
|
+
rel: "nofollow",
|
|
1303
1305
|
children: "fast-glob pattern-syntax"
|
|
1304
1306
|
}), "。因此我们可以按照如下两种方式使用它:"]
|
|
1305
1307
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.Code, {
|
|
@@ -1792,7 +1794,7 @@ function _createMdxContent(props) {
|
|
|
1792
1794
|
}), " 一般和 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1793
1795
|
children: "patterns.from"
|
|
1794
1796
|
}), " 配合使用,默认情况下它的值与 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1795
|
-
href: "/en/api/config/build-config#sourcedir
|
|
1797
|
+
href: "/module-tools/en/api/config/build-config.html#sourcedir-4",
|
|
1796
1798
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1797
1799
|
children: "buildConfig.sourceDir"
|
|
1798
1800
|
})
|
|
@@ -2709,7 +2711,7 @@ function _createMdxContent(props) {
|
|
|
2709
2711
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2710
2712
|
children: "patterns.to"
|
|
2711
2713
|
}), " 用于指定复制文件的输出路径,默认情况下它的值为 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2712
|
-
href: "/en/api/config/build-config
|
|
2714
|
+
href: "/module-tools/en/api/config/build-config.html#outdir-7",
|
|
2713
2715
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2714
2716
|
children: "buildConfig.outDir"
|
|
2715
2717
|
})
|
|
@@ -3045,12 +3047,16 @@ function _createMdxContent(props) {
|
|
|
3045
3047
|
children: "patterns.globOptions"
|
|
3046
3048
|
}), " 用于配置寻找复制文件 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
3047
3049
|
href: "https://github.com/sindresorhus/globby",
|
|
3050
|
+
target: "_blank",
|
|
3051
|
+
rel: "nofollow",
|
|
3048
3052
|
children: "globby"
|
|
3049
3053
|
}), " 对象,其配置可参考:"]
|
|
3050
3054
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
3051
3055
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
3052
3056
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
3053
|
-
href: "https://github.com/sindresorhus/globby#options",
|
|
3057
|
+
href: "https://github.com/sindresorhus/globby#options-5",
|
|
3058
|
+
target: "_blank",
|
|
3059
|
+
rel: "nofollow",
|
|
3054
3060
|
children: "globby.options"
|
|
3055
3061
|
})
|
|
3056
3062
|
}), "\n"]
|
|
@@ -6517,21 +6523,17 @@ function _createMdxContent(props) {
|
|
|
6517
6523
|
})]
|
|
6518
6524
|
});
|
|
6519
6525
|
}
|
|
6520
|
-
function MDXContent() {
|
|
6521
|
-
|
|
6522
|
-
var _ref = props.components || {},
|
|
6523
|
-
MDXLayout = _ref.wrapper;
|
|
6526
|
+
function MDXContent(props = {}) {
|
|
6527
|
+
const {wrapper: MDXLayout} = props.components || ({});
|
|
6524
6528
|
return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
|
|
6525
6529
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
|
|
6526
6530
|
})) : _createMdxContent(props);
|
|
6527
6531
|
}
|
|
6528
|
-
_c = MDXContent;
|
|
6529
6532
|
/* harmony default export */ __webpack_exports__["default"] = (MDXContent);
|
|
6530
6533
|
function _missingMdxReference(id, component, place) {
|
|
6531
|
-
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/
|
|
6534
|
+
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/targeral/github/targeral-modern-js/website/module-tools/docs/en/guide/advance/copy.md`" : ""));
|
|
6532
6535
|
}
|
|
6533
|
-
|
|
6534
|
-
__webpack_require__.$Refresh$.register(_c, "MDXContent");
|
|
6536
|
+
|
|
6535
6537
|
|
|
6536
6538
|
/***/ })
|
|
6537
6539
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/en_guide_advance_copy.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA","sources":["webpack://@modern-js/module-tools-docs/./docs/en/guide/advance/copy.md"],"names":[],"sourceRoot":""}
|
|
@@ -18,13 +18,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18
18
|
/*@jsxRuntime automatic @jsxImportSource react*/
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const CH = {
|
|
22
22
|
annotations: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.annotations,
|
|
23
23
|
Code: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Code,
|
|
24
24
|
Spotlight: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Spotlight,
|
|
25
25
|
CodeSlot: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.CodeSlot
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
const chCodeConfig = {
|
|
28
28
|
"staticMediaQuery": "not screen, (max-width: 768px)",
|
|
29
29
|
"theme": {
|
|
30
30
|
"name": "nord",
|
|
@@ -1187,12 +1187,12 @@ var chCodeConfig = {
|
|
|
1187
1187
|
"autoImport": true,
|
|
1188
1188
|
"showCopyButton": true,
|
|
1189
1189
|
"skipLanguages": [],
|
|
1190
|
-
"filepath": "/Users/
|
|
1190
|
+
"filepath": "/Users/targeral/github/targeral-modern-js/website/module-tools/docs/en/guide/advance/external-dependency.mdx"
|
|
1191
1191
|
};
|
|
1192
|
-
|
|
1192
|
+
const frontmatter = {
|
|
1193
1193
|
"sidebar_position": 4
|
|
1194
1194
|
};
|
|
1195
|
-
|
|
1195
|
+
const toc = [{
|
|
1196
1196
|
"id": "default-handling-of-third-party-dependencies",
|
|
1197
1197
|
"text": "Default handling of third-party dependencies",
|
|
1198
1198
|
"depth": 2
|
|
@@ -1209,10 +1209,10 @@ var toc = [{
|
|
|
1209
1209
|
"text": "Exclude specified third-party dependencies",
|
|
1210
1210
|
"depth": 3
|
|
1211
1211
|
}];
|
|
1212
|
-
|
|
1213
|
-
|
|
1212
|
+
const title = `How to handle third-party dependencies`;
|
|
1213
|
+
const content = "\"---\\nsidebar_position: 4\\n---\\n\\n# How to handle third-party dependencies\\n\\nGenerally, third-party dependencies required by a project can be installed via the `install` command in the package manager. After the third-party dependencies are successfully installed, they will generally appear under `dependencies` and `devDependencies` in the project `package.json`.\\n\\n```json pacakge.json\\n{\\n \\\"dependencies\\\": {},\\n \\\"devDependencies\\\": {}\\n}\\n```\\n\\nDependencies under `\\\"dependencies\\\"` are generally related to project code and builds, and if these third-party dependencies are declared under `\\\"devDependencies\\\"`, then there will be missing dependencies in production environments.\\n\\nIn addition to `\\\"dependencies\\\"`, [`\\\"peerDependencies\\\"`](/en/guide/basic/before-getting-started#peerdependencies) can also declare dependencies that are needed in the production environment, but it puts more emphasis on the existence of these dependencies declared by `\\\"peerDependencies\\\"` in the project's runtime environment, similar to the plugin mechanism.\\n\\n## Default handling of third-party dependencies\\n\\nBy default, third-party dependencies under `\\\"dependencies\\\"` and `\\\"peerDependencies\\\"` are not packaged in the module project\\\\*\\\\*, so:\\n\\n<CH.Spotlight>\\n\\n```json ./v1/package.json\\n{\\n \\\"dependencies\\\": {\\n \\\"react\\\": \\\"^17\\\"\\n },\\n // or\\n \\\"peerDependencies\\\": {\\n \\\"react\\\": \\\"^17\\\"\\n }\\n}\\n```\\n\\n---\\n\\nIf the project has a dependency on `react`.\\n\\n```json ./v1/package.json\\n{\\n \\\"dependencies\\\": {\\n \\\"react\\\": \\\"^17\\\"\\n },\\n // or\\n \\\"peerDependencies\\\": {\\n \\\"react\\\": \\\"^17\\\"\\n }\\n}\\n```\\n\\n---\\n\\nWhen a `react` dependency is used in the source code.\\n\\n```tsx src/index.ts\\nimport React from 'react';\\nconsole.info(React);\\n```\\n\\n---\\n\\nThe `react` code is not packaged into the product at this point.\\n\\n```js dist/index.js\\nimport React from 'react';\\nconsole.info(React);\\n```\\n\\n</CH.Spotlight>\\n\\n## Packaging third-party dependencies\\n\\nHowever there are cases where you want to package these third-party dependencies into the product. The benefits of packaging third-party dependencies into the product are: **Reducing the time spent downloading third-party dependencies**.\\n\\nThis way of handling third-party dependencies is generally more common in developing command-line tools, which can improve the loading speed of command-line tools and give users a better experience.\\n\\nSo how do you enable the packaging of third-party dependencies in your module project?\\n\\nThe following APIs are provided in the build configuration to handle third-party dependencies:\\n\\n- [`buildConfig.autoExternal`](/en/api/config/build-config#autoexternal)\\n- [`buildConfig.externals`](/en/api/config/build-config#externals)\\n\\n### Turn off default behavior\\n\\nWhen we want to turn off the default handling behavior for third-party dependencies, we can do so by:\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: {\\n autoExternal: false,\\n },\\n});\\n```\\n\\nThis way the dependencies under `\\\"dependencies\\\"` and `\\\"peerDependencies\\\"` will be packaged. If you want to turn off the processing of only one of these dependencies, you can use the\\n`buildConfig.autoExternal` in the form of an object.\\n\\n```ts\\nexport default defineConfig({\\n buildConfig: {\\n autoExternal: {\\n dependencies: false,\\n peerDependencies: false,\\n },\\n },\\n});\\n```\\n\\n### Exclude specified third-party dependencies\\n\\nAnd in addition to the `buildConfig.autoExternal` API, `buildConfig.externals` can also control which third-party dependencies are to be handled. We can combine these two\\nAPIs to handle the project's dependencies in a more granular way.\\n\\nFor example, when we need to leave only certain dependencies unpacked, we can configure it as follows.\\n\\n> In this case, it is likely that some dependencies are not suitable for packaging. If this is the case, then you can handle it as follows.\\n\\n```ts\\nepxort default defineConfig({\\n buildConfig: {\\n autoExternal: false,\\n externals: ['pkg-1', /pkg-2/],\\n }\\n});\\n```\\n\"";
|
|
1214
1214
|
function _createMdxContent(props) {
|
|
1215
|
-
|
|
1215
|
+
const _components = Object.assign({
|
|
1216
1216
|
h1: "h1",
|
|
1217
1217
|
a: "a",
|
|
1218
1218
|
p: "p",
|
|
@@ -1393,7 +1393,7 @@ function _createMdxContent(props) {
|
|
|
1393
1393
|
children: ["In addition to ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1394
1394
|
children: "\"dependencies\""
|
|
1395
1395
|
}), ", ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1396
|
-
href: "/en/guide/basic/before-getting-started#peerdependencies
|
|
1396
|
+
href: "/module-tools/en/guide/basic/before-getting-started.html#peerdependencies-3",
|
|
1397
1397
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1398
1398
|
children: "\"peerDependencies\""
|
|
1399
1399
|
})
|
|
@@ -2976,14 +2976,14 @@ function _createMdxContent(props) {
|
|
|
2976
2976
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
2977
2977
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
2978
2978
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2979
|
-
href: "/en/api/config/build-config#autoexternal
|
|
2979
|
+
href: "/module-tools/en/api/config/build-config.html#autoexternal-4",
|
|
2980
2980
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2981
2981
|
children: "buildConfig.autoExternal"
|
|
2982
2982
|
})
|
|
2983
2983
|
})
|
|
2984
2984
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
2985
2985
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2986
|
-
href: "/en/api/config/build-config#externals
|
|
2986
|
+
href: "/module-tools/en/api/config/build-config.html#externals-5",
|
|
2987
2987
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2988
2988
|
children: "buildConfig.externals"
|
|
2989
2989
|
})
|
|
@@ -3788,21 +3788,17 @@ function _createMdxContent(props) {
|
|
|
3788
3788
|
})]
|
|
3789
3789
|
});
|
|
3790
3790
|
}
|
|
3791
|
-
function MDXContent() {
|
|
3792
|
-
|
|
3793
|
-
var _ref = props.components || {},
|
|
3794
|
-
MDXLayout = _ref.wrapper;
|
|
3791
|
+
function MDXContent(props = {}) {
|
|
3792
|
+
const {wrapper: MDXLayout} = props.components || ({});
|
|
3795
3793
|
return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
|
|
3796
3794
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
|
|
3797
3795
|
})) : _createMdxContent(props);
|
|
3798
3796
|
}
|
|
3799
|
-
_c = MDXContent;
|
|
3800
3797
|
/* harmony default export */ __webpack_exports__["default"] = (MDXContent);
|
|
3801
3798
|
function _missingMdxReference(id, component, place) {
|
|
3802
|
-
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/
|
|
3799
|
+
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/targeral/github/targeral-modern-js/website/module-tools/docs/en/guide/advance/external-dependency.mdx`" : ""));
|
|
3803
3800
|
}
|
|
3804
|
-
|
|
3805
|
-
__webpack_require__.$Refresh$.register(_c, "MDXContent");
|
|
3801
|
+
|
|
3806
3802
|
|
|
3807
3803
|
/***/ })
|
|
3808
3804
|
|