@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["
|
|
2
|
+
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["zh_guide_basic_modify-output-product"],{
|
|
3
3
|
|
|
4
4
|
/***/ "./docs/zh/guide/basic/modify-output-product.md":
|
|
5
5
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -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/zh/guide/basic/modify-output-product.md"
|
|
1189
1189
|
};
|
|
1190
|
-
|
|
1190
|
+
const frontmatter = {
|
|
1191
1191
|
"sidebar_position": 3
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
const toc = [{
|
|
1194
1194
|
"id": "默认输出产物",
|
|
1195
1195
|
"text": "默认输出产物",
|
|
1196
1196
|
"depth": 2
|
|
@@ -1215,10 +1215,10 @@ var toc = [{
|
|
|
1215
1215
|
"text": "什么时候使用 buildConfig",
|
|
1216
1216
|
"depth": 2
|
|
1217
1217
|
}];
|
|
1218
|
-
|
|
1219
|
-
|
|
1218
|
+
const title = `修改输出产物`;
|
|
1219
|
+
const content = "\"---\\nsidebar_position: 3\\n---\\n\\n# 修改输出产物\\n\\n## 默认输出产物\\n\\n当在初始化的项目里使用 `modern build` 命令的时候,会根据 Module Tools 默认支持的配置生成相应的产物。默认支持的配置具体如下:\\n\\n```typescript\\nimport moduleTools, { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n plugins: [moduleTools()],\\n buildPreset: 'npm-library',\\n});\\n```\\n\\n**默认生成产物具有以下特点**:\\n\\n- 会生成[CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules)和[ESM](https://nodejs.org/api/esm.html#modules-ecmascript-modules)两份产物。\\n- 代码语法支持到 `ES6` ,更高级的语法将会被转换。\\n- 所有的代码经过打包变成了一个文件,即进行了 **bundle** 处理。\\n- 产物输出根目录为项目下的 `dist` 目录,类型文件输出的目录为 `dist/types`。\\n\\n看到这里你可能会有以下疑问:\\n\\n1. `buildPreset` 是什么?\\n2. 产物的这些特点是由什么决定的?\\n\\n那么接下来首先解释一下 `buildPreset`。\\n\\n## 构建预设\\n\\n`buildPreset` 代表着提前准备好的一组或者多组构建相关的配置,只需要使用 `buildPreset` 对应的预设值,就可以省去麻烦且复杂的配置工作,得到符合预期的产物。\\n\\n### 构建预设的字符串形式\\n\\n**构建预设的值可以是字符串形式**,因此这样形式的构建预设叫做预设字符串。\\n\\n模块工程解决方案根据 npm 包使用的通用场景,提供了通用的构建预设字符串以及相应的变体。目前支持的所有预设字符串可以通过 [BuildPreset API](/api/config/build-preset) 查看。这里讲解一下关于**通用的预设字符串与变体之间的关系**。\\n\\n在通用的预设字符串中,`\\\"npm-library\\\"` 可以用于在开发库类型的 npm 包的场景下使用,它适合大多数普通的模块类型项目。当设置 `\\\"npm-library\\\"` 的时候,项目的输出产物会有以下特点:\\n\\n- 在 `dist/lib` 目录下会得到代码格式为 `cjs`、语法支持到 `es6` 且经过打包处理后的产物。\\n- 在 `dist/es` 目录下会得到代码格式为 `esm`、语法支持为 `es6` 且经过打包处理后的产物。\\n- 在 `dist/types` 目录下会得到类型文件。如果不是 TypeScript 项目,则没有该目录。\\n\\n而预设字符串 `\\\"npm-library\\\"` 对应的变体则是在原本产物的基础上修改了**代码语法支持**这一特点,同时在字符串命名上也变为了 `\\\"npm-library-[es5 | es2016...es2020 | esnext]\\\"` 这样的形式。\\n\\n例如,如果在预设字符串 `\\\"npm-library\\\"` 对应的输出产物基础上,让产物代码支持的语法变为 `es5` 的话,那么只需要将 `\\\"npm-library\\\"` 改变为 `\\\"npm-library-es5\\\"` 就可以了。\\n\\n### 构建预设的函数形式\\n\\n**除了字符串形式以外,构建预设的值也可以是函数形式,在函数中可以打印或者修改某个预设值对应的具体配置**。\\n\\n例如,如果使用预设函数的形式达到预设字符串 `\\\"npm-library-es5\\\"` 同样的效果,可以按照如下的方式:\\n\\n```typescript\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildPreset({ preset }) {\\n return preset.NPM_LIBRARY.map(config => {\\n return { ...config, target: 'es5' };\\n });\\n },\\n});\\n```\\n\\n在上面的代码实现中,`preset.NPM_LIBRARY` 与预设字符串 `\\\"npm-library\\\"` 是相对应的,它代表着 `\\\"npm-library\\\"` 等价的多组构建相关的配置。我们通过 `map` 方法遍历了 `NPM_LIBRARY` 这个数组,在这个数组中包含了多个 `buildConfig` 对象。我们将原本的 `buildConfig` 对象进行了浅拷贝并修改了浅拷贝后得到 `buildConfig.target`,将它指定为 `es5`。\\n\\n> 关于 `preset.NPM_LIBRARY` 具体对应的值,可以通过 [BuildPreset API](/api/config/build-preset) 查看。在 `preset` 对象下不仅包含了 `NPM_LIBRARY`,还包含了其他类似的常量。\\n\\n那么这里的 `buildConfig` 对象是什么呢?之前提到的构建产物特点又是根据什么呢?\\n\\n接下来我们解释一下。\\n\\n## 构建配置(对象)\\n\\n**`buildConfig` 是一个用来描述如何编译、生成构建产物的配置对象**。在最开始提到的关于“_构建产物的特点_”,其实都是 `buildConfig` 所支持的属性。目前所支持的属性覆盖了大部分模块类型项目在构建产物时的需求,`buildConfig` 不仅包含一些产物所具备的属性,也包含了构建产物所需要的一些特性功能。接下来从分类的角度简单罗列一下:\\n\\n**构建产物的基本属性包括:**\\n\\n- 产物是否被打包:对应的 API 是 [`buildConfig.buildType`](/api/config/build-config#buildtype)。\\n- 产物对于语法的支持:对应的 API 是 [`buildConfig.target`](/api/config/build-config#target)。\\n- 产物格式:对应的 API 是 [`buildConfig.format`](/api/config/build-config#format)。\\n- 产物类型文件如何处理,对应的 API 是 [`buildConfig.dts`](/api/config/build-config#dts)。\\n- 产物的 sourceMap 如何处理:对应的 API 是 [`buildConfig.sourceMap`](/api/config/build-config#sourcemap)。\\n- 产物对应的输入(或者是源文件):对应的 API 是 [`buildConfig.input`](/api/config/build-config#input)。\\n- 产物输出的目录:对应的 API 是 [`buildConfig.outDir`](/api/config/build-config#outDir)。\\n- 构建的源码目录:对应的 API 是 [`buildConfig.sourceDir`](/api/config/build-config#sourcedir)。\\n\\n**构建产物所需的常用功能包括:**\\n\\n- 别名:对应的 API 是 [`buildConfig.alias`](/api/config/build-config#alias)。\\n- 静态资源处理:对应的 API 是 [`buildConfig.asset`](/api/config/build-config#asset)。\\n- 第三方依赖处理:对应的 API 有:\\n - [`buildConfig.autoExternal`](/api/config/build-config#autoexternal)。\\n - [`buildConfig.externals`](/api/config/build-config#externals)。\\n- 拷贝:对应的 API 是 [`buildConfig.copy`](/api/config/build-config#copy)。\\n- 全局变量替换:对应的 API 是 [`buildConfig.define`](/api/config/build-config#define)。\\n- 指定 [JSX](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) 编译方式,对应的 API 是 [`buildConfig.jsx`](/api/config/build-config#jsx)。\\n\\n**一些高级属性或者使用频率不高的功能:**\\n\\n- 产物代码压缩:对应的 API 是 [`buildConfig.minify`](/api/config/build-config#minify)。\\n- 代码分割:[`buildConfig.spitting`](/api/config/build-config#splitting)\\n- 指定构建产物用于 NodeJS 环境还是浏览器环境:对应的 API 是 [`buildConfig.platform`](/api/config/build-config#platform)。\\n- umd 产物相关:\\n - 指定 umd 产物外部导入的全局变量:对应的 API 是 [`buildConfig.umdGlobals`](/api/config/build-config#umdglobals)。\\n - 指定 umd 产物的模块名:对应的 API 是 [`buildConfig.umdModuleName`](/api/config/build-config#umdmodulename)。\\n\\n除了以上分类以外,关于这些 API 的常见问题和最佳实践可以通过下面的链接来了解\\n\\n- [什么是 `bundle` 和 `bundleless`?](/guide/advance/in-depth-about-build#bundle-和-bundleless)\\n- [`input` 与 `sourceDir` 的关系](/guide/advance/in-depth-about-build#input-与-sourcedir-的关系)。\\n- [产物中类型文件的多种生成方式](/guide/advance/in-depth-about-build#类型文件)。\\n- [`buildConfig.define` 不同场景的使用方式。](/guide/advance/in-depth-about-build#buildconfigdefine-不同场景的使用方式)\\n- [如何处理第三方依赖?](/guide/advance/external-dependency)\\n- [如何使用拷贝?](/guide/advance/copy)\\n- [如何构建 umd 产物?](/guide/advance/build-umd#设置项目的全局变量名称)\\n- [静态资源目前所支持的能力。](/guide/advance/asset)\\n\\n## 什么时候使用 `buildConfig`\\n\\n`buildConfig` 是用于修改产物的方式之一,**当与 `buildPreset` 配置同时存在的时候,只有 `buildConfig` 才会生效**。因此如果按照如下方式配置:\\n\\n```typescript\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildConfig: {\\n format: 'umd',\\n },\\n buildPreset: 'npm-library',\\n});\\n```\\n\\n那么此时就会看到如下提示:\\n\\n```bash\\n因为同时出现 'buildConfig' 和 'buildPreset' 配置,因此仅 'buildConfig' 配置生效\\n```\\n\\n`buildPreset` 代表的一组或者多组构建相关的配置都是由 `buildConfig` 组成,**当使用 `buildPreset` 无法满足当前项目需求的时候,就可以使用 `buildConfig` 来自定义输出产物**。\\n\\n在使用 `buildConfig` 的过程,就是对**获得怎样的构建产物**的思考过程。\\n\"";
|
|
1220
1220
|
function _createMdxContent(props) {
|
|
1221
|
-
|
|
1221
|
+
const _components = Object.assign({
|
|
1222
1222
|
h1: "h1",
|
|
1223
1223
|
a: "a",
|
|
1224
1224
|
h2: "h2",
|
|
@@ -1227,14 +1227,13 @@ function _createMdxContent(props) {
|
|
|
1227
1227
|
strong: "strong",
|
|
1228
1228
|
ul: "ul",
|
|
1229
1229
|
li: "li",
|
|
1230
|
-
div: "div",
|
|
1231
1230
|
ol: "ol",
|
|
1232
1231
|
h3: "h3",
|
|
1233
1232
|
blockquote: "blockquote",
|
|
1234
1233
|
em: "em"
|
|
1235
1234
|
}, props.components);
|
|
1236
|
-
if (!CH) _missingMdxReference("CH", false, "11:1-
|
|
1237
|
-
if (!CH.Code) _missingMdxReference("CH.Code", true, "11:1-
|
|
1235
|
+
if (!CH) _missingMdxReference("CH", false, "11:1-18:4");
|
|
1236
|
+
if (!CH.Code) _missingMdxReference("CH.Code", true, "11:1-18:4");
|
|
1238
1237
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
1239
1238
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h1, {
|
|
1240
1239
|
id: "修改输出产物",
|
|
@@ -1282,6 +1281,27 @@ function _createMdxContent(props) {
|
|
|
1282
1281
|
"color": "#D8DEE9FF"
|
|
1283
1282
|
}
|
|
1284
1283
|
}
|
|
1284
|
+
}, {
|
|
1285
|
+
"content": "moduleTools",
|
|
1286
|
+
"props": {
|
|
1287
|
+
"style": {
|
|
1288
|
+
"color": "#D8DEE9"
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
}, {
|
|
1292
|
+
"content": ",",
|
|
1293
|
+
"props": {
|
|
1294
|
+
"style": {
|
|
1295
|
+
"color": "#ECEFF4"
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}, {
|
|
1299
|
+
"content": " ",
|
|
1300
|
+
"props": {
|
|
1301
|
+
"style": {
|
|
1302
|
+
"color": "#D8DEE9FF"
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1285
1305
|
}, {
|
|
1286
1306
|
"content": "{",
|
|
1287
1307
|
"props": {
|
|
@@ -1420,6 +1440,57 @@ function _createMdxContent(props) {
|
|
|
1420
1440
|
}
|
|
1421
1441
|
}
|
|
1422
1442
|
}]
|
|
1443
|
+
}, {
|
|
1444
|
+
"tokens": [{
|
|
1445
|
+
"content": " ",
|
|
1446
|
+
"props": {
|
|
1447
|
+
"style": {
|
|
1448
|
+
"color": "#D8DEE9FF"
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}, {
|
|
1452
|
+
"content": "plugins",
|
|
1453
|
+
"props": {
|
|
1454
|
+
"style": {
|
|
1455
|
+
"color": "#D8DEE9"
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
}, {
|
|
1459
|
+
"content": ":",
|
|
1460
|
+
"props": {
|
|
1461
|
+
"style": {
|
|
1462
|
+
"color": "#ECEFF4"
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
}, {
|
|
1466
|
+
"content": " [",
|
|
1467
|
+
"props": {
|
|
1468
|
+
"style": {
|
|
1469
|
+
"color": "#D8DEE9FF"
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
}, {
|
|
1473
|
+
"content": "moduleTools",
|
|
1474
|
+
"props": {
|
|
1475
|
+
"style": {
|
|
1476
|
+
"color": "#88C0D0"
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
}, {
|
|
1480
|
+
"content": "()]",
|
|
1481
|
+
"props": {
|
|
1482
|
+
"style": {
|
|
1483
|
+
"color": "#D8DEE9FF"
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}, {
|
|
1487
|
+
"content": ",",
|
|
1488
|
+
"props": {
|
|
1489
|
+
"style": {
|
|
1490
|
+
"color": "#ECEFF4"
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
}]
|
|
1423
1494
|
}, {
|
|
1424
1495
|
"tokens": [{
|
|
1425
1496
|
"content": " ",
|
|
@@ -1457,7 +1528,7 @@ function _createMdxContent(props) {
|
|
|
1457
1528
|
}
|
|
1458
1529
|
}
|
|
1459
1530
|
}, {
|
|
1460
|
-
"content": "
|
|
1531
|
+
"content": "npm-library",
|
|
1461
1532
|
"props": {
|
|
1462
1533
|
"style": {
|
|
1463
1534
|
"color": "#A3BE8C"
|
|
@@ -1512,16 +1583,21 @@ function _createMdxContent(props) {
|
|
|
1512
1583
|
}), ":"]
|
|
1513
1584
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
1514
1585
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
1515
|
-
children: ["
|
|
1586
|
+
children: ["会生成", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1516
1587
|
href: "https://nodejs.org/api/modules.html#modules-commonjs-modules",
|
|
1588
|
+
target: "_blank",
|
|
1589
|
+
rel: "nofollow",
|
|
1517
1590
|
children: "CommonJS"
|
|
1518
|
-
}), "
|
|
1519
|
-
|
|
1520
|
-
|
|
1591
|
+
}), "和", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1592
|
+
href: "https://nodejs.org/api/esm.html#modules-ecmascript-modules",
|
|
1593
|
+
target: "_blank",
|
|
1594
|
+
rel: "nofollow",
|
|
1595
|
+
children: "ESM"
|
|
1596
|
+
}), "两份产物。"]
|
|
1521
1597
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
1522
1598
|
children: ["代码语法支持到 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1523
1599
|
children: "ES6"
|
|
1524
|
-
}), "
|
|
1600
|
+
}), " ,更高级的语法将会被转换。"]
|
|
1525
1601
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
1526
1602
|
children: ["所有的代码经过打包变成了一个文件,即进行了 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.strong, {
|
|
1527
1603
|
children: "bundle"
|
|
@@ -1533,25 +1609,6 @@ function _createMdxContent(props) {
|
|
|
1533
1609
|
children: "dist/types"
|
|
1534
1610
|
}), "。"]
|
|
1535
1611
|
}), "\n"]
|
|
1536
|
-
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.div, {
|
|
1537
|
-
className: "modern-directive tip",
|
|
1538
|
-
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
|
|
1539
|
-
className: "modern-directive-title",
|
|
1540
|
-
children: "TIP"
|
|
1541
|
-
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.div, {
|
|
1542
|
-
className: "island-directive-content",
|
|
1543
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ol, {
|
|
1544
|
-
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
1545
|
-
children: ["所谓“代码语法支持到 ES6”的意思是指:产物代码所支持的语法不会超过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1546
|
-
children: "ES6"
|
|
1547
|
-
}), "。如果源码中使用语法是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1548
|
-
children: "ES6"
|
|
1549
|
-
}), " 以上的语法(例如 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1550
|
-
children: "ES2017"
|
|
1551
|
-
}), "),则会被进行转换。"]
|
|
1552
|
-
}), "\n"]
|
|
1553
|
-
})
|
|
1554
|
-
})]
|
|
1555
1612
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
|
|
1556
1613
|
children: "看到这里你可能会有以下疑问:"
|
|
1557
1614
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ol, {
|
|
@@ -1594,7 +1651,7 @@ function _createMdxContent(props) {
|
|
|
1594
1651
|
}), ",因此这样形式的构建预设叫做预设字符串。"]
|
|
1595
1652
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
1596
1653
|
children: ["模块工程解决方案根据 npm 包使用的通用场景,提供了通用的构建预设字符串以及相应的变体。目前支持的所有预设字符串可以通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1597
|
-
href: "/api/config/build-
|
|
1654
|
+
href: "/module-tools/api/config/build-preset.html",
|
|
1598
1655
|
children: "BuildPreset API"
|
|
1599
1656
|
}), " 查看。这里讲解一下关于", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.strong, {
|
|
1600
1657
|
children: "通用的预设字符串与变体之间的关系"
|
|
@@ -1639,11 +1696,11 @@ function _createMdxContent(props) {
|
|
|
1639
1696
|
children: ["例如,如果在预设字符串 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1640
1697
|
children: "\"npm-library\""
|
|
1641
1698
|
}), " 对应的输出产物基础上,让产物代码支持的语法变为 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1642
|
-
children: "
|
|
1699
|
+
children: "es5"
|
|
1643
1700
|
}), " 的话,那么只需要将 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1644
1701
|
children: "\"npm-library\""
|
|
1645
1702
|
}), " 改变为 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1646
|
-
children: "\"npm-library-
|
|
1703
|
+
children: "\"npm-library-es5\""
|
|
1647
1704
|
}), " 就可以了。"]
|
|
1648
1705
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h3, {
|
|
1649
1706
|
id: "构建预设的函数形式",
|
|
@@ -1659,7 +1716,7 @@ function _createMdxContent(props) {
|
|
|
1659
1716
|
}), "。"]
|
|
1660
1717
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
1661
1718
|
children: ["例如,如果使用预设函数的形式达到预设字符串 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1662
|
-
children: "\"npm-library-
|
|
1719
|
+
children: "\"npm-library-es5\""
|
|
1663
1720
|
}), " 同样的效果,可以按照如下的方式:"]
|
|
1664
1721
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.Code, {
|
|
1665
1722
|
codeConfig: chCodeConfig,
|
|
@@ -2083,7 +2140,7 @@ function _createMdxContent(props) {
|
|
|
2083
2140
|
}
|
|
2084
2141
|
}
|
|
2085
2142
|
}, {
|
|
2086
|
-
"content": "
|
|
2143
|
+
"content": "es5",
|
|
2087
2144
|
"props": {
|
|
2088
2145
|
"style": {
|
|
2089
2146
|
"color": "#A3BE8C"
|
|
@@ -2210,14 +2267,14 @@ function _createMdxContent(props) {
|
|
|
2210
2267
|
}), " 对象进行了浅拷贝并修改了浅拷贝后得到 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2211
2268
|
children: "buildConfig.target"
|
|
2212
2269
|
}), ",将它指定为 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2213
|
-
children: "
|
|
2270
|
+
children: "es5"
|
|
2214
2271
|
}), "。"]
|
|
2215
2272
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.blockquote, {
|
|
2216
2273
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
2217
2274
|
children: ["关于 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2218
2275
|
children: "preset.NPM_LIBRARY"
|
|
2219
2276
|
}), " 具体对应的值,可以通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2220
|
-
href: "/api/config/build-
|
|
2277
|
+
href: "/module-tools/api/config/build-preset.html",
|
|
2221
2278
|
children: "BuildPreset API"
|
|
2222
2279
|
}), " 查看。在 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2223
2280
|
children: "preset"
|
|
@@ -2258,56 +2315,56 @@ function _createMdxContent(props) {
|
|
|
2258
2315
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
2259
2316
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2260
2317
|
children: ["产物是否被打包:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2261
|
-
href: "/api/config/build-config#buildtype
|
|
2318
|
+
href: "/module-tools/api/config/build-config.html#buildtype",
|
|
2262
2319
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2263
2320
|
children: "buildConfig.buildType"
|
|
2264
2321
|
})
|
|
2265
2322
|
}), "。"]
|
|
2266
2323
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2267
2324
|
children: ["产物对于语法的支持:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2268
|
-
href: "/api/config/build-config#target
|
|
2325
|
+
href: "/module-tools/api/config/build-config.html#target",
|
|
2269
2326
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2270
2327
|
children: "buildConfig.target"
|
|
2271
2328
|
})
|
|
2272
2329
|
}), "。"]
|
|
2273
2330
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2274
2331
|
children: ["产物格式:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2275
|
-
href: "/api/config/build-config#format
|
|
2332
|
+
href: "/module-tools/api/config/build-config.html#format",
|
|
2276
2333
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2277
2334
|
children: "buildConfig.format"
|
|
2278
2335
|
})
|
|
2279
2336
|
}), "。"]
|
|
2280
2337
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2281
2338
|
children: ["产物类型文件如何处理,对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2282
|
-
href: "/api/config/build-config#dts
|
|
2339
|
+
href: "/module-tools/api/config/build-config.html#dts",
|
|
2283
2340
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2284
2341
|
children: "buildConfig.dts"
|
|
2285
2342
|
})
|
|
2286
2343
|
}), "。"]
|
|
2287
2344
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2288
2345
|
children: ["产物的 sourceMap 如何处理:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2289
|
-
href: "/api/config/build-config#sourcemap
|
|
2346
|
+
href: "/module-tools/api/config/build-config.html#sourcemap",
|
|
2290
2347
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2291
2348
|
children: "buildConfig.sourceMap"
|
|
2292
2349
|
})
|
|
2293
2350
|
}), "。"]
|
|
2294
2351
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2295
2352
|
children: ["产物对应的输入(或者是源文件):对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2296
|
-
href: "/api/config/build-config#input
|
|
2353
|
+
href: "/module-tools/api/config/build-config.html#input",
|
|
2297
2354
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2298
2355
|
children: "buildConfig.input"
|
|
2299
2356
|
})
|
|
2300
2357
|
}), "。"]
|
|
2301
2358
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2302
2359
|
children: ["产物输出的目录:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2303
|
-
href: "/api/config/build-config
|
|
2360
|
+
href: "/module-tools/api/config/build-config.html#outdir-2",
|
|
2304
2361
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2305
2362
|
children: "buildConfig.outDir"
|
|
2306
2363
|
})
|
|
2307
2364
|
}), "。"]
|
|
2308
2365
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2309
2366
|
children: ["构建的源码目录:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2310
|
-
href: "/api/config/build-config#sourcedir
|
|
2367
|
+
href: "/module-tools/api/config/build-config.html#sourcedir",
|
|
2311
2368
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2312
2369
|
children: "buildConfig.sourceDir"
|
|
2313
2370
|
})
|
|
@@ -2320,14 +2377,14 @@ function _createMdxContent(props) {
|
|
|
2320
2377
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
2321
2378
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2322
2379
|
children: ["别名:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2323
|
-
href: "/api/config/build-config#alias
|
|
2380
|
+
href: "/module-tools/api/config/build-config.html#alias",
|
|
2324
2381
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2325
2382
|
children: "buildConfig.alias"
|
|
2326
2383
|
})
|
|
2327
2384
|
}), "。"]
|
|
2328
2385
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2329
2386
|
children: ["静态资源处理:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2330
|
-
href: "/api/config/build-config#asset
|
|
2387
|
+
href: "/module-tools/api/config/build-config.html#asset",
|
|
2331
2388
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2332
2389
|
children: "buildConfig.asset"
|
|
2333
2390
|
})
|
|
@@ -2336,14 +2393,14 @@ function _createMdxContent(props) {
|
|
|
2336
2393
|
children: ["第三方依赖处理:对应的 API 有:", "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
2337
2394
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2338
2395
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2339
|
-
href: "/api/config/build-config#autoexternal
|
|
2396
|
+
href: "/module-tools/api/config/build-config.html#autoexternal",
|
|
2340
2397
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2341
2398
|
children: "buildConfig.autoExternal"
|
|
2342
2399
|
})
|
|
2343
2400
|
}), "。"]
|
|
2344
2401
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2345
2402
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2346
|
-
href: "/api/config/build-config#externals
|
|
2403
|
+
href: "/module-tools/api/config/build-config.html#externals",
|
|
2347
2404
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2348
2405
|
children: "buildConfig.externals"
|
|
2349
2406
|
})
|
|
@@ -2352,14 +2409,14 @@ function _createMdxContent(props) {
|
|
|
2352
2409
|
}), "\n"]
|
|
2353
2410
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2354
2411
|
children: ["拷贝:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2355
|
-
href: "/api/config/build-config#copy
|
|
2412
|
+
href: "/module-tools/api/config/build-config.html#copy",
|
|
2356
2413
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2357
2414
|
children: "buildConfig.copy"
|
|
2358
2415
|
})
|
|
2359
2416
|
}), "。"]
|
|
2360
2417
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2361
2418
|
children: ["全局变量替换:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2362
|
-
href: "/api/config/build-config#define
|
|
2419
|
+
href: "/module-tools/api/config/build-config.html#define",
|
|
2363
2420
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2364
2421
|
children: "buildConfig.define"
|
|
2365
2422
|
})
|
|
@@ -2367,9 +2424,11 @@ function _createMdxContent(props) {
|
|
|
2367
2424
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2368
2425
|
children: ["指定 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2369
2426
|
href: "https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html",
|
|
2427
|
+
target: "_blank",
|
|
2428
|
+
rel: "nofollow",
|
|
2370
2429
|
children: "JSX"
|
|
2371
2430
|
}), " 编译方式,对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2372
|
-
href: "/api/config/build-config#jsx
|
|
2431
|
+
href: "/module-tools/api/config/build-config.html#jsx",
|
|
2373
2432
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2374
2433
|
children: "buildConfig.jsx"
|
|
2375
2434
|
})
|
|
@@ -2382,21 +2441,21 @@ function _createMdxContent(props) {
|
|
|
2382
2441
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
2383
2442
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2384
2443
|
children: ["产物代码压缩:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2385
|
-
href: "/api/config/build-config#minify
|
|
2444
|
+
href: "/module-tools/api/config/build-config.html#minify",
|
|
2386
2445
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2387
2446
|
children: "buildConfig.minify"
|
|
2388
2447
|
})
|
|
2389
2448
|
}), "。"]
|
|
2390
2449
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2391
2450
|
children: ["代码分割:", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2392
|
-
href: "/api/config/build-config#splitting
|
|
2451
|
+
href: "/module-tools/api/config/build-config.html#splitting",
|
|
2393
2452
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2394
2453
|
children: "buildConfig.spitting"
|
|
2395
2454
|
})
|
|
2396
2455
|
})]
|
|
2397
2456
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2398
2457
|
children: ["指定构建产物用于 NodeJS 环境还是浏览器环境:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2399
|
-
href: "/api/config/build-config#platform
|
|
2458
|
+
href: "/module-tools/api/config/build-config.html#platform",
|
|
2400
2459
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2401
2460
|
children: "buildConfig.platform"
|
|
2402
2461
|
})
|
|
@@ -2405,14 +2464,14 @@ function _createMdxContent(props) {
|
|
|
2405
2464
|
children: ["umd 产物相关:", "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
2406
2465
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2407
2466
|
children: ["指定 umd 产物外部导入的全局变量:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2408
|
-
href: "/api/config/build-config#umdglobals
|
|
2467
|
+
href: "/module-tools/api/config/build-config.html#umdglobals",
|
|
2409
2468
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2410
2469
|
children: "buildConfig.umdGlobals"
|
|
2411
2470
|
})
|
|
2412
2471
|
}), "。"]
|
|
2413
2472
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2414
2473
|
children: ["指定 umd 产物的模块名:对应的 API 是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2415
|
-
href: "/api/config/build-config#umdmodulename
|
|
2474
|
+
href: "/module-tools/api/config/build-config.html#umdmodulename",
|
|
2416
2475
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2417
2476
|
children: "buildConfig.umdModuleName"
|
|
2418
2477
|
})
|
|
@@ -2421,11 +2480,11 @@ function _createMdxContent(props) {
|
|
|
2421
2480
|
}), "\n"]
|
|
2422
2481
|
}), "\n"]
|
|
2423
2482
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
|
|
2424
|
-
children: "除了以上分类以外,关于这些 API
|
|
2483
|
+
children: "除了以上分类以外,关于这些 API 的常见问题和最佳实践可以通过下面的链接来了解"
|
|
2425
2484
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
2426
2485
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
2427
2486
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.a, {
|
|
2428
|
-
href: "/guide/advance/in-depth-about-build#bundle-%E5%92%8C-bundleless
|
|
2487
|
+
href: "/module-tools/guide/advance/in-depth-about-build.html#bundle-%E5%92%8C-bundleless",
|
|
2429
2488
|
children: ["什么是 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2430
2489
|
children: "bundle"
|
|
2431
2490
|
}), " 和 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
@@ -2434,7 +2493,7 @@ function _createMdxContent(props) {
|
|
|
2434
2493
|
})
|
|
2435
2494
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2436
2495
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.a, {
|
|
2437
|
-
href: "/guide/advance/in-depth-about-build#input-%E4%B8%8E-sourcedir-%E7%9A%84%E5%85%B3%E7%B3%BB
|
|
2496
|
+
href: "/module-tools/guide/advance/in-depth-about-build.html#input-%E4%B8%8E-sourcedir-%E7%9A%84%E5%85%B3%E7%B3%BB",
|
|
2438
2497
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2439
2498
|
children: "input"
|
|
2440
2499
|
}), " 与 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
@@ -2443,34 +2502,34 @@ function _createMdxContent(props) {
|
|
|
2443
2502
|
}), "。"]
|
|
2444
2503
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
2445
2504
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2446
|
-
href: "/guide/advance/in-depth-about-build#%E7%B1%BB%E5%9E%8B%E6%96%87%E4%BB%B6
|
|
2505
|
+
href: "/module-tools/guide/advance/in-depth-about-build.html#%E7%B1%BB%E5%9E%8B%E6%96%87%E4%BB%B6",
|
|
2447
2506
|
children: "产物中类型文件的多种生成方式"
|
|
2448
2507
|
}), "。"]
|
|
2449
2508
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
2450
2509
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.a, {
|
|
2451
|
-
href: "/guide/advance/in-depth-about-build#buildconfigdefine-%E4%B8%8D%E5%90%8C%E5%9C%BA%E6%99%AF%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F
|
|
2510
|
+
href: "/module-tools/guide/advance/in-depth-about-build.html#buildconfigdefine-%E4%B8%8D%E5%90%8C%E5%9C%BA%E6%99%AF%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F",
|
|
2452
2511
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2453
2512
|
children: "buildConfig.define"
|
|
2454
2513
|
}), " 不同场景的使用方式。"]
|
|
2455
2514
|
})
|
|
2456
2515
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
2457
2516
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2458
|
-
href: "/guide/advance/external-dependency.html",
|
|
2517
|
+
href: "/module-tools/guide/advance/external-dependency.html",
|
|
2459
2518
|
children: "如何处理第三方依赖?"
|
|
2460
2519
|
})
|
|
2461
2520
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
2462
2521
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2463
|
-
href: "/guide/advance/copy.html",
|
|
2522
|
+
href: "/module-tools/guide/advance/copy.html",
|
|
2464
2523
|
children: "如何使用拷贝?"
|
|
2465
2524
|
})
|
|
2466
2525
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
2467
2526
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2468
|
-
href: "/guide/advance/build-umd#%E8%AE%BE%E7%BD%AE%E9%A1%B9%E7%9B%AE%E7%9A%84%E5%85%A8%E5%B1%80%E5%8F%98%E9%87%8F%E5%90%8D%E7%A7%B0
|
|
2527
|
+
href: "/module-tools/guide/advance/build-umd.html#%E8%AE%BE%E7%BD%AE%E9%A1%B9%E7%9B%AE%E7%9A%84%E5%85%A8%E5%B1%80%E5%8F%98%E9%87%8F%E5%90%8D%E7%A7%B0",
|
|
2469
2528
|
children: "如何构建 umd 产物?"
|
|
2470
2529
|
})
|
|
2471
2530
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
2472
2531
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2473
|
-
href: "/guide/advance/asset.html",
|
|
2532
|
+
href: "/module-tools/guide/advance/asset.html",
|
|
2474
2533
|
children: "静态资源目前所支持的能力。"
|
|
2475
2534
|
})
|
|
2476
2535
|
}), "\n"]
|
|
@@ -2681,26 +2740,70 @@ function _createMdxContent(props) {
|
|
|
2681
2740
|
}
|
|
2682
2741
|
}
|
|
2683
2742
|
}, {
|
|
2684
|
-
"content": "
|
|
2743
|
+
"content": " ",
|
|
2685
2744
|
"props": {
|
|
2686
2745
|
"style": {
|
|
2687
2746
|
"color": "#D8DEE9FF"
|
|
2688
2747
|
}
|
|
2689
2748
|
}
|
|
2690
2749
|
}, {
|
|
2691
|
-
"content": "{
|
|
2750
|
+
"content": "{",
|
|
2692
2751
|
"props": {
|
|
2693
2752
|
"style": {
|
|
2694
2753
|
"color": "#ECEFF4"
|
|
2695
2754
|
}
|
|
2696
2755
|
}
|
|
2756
|
+
}]
|
|
2757
|
+
}, {
|
|
2758
|
+
"tokens": [{
|
|
2759
|
+
"content": " ",
|
|
2760
|
+
"props": {
|
|
2761
|
+
"style": {
|
|
2762
|
+
"color": "#D8DEE9FF"
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2697
2765
|
}, {
|
|
2698
|
-
"content": "
|
|
2766
|
+
"content": "format",
|
|
2767
|
+
"props": {
|
|
2768
|
+
"style": {
|
|
2769
|
+
"color": "#D8DEE9"
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
}, {
|
|
2773
|
+
"content": ":",
|
|
2774
|
+
"props": {
|
|
2775
|
+
"style": {
|
|
2776
|
+
"color": "#ECEFF4"
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
}, {
|
|
2780
|
+
"content": " ",
|
|
2699
2781
|
"props": {
|
|
2700
2782
|
"style": {
|
|
2701
2783
|
"color": "#D8DEE9FF"
|
|
2702
2784
|
}
|
|
2703
2785
|
}
|
|
2786
|
+
}, {
|
|
2787
|
+
"content": "'",
|
|
2788
|
+
"props": {
|
|
2789
|
+
"style": {
|
|
2790
|
+
"color": "#ECEFF4"
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
}, {
|
|
2794
|
+
"content": "umd",
|
|
2795
|
+
"props": {
|
|
2796
|
+
"style": {
|
|
2797
|
+
"color": "#A3BE8C"
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
}, {
|
|
2801
|
+
"content": "'",
|
|
2802
|
+
"props": {
|
|
2803
|
+
"style": {
|
|
2804
|
+
"color": "#ECEFF4"
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2704
2807
|
}, {
|
|
2705
2808
|
"content": ",",
|
|
2706
2809
|
"props": {
|
|
@@ -2709,6 +2812,22 @@ function _createMdxContent(props) {
|
|
|
2709
2812
|
}
|
|
2710
2813
|
}
|
|
2711
2814
|
}]
|
|
2815
|
+
}, {
|
|
2816
|
+
"tokens": [{
|
|
2817
|
+
"content": " ",
|
|
2818
|
+
"props": {
|
|
2819
|
+
"style": {
|
|
2820
|
+
"color": "#D8DEE9FF"
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
}, {
|
|
2824
|
+
"content": "},",
|
|
2825
|
+
"props": {
|
|
2826
|
+
"style": {
|
|
2827
|
+
"color": "#ECEFF4"
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
}]
|
|
2712
2831
|
}, {
|
|
2713
2832
|
"tokens": [{
|
|
2714
2833
|
"content": " ",
|
|
@@ -2746,7 +2865,7 @@ function _createMdxContent(props) {
|
|
|
2746
2865
|
}
|
|
2747
2866
|
}
|
|
2748
2867
|
}, {
|
|
2749
|
-
"content": "
|
|
2868
|
+
"content": "npm-library",
|
|
2750
2869
|
"props": {
|
|
2751
2870
|
"style": {
|
|
2752
2871
|
"color": "#A3BE8C"
|
|
@@ -2921,29 +3040,25 @@ function _createMdxContent(props) {
|
|
|
2921
3040
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
2922
3041
|
children: ["在使用 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2923
3042
|
children: "buildConfig"
|
|
2924
|
-
}), "
|
|
3043
|
+
}), " 的过程,就是对", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.strong, {
|
|
2925
3044
|
children: "获得怎样的构建产物"
|
|
2926
|
-
}), "
|
|
3045
|
+
}), "的思考过程。"]
|
|
2927
3046
|
})]
|
|
2928
3047
|
});
|
|
2929
3048
|
}
|
|
2930
|
-
function MDXContent() {
|
|
2931
|
-
|
|
2932
|
-
var _ref = props.components || {},
|
|
2933
|
-
MDXLayout = _ref.wrapper;
|
|
3049
|
+
function MDXContent(props = {}) {
|
|
3050
|
+
const {wrapper: MDXLayout} = props.components || ({});
|
|
2934
3051
|
return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
|
|
2935
3052
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
|
|
2936
3053
|
})) : _createMdxContent(props);
|
|
2937
3054
|
}
|
|
2938
|
-
_c = MDXContent;
|
|
2939
3055
|
/* harmony default export */ __webpack_exports__["default"] = (MDXContent);
|
|
2940
3056
|
function _missingMdxReference(id, component, place) {
|
|
2941
|
-
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/
|
|
3057
|
+
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/zh/guide/basic/modify-output-product.md`" : ""));
|
|
2942
3058
|
}
|
|
2943
|
-
|
|
2944
|
-
__webpack_require__.$Refresh$.register(_c, "MDXContent");
|
|
3059
|
+
|
|
2945
3060
|
|
|
2946
3061
|
/***/ })
|
|
2947
3062
|
|
|
2948
3063
|
}]);
|
|
2949
|
-
//# sourceMappingURL=
|
|
3064
|
+
//# sourceMappingURL=zh_guide_basic_modify-output-product.js.map
|