@modern-js/module-tools-docs 2.2.0 → 2.3.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.
Files changed (156) hide show
  1. package/LICENSE +144 -0
  2. package/docs/en/api/plugin-api/plugin-hooks.md +2 -10
  3. package/docs/en/guide/advance/in-depth-about-dev-command.md +56 -12
  4. package/docs/en/guide/basic/before-getting-started.md +4 -14
  5. package/docs/en/guide/basic/command-preview.md +1 -1
  6. package/docs/en/guide/basic/modify-output-product.md +6 -2
  7. package/docs/en/guide/basic/use-micro-generator.md +62 -1
  8. package/docs/en/guide/basic/using-storybook.mdx +31 -9
  9. package/docs/en/guide/intro/getting-started.md +17 -8
  10. package/docs/en/index.md +14 -8
  11. package/docs/en/plugins/guide/getting-started.mdx +1 -1
  12. package/docs/zh/api/plugin-api/plugin-hooks.md +2 -10
  13. package/docs/zh/guide/advance/in-depth-about-dev-command.md +52 -13
  14. package/docs/zh/guide/basic/before-getting-started.md +4 -14
  15. package/docs/zh/guide/basic/command-preview.md +2 -2
  16. package/docs/zh/guide/basic/modify-output-product.md +5 -3
  17. package/docs/zh/guide/basic/publish-your-project.md +4 -4
  18. package/docs/zh/guide/basic/test-your-project.mdx +18 -5
  19. package/docs/zh/guide/basic/use-micro-generator.md +61 -1
  20. package/docs/zh/guide/basic/using-storybook.mdx +39 -13
  21. package/docs/zh/guide/intro/getting-started.md +17 -11
  22. package/docs/zh/index.md +16 -10
  23. package/docs/zh/plugins/guide/getting-started.mdx +1 -1
  24. package/modern.config.ts +4 -6
  25. package/package.json +4 -4
  26. package/doc_build/api/config/build-config.html +0 -332
  27. package/doc_build/api/config/build-preset.html +0 -43
  28. package/doc_build/api/config/design-system.html +0 -103
  29. package/doc_build/api/config/plugins.html +0 -7
  30. package/doc_build/api/config/testing.html +0 -21
  31. package/doc_build/api/index.html +0 -1
  32. package/doc_build/api/plugin-api/plugin-hooks.html +0 -113
  33. package/doc_build/en/api/config/build-config.html +0 -316
  34. package/doc_build/en/api/config/build-preset.html +0 -43
  35. package/doc_build/en/api/config/design-system.html +0 -117
  36. package/doc_build/en/api/config/plugins.html +0 -7
  37. package/doc_build/en/api/config/testing.html +0 -21
  38. package/doc_build/en/api/index.html +0 -1
  39. package/doc_build/en/api/plugin-api/plugin-hooks.html +0 -113
  40. package/doc_build/en/guide/advance/asset.html +0 -25
  41. package/doc_build/en/guide/advance/build-umd.html +0 -32
  42. package/doc_build/en/guide/advance/copy.html +0 -42
  43. package/doc_build/en/guide/advance/external-dependency.html +0 -31
  44. package/doc_build/en/guide/advance/in-depth-about-build.html +0 -112
  45. package/doc_build/en/guide/advance/in-depth-about-dev-command.html +0 -12
  46. package/doc_build/en/guide/advance/theme-config.html +0 -29
  47. package/doc_build/en/guide/basic/before-getting-started.html +0 -89
  48. package/doc_build/en/guide/basic/command-preview.html +0 -63
  49. package/doc_build/en/guide/basic/modify-output-product.html +0 -98
  50. package/doc_build/en/guide/basic/publish-your-project.html +0 -50
  51. package/doc_build/en/guide/basic/test-your-project.html +0 -31
  52. package/doc_build/en/guide/basic/use-micro-generator.html +0 -29
  53. package/doc_build/en/guide/basic/using-storybook.html +0 -66
  54. package/doc_build/en/guide/best-practices/components.html +0 -111
  55. package/doc_build/en/guide/intro/getting-started.html +0 -36
  56. package/doc_build/en/guide/intro/welcome.html +0 -13
  57. package/doc_build/en/guide/intro/why-module-engineering-solution.html +0 -9
  58. package/doc_build/en/index.html +0 -1
  59. package/doc_build/en/plugins/guide/getting-started.html +0 -15
  60. package/doc_build/en/plugins/guide/plugin-object.html +0 -14
  61. package/doc_build/en/plugins/guide/setup-function.html +0 -30
  62. package/doc_build/en/plugins/official-list/overview.html +0 -3
  63. package/doc_build/guide/advance/asset.html +0 -25
  64. package/doc_build/guide/advance/build-umd.html +0 -32
  65. package/doc_build/guide/advance/copy.html +0 -42
  66. package/doc_build/guide/advance/external-dependency.html +0 -31
  67. package/doc_build/guide/advance/in-depth-about-build.html +0 -112
  68. package/doc_build/guide/advance/in-depth-about-dev-command.html +0 -14
  69. package/doc_build/guide/advance/theme-config.html +0 -28
  70. package/doc_build/guide/basic/before-getting-started.html +0 -89
  71. package/doc_build/guide/basic/command-preview.html +0 -63
  72. package/doc_build/guide/basic/modify-output-product.html +0 -97
  73. package/doc_build/guide/basic/publish-your-project.html +0 -52
  74. package/doc_build/guide/basic/test-your-project.html +0 -32
  75. package/doc_build/guide/basic/use-micro-generator.html +0 -27
  76. package/doc_build/guide/basic/using-storybook.html +0 -67
  77. package/doc_build/guide/best-practices/components.html +0 -111
  78. package/doc_build/guide/intro/getting-started.html +0 -39
  79. package/doc_build/guide/intro/welcome.html +0 -13
  80. package/doc_build/guide/intro/why-module-engineering-solution.html +0 -9
  81. package/doc_build/index.html +0 -1
  82. package/doc_build/plugins/guide/getting-started.html +0 -15
  83. package/doc_build/plugins/guide/plugin-object.html +0 -14
  84. package/doc_build/plugins/guide/setup-function.html +0 -30
  85. package/doc_build/plugins/official-list/overview.html +0 -3
  86. package/doc_build/static/css/main.edaad072.css +0 -1
  87. package/doc_build/static/js/1607.70af642a.js +0 -2
  88. package/doc_build/static/js/1607.70af642a.js.LICENSE.txt +0 -23
  89. package/doc_build/static/js/async/3799.e31e8293.js +0 -1
  90. package/doc_build/static/js/async/8652.6fbf1cb7.js +0 -1
  91. package/doc_build/static/js/async/en_api_config_build-config.367a5701.js +0 -1
  92. package/doc_build/static/js/async/en_api_config_build-preset.0d78b268.js +0 -1
  93. package/doc_build/static/js/async/en_api_config_design-system.b28d6723.js +0 -1
  94. package/doc_build/static/js/async/en_api_config_plugins.fc95fb77.js +0 -1
  95. package/doc_build/static/js/async/en_api_config_testing.8bc7f316.js +0 -1
  96. package/doc_build/static/js/async/en_api_index.669f0a56.js +0 -1
  97. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.60d0260c.js +0 -1
  98. package/doc_build/static/js/async/en_guide_advance_asset.5ff1d623.js +0 -1
  99. package/doc_build/static/js/async/en_guide_advance_build-umd.c254ed46.js +0 -1
  100. package/doc_build/static/js/async/en_guide_advance_copy.45c0a51d.js +0 -1
  101. package/doc_build/static/js/async/en_guide_advance_external-dependency.a52d3247.js +0 -1
  102. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.51bf3569.js +0 -1
  103. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.aec0b4e1.js +0 -1
  104. package/doc_build/static/js/async/en_guide_advance_theme-config.db0ad9fc.js +0 -1
  105. package/doc_build/static/js/async/en_guide_basic_before-getting-started.a22fc49a.js +0 -1
  106. package/doc_build/static/js/async/en_guide_basic_command-preview.1707ed29.js +0 -1
  107. package/doc_build/static/js/async/en_guide_basic_modify-output-product.ad453d13.js +0 -1
  108. package/doc_build/static/js/async/en_guide_basic_publish-your-project.08c5112f.js +0 -1
  109. package/doc_build/static/js/async/en_guide_basic_test-your-project.f5f6b204.js +0 -1
  110. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.56325139.js +0 -1
  111. package/doc_build/static/js/async/en_guide_basic_using-storybook.9d721554.js +0 -1
  112. package/doc_build/static/js/async/en_guide_best-practices_components.45155af9.js +0 -1
  113. package/doc_build/static/js/async/en_guide_intro_getting-started.f8682be3.js +0 -1
  114. package/doc_build/static/js/async/en_guide_intro_welcome.9cc45924.js +0 -1
  115. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.7f2dae5c.js +0 -1
  116. package/doc_build/static/js/async/en_index.7bd869c4.js +0 -1
  117. package/doc_build/static/js/async/en_plugins_guide_getting-started.b850249c.js +0 -1
  118. package/doc_build/static/js/async/en_plugins_guide_plugin-object.bf6c6221.js +0 -1
  119. package/doc_build/static/js/async/en_plugins_guide_setup-function.80a2bd97.js +0 -1
  120. package/doc_build/static/js/async/en_plugins_official-list_overview.84e5cea0.js +0 -1
  121. package/doc_build/static/js/async/zh_api_config_build-config.048fd5ec.js +0 -1
  122. package/doc_build/static/js/async/zh_api_config_build-preset.7c13584d.js +0 -1
  123. package/doc_build/static/js/async/zh_api_config_design-system.1eecd474.js +0 -1
  124. package/doc_build/static/js/async/zh_api_config_plugins.c22dc4be.js +0 -1
  125. package/doc_build/static/js/async/zh_api_config_testing.a9888eed.js +0 -1
  126. package/doc_build/static/js/async/zh_api_index.22957707.js +0 -1
  127. package/doc_build/static/js/async/zh_api_plugin-api_plugin-hooks.a4d81bf6.js +0 -1
  128. package/doc_build/static/js/async/zh_guide_advance_asset.5b936003.js +0 -1
  129. package/doc_build/static/js/async/zh_guide_advance_build-umd.b6d541ff.js +0 -1
  130. package/doc_build/static/js/async/zh_guide_advance_copy.21a1aea4.js +0 -1
  131. package/doc_build/static/js/async/zh_guide_advance_external-dependency.c7cf5d4b.js +0 -1
  132. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-build.64e795f3.js +0 -1
  133. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.168ce7dd.js +0 -1
  134. package/doc_build/static/js/async/zh_guide_advance_theme-config.b9570109.js +0 -1
  135. package/doc_build/static/js/async/zh_guide_basic_before-getting-started.6b06b54a.js +0 -1
  136. package/doc_build/static/js/async/zh_guide_basic_command-preview.1199124a.js +0 -1
  137. package/doc_build/static/js/async/zh_guide_basic_modify-output-product.8ccbc8d1.js +0 -1
  138. package/doc_build/static/js/async/zh_guide_basic_publish-your-project.bf11b1c4.js +0 -1
  139. package/doc_build/static/js/async/zh_guide_basic_test-your-project.ae52c47a.js +0 -1
  140. package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.a091d57d.js +0 -1
  141. package/doc_build/static/js/async/zh_guide_basic_using-storybook.27829e44.js +0 -1
  142. package/doc_build/static/js/async/zh_guide_best-practices_components.7454d916.js +0 -1
  143. package/doc_build/static/js/async/zh_guide_intro_getting-started.a4c00d9a.js +0 -1
  144. package/doc_build/static/js/async/zh_guide_intro_welcome.71c3fe16.js +0 -1
  145. package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.6f8b5ff6.js +0 -1
  146. package/doc_build/static/js/async/zh_index.c19f9dcf.js +0 -1
  147. package/doc_build/static/js/async/zh_plugins_guide_getting-started.099dfaea.js +0 -1
  148. package/doc_build/static/js/async/zh_plugins_guide_plugin-object.963289d5.js +0 -1
  149. package/doc_build/static/js/async/zh_plugins_guide_setup-function.67d07b91.js +0 -1
  150. package/doc_build/static/js/async/zh_plugins_official-list_overview.a7635714.js +0 -1
  151. package/doc_build/static/js/lib-lodash.c5845536.js +0 -1
  152. package/doc_build/static/js/lib-polyfill.b3038509.js +0 -1
  153. package/doc_build/static/js/lib-react.d41ace5e.js +0 -2
  154. package/doc_build/static/js/lib-react.d41ace5e.js.LICENSE.txt +0 -29
  155. package/doc_build/static/js/main.2d3257a4.js +0 -1
  156. package/doc_build/static/search_index.json +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_modern_js_module_tools_docs=self.webpackChunk_modern_js_module_tools_docs||[]).push([[2892],{14568:function(e,o,t){t.r(o),t.d(o,{CH:function(){return s},chCodeConfig:function(){return c},content:function(){return l},frontmatter:function(){return i},title:function(){return p},toc:function(){return a}});var n=t(97458),r=t(53799);const s={annotations:r.ds,Code:r.EK},c={staticMediaQuery:"not screen, (max-width: 768px)",theme:{name:"nord",type:"dark",semanticHighlighting:!0,colors:{focusBorder:"#3b4252",foreground:"#d8dee9","activityBar.background":"#2e3440","activityBar.dropBackground":"#3b4252","activityBar.foreground":"#d8dee9","activityBar.activeBorder":"#88c0d0","activityBar.activeBackground":"#3b4252","activityBarBadge.background":"#88c0d0","activityBarBadge.foreground":"#2e3440","badge.foreground":"#2e3440","badge.background":"#88c0d0","button.background":"#88c0d0ee","button.foreground":"#2e3440","button.hoverBackground":"#88c0d0","button.secondaryBackground":"#434c5e","button.secondaryForeground":"#d8dee9","button.secondaryHoverBackground":"#4c566a","charts.red":"#bf616a","charts.blue":"#81a1c1","charts.yellow":"#ebcb8b","charts.orange":"#d08770","charts.green":"#a3be8c","charts.purple":"#b48ead","charts.foreground":"#d8dee9","charts.lines":"#88c0d0","debugConsole.infoForeground":"#88c0d0","debugConsole.warningForeground":"#ebcb8b","debugConsole.errorForeground":"#bf616a","debugConsole.sourceForeground":"#616e88","debugConsoleInputIcon.foreground":"#81a1c1","debugExceptionWidget.background":"#4c566a","debugExceptionWidget.border":"#2e3440","debugToolBar.background":"#3b4252",descriptionForeground:"#d8dee9e6","diffEditor.insertedTextBackground":"#81a1c133","diffEditor.removedTextBackground":"#bf616a4d","dropdown.background":"#3b4252","dropdown.border":"#3b4252","dropdown.foreground":"#d8dee9","editorActiveLineNumber.foreground":"#d8dee9cc","editorCursor.foreground":"#d8dee9","editorHint.border":"#ebcb8b00","editorHint.foreground":"#ebcb8b","editorIndentGuide.background":"#434c5eb3","editorIndentGuide.activeBackground":"#4c566a","editorInlayHint.background":"#434c5e","editorInlayHint.foreground":"#d8dee9","editorLineNumber.foreground":"#4c566a","editorLineNumber.activeForeground":"#d8dee9","editorWhitespace.foreground":"#4c566ab3","editorWidget.background":"#2e3440","editorWidget.border":"#3b4252","editor.background":"#2e3440","editor.foreground":"#d8dee9","editor.hoverHighlightBackground":"#3b4252","editor.findMatchBackground":"#88c0d066","editor.findMatchHighlightBackground":"#88c0d033","editor.findRangeHighlightBackground":"#88c0d033","editor.lineHighlightBackground":"#3b4252","editor.lineHighlightBorder":"#3b4252","editor.inactiveSelectionBackground":"#434c5ecc","editor.inlineValuesBackground":"#4c566a","editor.inlineValuesForeground":"#eceff4","editor.selectionBackground":"#434c5ecc","editor.selectionHighlightBackground":"#434c5ecc","editor.rangeHighlightBackground":"#434c5e52","editor.wordHighlightBackground":"#81a1c166","editor.wordHighlightStrongBackground":"#81a1c199","editor.stackFrameHighlightBackground":"#5e81ac","editor.focusedStackFrameHighlightBackground":"#5e81ac","editorError.foreground":"#bf616a","editorError.border":"#bf616a00","editorWarning.foreground":"#ebcb8b","editorWarning.border":"#ebcb8b00","editorBracketMatch.background":"#2e344000","editorBracketMatch.border":"#88c0d0","editorBracketHighlight.foreground1":"#8fbcbb","editorBracketHighlight.foreground2":"#88c0d0","editorBracketHighlight.foreground3":"#81a1c1","editorBracketHighlight.foreground4":"#5e81ac","editorBracketHighlight.foreground5":"#8fbcbb","editorBracketHighlight.foreground6":"#88c0d0","editorBracketHighlight.unexpectedBracket.foreground":"#bf616a","editorCodeLens.foreground":"#4c566a","editorGroup.background":"#2e3440","editorGroup.border":"#3b425201","editorGroup.dropBackground":"#3b425299","editorGroupHeader.border":"#3b425200","editorGroupHeader.noTabsBackground":"#2e3440","editorGroupHeader.tabsBackground":"#2e3440","editorGroupHeader.tabsBorder":"#3b425200","editorGutter.background":"#2e3440","editorGutter.modifiedBackground":"#ebcb8b","editorGutter.addedBackground":"#a3be8c","editorGutter.deletedBackground":"#bf616a","editorHoverWidget.background":"#3b4252","editorHoverWidget.border":"#3b4252","editorLink.activeForeground":"#88c0d0","editorMarkerNavigation.background":"#5e81acc0","editorMarkerNavigationError.background":"#bf616ac0","editorMarkerNavigationWarning.background":"#ebcb8bc0","editorOverviewRuler.border":"#3b4252","editorOverviewRuler.currentContentForeground":"#3b4252","editorOverviewRuler.incomingContentForeground":"#3b4252","editorOverviewRuler.findMatchForeground":"#88c0d066","editorOverviewRuler.rangeHighlightForeground":"#88c0d066","editorOverviewRuler.selectionHighlightForeground":"#88c0d066","editorOverviewRuler.wordHighlightForeground":"#88c0d066","editorOverviewRuler.wordHighlightStrongForeground":"#88c0d066","editorOverviewRuler.modifiedForeground":"#ebcb8b","editorOverviewRuler.addedForeground":"#a3be8c","editorOverviewRuler.deletedForeground":"#bf616a","editorOverviewRuler.errorForeground":"#bf616a","editorOverviewRuler.warningForeground":"#ebcb8b","editorOverviewRuler.infoForeground":"#81a1c1","editorRuler.foreground":"#434c5e","editorSuggestWidget.background":"#2e3440","editorSuggestWidget.border":"#3b4252","editorSuggestWidget.foreground":"#d8dee9","editorSuggestWidget.focusHighlightForeground":"#88c0d0","editorSuggestWidget.highlightForeground":"#88c0d0","editorSuggestWidget.selectedBackground":"#434c5e","editorSuggestWidget.selectedForeground":"#d8dee9","extensionButton.prominentForeground":"#d8dee9","extensionButton.prominentBackground":"#434c5e","extensionButton.prominentHoverBackground":"#4c566a",errorForeground:"#bf616a","gitDecoration.modifiedResourceForeground":"#ebcb8b","gitDecoration.deletedResourceForeground":"#bf616a","gitDecoration.untrackedResourceForeground":"#a3be8c","gitDecoration.ignoredResourceForeground":"#d8dee966","gitDecoration.conflictingResourceForeground":"#5e81ac","gitDecoration.submoduleResourceForeground":"#8fbcbb","gitDecoration.stageDeletedResourceForeground":"#bf616a","gitDecoration.stageModifiedResourceForeground":"#ebcb8b","input.background":"#3b4252","input.foreground":"#d8dee9","input.placeholderForeground":"#d8dee999","input.border":"#3b4252","inputOption.activeBackground":"#5e81ac","inputOption.activeBorder":"#5e81ac","inputOption.activeForeground":"#eceff4","inputValidation.errorBackground":"#bf616a","inputValidation.errorBorder":"#bf616a","inputValidation.infoBackground":"#81a1c1","inputValidation.infoBorder":"#81a1c1","inputValidation.warningBackground":"#d08770","inputValidation.warningBorder":"#d08770","keybindingLabel.background":"#4c566a","keybindingLabel.border":"#4c566a","keybindingLabel.bottomBorder":"#4c566a","keybindingLabel.foreground":"#d8dee9","list.activeSelectionBackground":"#88c0d0","list.activeSelectionForeground":"#2e3440","list.inactiveSelectionBackground":"#434c5e","list.inactiveSelectionForeground":"#d8dee9","list.inactiveFocusBackground":"#434c5ecc","list.hoverForeground":"#eceff4","list.focusForeground":"#d8dee9","list.focusBackground":"#88c0d099","list.focusHighlightForeground":"#eceff4","list.hoverBackground":"#3b4252","list.dropBackground":"#88c0d099","list.highlightForeground":"#88c0d0","list.errorForeground":"#bf616a","list.warningForeground":"#ebcb8b","merge.currentHeaderBackground":"#81a1c166","merge.currentContentBackground":"#81a1c14d","merge.incomingHeaderBackground":"#8fbcbb66","merge.incomingContentBackground":"#8fbcbb4d","merge.border":"#3b425200","minimap.background":"#2e3440","minimap.errorHighlight":"#bf616acc","minimap.findMatchHighlight":"#88c0d0","minimap.selectionHighlight":"#88c0d0cc","minimap.warningHighlight":"#ebcb8bcc","minimapGutter.addedBackground":"#a3be8c","minimapGutter.deletedBackground":"#bf616a","minimapGutter.modifiedBackground":"#ebcb8b","minimapSlider.activeBackground":"#434c5eaa","minimapSlider.background":"#434c5e99","minimapSlider.hoverBackground":"#434c5eaa","notification.background":"#3b4252","notification.buttonBackground":"#434c5e","notification.buttonForeground":"#d8dee9","notification.buttonHoverBackground":"#4c566a","notification.errorBackground":"#bf616a","notification.errorForeground":"#2e3440","notification.foreground":"#d8dee9","notification.infoBackground":"#88c0d0","notification.infoForeground":"#2e3440","notification.warningBackground":"#ebcb8b","notification.warningForeground":"#2e3440","notificationCenter.border":"#3b425200","notificationCenterHeader.background":"#2e3440","notificationCenterHeader.foreground":"#88c0d0","notificationLink.foreground":"#88c0d0","notifications.background":"#3b4252","notifications.border":"#2e3440","notifications.foreground":"#d8dee9","notificationToast.border":"#3b425200","panel.background":"#2e3440","panel.border":"#3b4252","panelTitle.activeBorder":"#88c0d000","panelTitle.activeForeground":"#88c0d0","panelTitle.inactiveForeground":"#d8dee9","peekView.border":"#4c566a","peekViewEditor.background":"#2e3440","peekViewEditorGutter.background":"#2e3440","peekViewEditor.matchHighlightBackground":"#88c0d04d","peekViewResult.background":"#2e3440","peekViewResult.fileForeground":"#88c0d0","peekViewResult.lineForeground":"#d8dee966","peekViewResult.matchHighlightBackground":"#88c0d0cc","peekViewResult.selectionBackground":"#434c5e","peekViewResult.selectionForeground":"#d8dee9","peekViewTitle.background":"#3b4252","peekViewTitleDescription.foreground":"#d8dee9","peekViewTitleLabel.foreground":"#88c0d0","pickerGroup.border":"#3b4252","pickerGroup.foreground":"#88c0d0","progressBar.background":"#88c0d0","quickInputList.focusBackground":"#88c0d0","quickInputList.focusForeground":"#2e3440","sash.hoverBorder":"#88c0d0","scrollbar.shadow":"#00000066","scrollbarSlider.activeBackground":"#434c5eaa","scrollbarSlider.background":"#434c5e99","scrollbarSlider.hoverBackground":"#434c5eaa","selection.background":"#88c0d099","sideBar.background":"#2e3440","sideBar.foreground":"#d8dee9","sideBar.border":"#3b4252","sideBarSectionHeader.background":"#3b4252","sideBarSectionHeader.foreground":"#d8dee9","sideBarTitle.foreground":"#d8dee9","statusBar.background":"#3b4252","statusBar.debuggingBackground":"#5e81ac","statusBar.debuggingForeground":"#d8dee9","statusBar.noFolderForeground":"#d8dee9","statusBar.noFolderBackground":"#3b4252","statusBar.foreground":"#d8dee9","statusBarItem.activeBackground":"#4c566a","statusBarItem.hoverBackground":"#434c5e","statusBarItem.prominentBackground":"#3b4252","statusBarItem.prominentHoverBackground":"#434c5e","statusBarItem.errorBackground":"#3b4252","statusBarItem.errorForeground":"#bf616a","statusBarItem.warningBackground":"#ebcb8b","statusBarItem.warningForeground":"#2e3440","statusBar.border":"#3b425200","tab.activeBackground":"#3b4252","tab.activeForeground":"#d8dee9","tab.border":"#3b425200","tab.activeBorder":"#88c0d000","tab.unfocusedActiveBorder":"#88c0d000","tab.inactiveBackground":"#2e3440","tab.inactiveForeground":"#d8dee966","tab.unfocusedActiveForeground":"#d8dee999","tab.unfocusedInactiveForeground":"#d8dee966","tab.hoverBackground":"#3b4252cc","tab.unfocusedHoverBackground":"#3b4252b3","tab.hoverBorder":"#88c0d000","tab.unfocusedHoverBorder":"#88c0d000","tab.activeBorderTop":"#88c0d000","tab.unfocusedActiveBorderTop":"#88c0d000","tab.lastPinnedBorder":"#4c566a","terminal.background":"#2e3440","terminal.foreground":"#d8dee9","terminal.ansiBlack":"#3b4252","terminal.ansiRed":"#bf616a","terminal.ansiGreen":"#a3be8c","terminal.ansiYellow":"#ebcb8b","terminal.ansiBlue":"#81a1c1","terminal.ansiMagenta":"#b48ead","terminal.ansiCyan":"#88c0d0","terminal.ansiWhite":"#e5e9f0","terminal.ansiBrightBlack":"#4c566a","terminal.ansiBrightRed":"#bf616a","terminal.ansiBrightGreen":"#a3be8c","terminal.ansiBrightYellow":"#ebcb8b","terminal.ansiBrightBlue":"#81a1c1","terminal.ansiBrightMagenta":"#b48ead","terminal.ansiBrightCyan":"#8fbcbb","terminal.ansiBrightWhite":"#eceff4","terminal.tab.activeBorder":"#88c0d0","textBlockQuote.background":"#3b4252","textBlockQuote.border":"#81a1c1","textCodeBlock.background":"#4c566a","textLink.activeForeground":"#88c0d0","textLink.foreground":"#88c0d0","textPreformat.foreground":"#8fbcbb","textSeparator.foreground":"#eceff4","titleBar.activeBackground":"#2e3440","titleBar.activeForeground":"#d8dee9","titleBar.border":"#2e344000","titleBar.inactiveBackground":"#2e3440","titleBar.inactiveForeground":"#d8dee966","tree.indentGuidesStroke":"#616e88","walkThrough.embeddedEditorBackground":"#2e3440","welcomePage.buttonBackground":"#434c5e","welcomePage.buttonHoverBackground":"#4c566a","widget.shadow":"#00000066"},tokenColors:[{settings:{foreground:"#d8dee9ff",background:"#2e3440ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{name:"Comment",scope:"comment",settings:{foreground:"#616E88"}},{name:"Constant Character",scope:"constant.character",settings:{foreground:"#EBCB8B"}},{name:"Constant Character Escape",scope:"constant.character.escape",settings:{foreground:"#EBCB8B"}},{name:"Constant Language",scope:"constant.language",settings:{foreground:"#81A1C1"}},{name:"Constant Numeric",scope:"constant.numeric",settings:{foreground:"#B48EAD"}},{name:"Constant Regexp",scope:"constant.regexp",settings:{foreground:"#EBCB8B"}},{name:"Entity Name Class/Type",scope:["entity.name.class","entity.name.type.class"],settings:{foreground:"#8FBCBB"}},{name:"Entity Name Function",scope:"entity.name.function",settings:{foreground:"#88C0D0"}},{name:"Entity Name Tag",scope:"entity.name.tag",settings:{foreground:"#81A1C1"}},{name:"Entity Other Attribute Name",scope:"entity.other.attribute-name",settings:{foreground:"#8FBCBB"}},{name:"Entity Other Inherited Class",scope:"entity.other.inherited-class",settings:{fontStyle:"bold",foreground:"#8FBCBB"}},{name:"Invalid Deprecated",scope:"invalid.deprecated",settings:{foreground:"#D8DEE9",background:"#EBCB8B"}},{name:"Invalid Illegal",scope:"invalid.illegal",settings:{foreground:"#D8DEE9",background:"#BF616A"}},{name:"Keyword",scope:"keyword",settings:{foreground:"#81A1C1"}},{name:"Keyword Operator",scope:"keyword.operator",settings:{foreground:"#81A1C1"}},{name:"Keyword Other New",scope:"keyword.other.new",settings:{foreground:"#81A1C1"}},{name:"Markup Bold",scope:"markup.bold",settings:{fontStyle:"bold"}},{name:"Markup Changed",scope:"markup.changed",settings:{foreground:"#EBCB8B"}},{name:"Markup Deleted",scope:"markup.deleted",settings:{foreground:"#BF616A"}},{name:"Markup Inserted",scope:"markup.inserted",settings:{foreground:"#A3BE8C"}},{name:"Meta Preprocessor",scope:"meta.preprocessor",settings:{foreground:"#5E81AC"}},{name:"Punctuation",scope:"punctuation",settings:{foreground:"#ECEFF4"}},{name:"Punctuation Definition Parameters",scope:["punctuation.definition.method-parameters","punctuation.definition.function-parameters","punctuation.definition.parameters"],settings:{foreground:"#ECEFF4"}},{name:"Punctuation Definition Tag",scope:"punctuation.definition.tag",settings:{foreground:"#81A1C1"}},{name:"Punctuation Definition Comment",scope:["punctuation.definition.comment","punctuation.end.definition.comment","punctuation.start.definition.comment"],settings:{foreground:"#616E88"}},{name:"Punctuation Section",scope:"punctuation.section",settings:{foreground:"#ECEFF4"}},{name:"Punctuation Section Embedded",scope:["punctuation.section.embedded.begin","punctuation.section.embedded.end"],settings:{foreground:"#81A1C1"}},{name:"Punctuation Terminator",scope:"punctuation.terminator",settings:{foreground:"#81A1C1"}},{name:"Punctuation Variable",scope:"punctuation.definition.variable",settings:{foreground:"#81A1C1"}},{name:"Storage",scope:"storage",settings:{foreground:"#81A1C1"}},{name:"String",scope:"string",settings:{foreground:"#A3BE8C"}},{name:"String Regexp",scope:"string.regexp",settings:{foreground:"#EBCB8B"}},{name:"Support Class",scope:"support.class",settings:{foreground:"#8FBCBB"}},{name:"Support Constant",scope:"support.constant",settings:{foreground:"#81A1C1"}},{name:"Support Function",scope:"support.function",settings:{foreground:"#88C0D0"}},{name:"Support Function Construct",scope:"support.function.construct",settings:{foreground:"#81A1C1"}},{name:"Support Type",scope:"support.type",settings:{foreground:"#8FBCBB"}},{name:"Support Type Exception",scope:"support.type.exception",settings:{foreground:"#8FBCBB"}},{name:"Token Debug",scope:"token.debug-token",settings:{foreground:"#b48ead"}},{name:"Token Error",scope:"token.error-token",settings:{foreground:"#bf616a"}},{name:"Token Info",scope:"token.info-token",settings:{foreground:"#88c0d0"}},{name:"Token Warning",scope:"token.warn-token",settings:{foreground:"#ebcb8b"}},{name:"Variable",scope:"variable.other",settings:{foreground:"#D8DEE9"}},{name:"Variable Language",scope:"variable.language",settings:{foreground:"#81A1C1"}},{name:"Variable Parameter",scope:"variable.parameter",settings:{foreground:"#D8DEE9"}},{name:"[C/CPP] Punctuation Separator Pointer-Access",scope:"punctuation.separator.pointer-access.c",settings:{foreground:"#81A1C1"}},{name:"[C/CPP] Meta Preprocessor Include",scope:["source.c meta.preprocessor.include","source.c string.quoted.other.lt-gt.include"],settings:{foreground:"#8FBCBB"}},{name:"[C/CPP] Conditional Directive",scope:["source.cpp keyword.control.directive.conditional","source.cpp punctuation.definition.directive","source.c keyword.control.directive.conditional","source.c punctuation.definition.directive"],settings:{foreground:"#5E81AC",fontStyle:"bold"}},{name:"[CSS] Constant Other Color RGB Value",scope:"source.css constant.other.color.rgb-value",settings:{foreground:"#B48EAD"}},{name:"[CSS](Function) Meta Property-Value",scope:"source.css meta.property-value",settings:{foreground:"#88C0D0"}},{name:"[CSS] Media Queries",scope:["source.css keyword.control.at-rule.media","source.css keyword.control.at-rule.media punctuation.definition.keyword"],settings:{foreground:"#D08770"}},{name:"[CSS] Punctuation Definition Keyword",scope:"source.css punctuation.definition.keyword",settings:{foreground:"#81A1C1"}},{name:"[CSS] Support Type Property Name",scope:"source.css support.type.property-name",settings:{foreground:"#D8DEE9"}},{name:"[diff] Meta Range Context",scope:"source.diff meta.diff.range.context",settings:{foreground:"#8FBCBB"}},{name:"[diff] Meta Header From-File",scope:"source.diff meta.diff.header.from-file",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition From-File",scope:"source.diff punctuation.definition.from-file",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition Range",scope:"source.diff punctuation.definition.range",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition Separator",scope:"source.diff punctuation.definition.separator",settings:{foreground:"#81A1C1"}},{name:"[Elixir](JakeBecker.elixir-ls) module names",scope:"entity.name.type.module.elixir",settings:{foreground:"#8FBCBB"}},{name:"[Elixir](JakeBecker.elixir-ls) module attributes",scope:"variable.other.readwrite.module.elixir",settings:{foreground:"#D8DEE9",fontStyle:"bold"}},{name:"[Elixir](JakeBecker.elixir-ls) atoms",scope:"constant.other.symbol.elixir",settings:{foreground:"#D8DEE9",fontStyle:"bold"}},{name:"[Elixir](JakeBecker.elixir-ls) modules",scope:"variable.other.constant.elixir",settings:{foreground:"#8FBCBB"}},{name:"[Go] String Format Placeholder",scope:"source.go constant.other.placeholder.go",settings:{foreground:"#EBCB8B"}},{name:"[Java](JavaDoc) Comment Block Documentation HTML Entities",scope:"source.java comment.block.documentation.javadoc punctuation.definition.entity.html",settings:{foreground:"#81A1C1"}},{name:"[Java](JavaDoc) Constant Other",scope:"source.java constant.other",settings:{foreground:"#D8DEE9"}},{name:"[Java](JavaDoc) Keyword Other Documentation",scope:"source.java keyword.other.documentation",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation Author",scope:"source.java keyword.other.documentation.author.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation Directive/Custom",scope:["source.java keyword.other.documentation.directive","source.java keyword.other.documentation.custom"],settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation See",scope:"source.java keyword.other.documentation.see.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java] Meta Method-Call",scope:"source.java meta.method-call meta.method",settings:{foreground:"#88C0D0"}},{name:"[Java](JavaDoc) Meta Tag Template Link",scope:["source.java meta.tag.template.link.javadoc","source.java string.other.link.title.javadoc"],settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Meta Tag Template Value",scope:"source.java meta.tag.template.value.javadoc",settings:{foreground:"#88C0D0"}},{name:"[Java](JavaDoc) Punctuation Definition Keyword",scope:"source.java punctuation.definition.keyword.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Punctuation Definition Tag",scope:["source.java punctuation.definition.tag.begin.javadoc","source.java punctuation.definition.tag.end.javadoc"],settings:{foreground:"#616E88"}},{name:"[Java] Storage Modifier Import",scope:"source.java storage.modifier.import",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Modifier Package",scope:"source.java storage.modifier.package",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type",scope:"source.java storage.type",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type Annotation",scope:"source.java storage.type.annotation",settings:{foreground:"#D08770"}},{name:"[Java] Storage Type Generic",scope:"source.java storage.type.generic",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type Primitive",scope:"source.java storage.type.primitive",settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Decorator",scope:["source.js punctuation.decorator","source.js meta.decorator variable.other.readwrite","source.js meta.decorator entity.name.function"],settings:{foreground:"#D08770"}},{name:"[JavaScript] Meta Object-Literal Key",scope:"source.js meta.object-literal.key",settings:{foreground:"#88C0D0"}},{name:"[JavaScript](JSDoc) Storage Type Class",scope:"source.js storage.type.class.jsdoc",settings:{foreground:"#8FBCBB"}},{name:"[JavaScript] String Template Literals Punctuation",scope:["source.js string.quoted.template punctuation.quasi.element.begin","source.js string.quoted.template punctuation.quasi.element.end","source.js string.template punctuation.definition.template-expression"],settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Interpolated String Template Punctuation Functions",scope:"source.js string.quoted.template meta.method-call.with-arguments",settings:{foreground:"#ECEFF4"}},{name:"[JavaScript] String Template Literal Variable",scope:["source.js string.template meta.template.expression support.variable.property","source.js string.template meta.template.expression variable.other.object"],settings:{foreground:"#D8DEE9"}},{name:"[JavaScript] Support Type Primitive",scope:"source.js support.type.primitive",settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Variable Other Object",scope:"source.js variable.other.object",settings:{foreground:"#D8DEE9"}},{name:"[JavaScript] Variable Other Read-Write Alias",scope:"source.js variable.other.readwrite.alias",settings:{foreground:"#8FBCBB"}},{name:"[JavaScript] Parentheses in Template Strings",scope:["source.js meta.embedded.line meta.brace.square","source.js meta.embedded.line meta.brace.round","source.js string.quoted.template meta.brace.square","source.js string.quoted.template meta.brace.round"],settings:{foreground:"#ECEFF4"}},{name:"[HTML] Constant Character Entity",scope:"text.html.basic constant.character.entity.html",settings:{foreground:"#EBCB8B"}},{name:"[HTML] Constant Other Inline-Data",scope:"text.html.basic constant.other.inline-data",settings:{foreground:"#D08770",fontStyle:"italic"}},{name:"[HTML] Meta Tag SGML Doctype",scope:"text.html.basic meta.tag.sgml.doctype",settings:{foreground:"#5E81AC"}},{name:"[HTML] Punctuation Definition Entity",scope:"text.html.basic punctuation.definition.entity",settings:{foreground:"#81A1C1"}},{name:"[INI] Entity Name Section Group-Title",scope:"source.properties entity.name.section.group-title.ini",settings:{foreground:"#88C0D0"}},{name:"[INI] Punctuation Separator Key-Value",scope:"source.properties punctuation.separator.key-value.ini",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Fenced Code Block",scope:["text.html.markdown markup.fenced_code.block","text.html.markdown markup.fenced_code.block punctuation.definition"],settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Heading",scope:"markup.heading",settings:{foreground:"#88C0D0"}},{name:"[Markdown] Markup Inline",scope:["text.html.markdown markup.inline.raw","text.html.markdown markup.inline.raw punctuation.definition.raw"],settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Italic",scope:"text.html.markdown markup.italic",settings:{fontStyle:"italic"}},{name:"[Markdown] Markup Link",scope:"text.html.markdown markup.underline.link",settings:{fontStyle:"underline"}},{name:"[Markdown] Markup List Numbered/Unnumbered",scope:"text.html.markdown beginning.punctuation.definition.list",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Quote Punctuation Definition",scope:"text.html.markdown beginning.punctuation.definition.quote",settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Quote Punctuation Definition",scope:"text.html.markdown markup.quote",settings:{foreground:"#616E88"}},{name:"[Markdown] Markup Math Constant",scope:"text.html.markdown constant.character.math.tex",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Math Definition Marker",scope:["text.html.markdown punctuation.definition.math.begin","text.html.markdown punctuation.definition.math.end"],settings:{foreground:"#5E81AC"}},{name:"[Markdown] Markup Math Function Definition Marker",scope:"text.html.markdown punctuation.definition.function.math.tex",settings:{foreground:"#88C0D0"}},{name:"[Markdown] Markup Math Operator",scope:"text.html.markdown punctuation.math.operator.latex",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Punctuation Definition Heading",scope:"text.html.markdown punctuation.definition.heading",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Punctuation Definition Constant/String",scope:["text.html.markdown punctuation.definition.constant","text.html.markdown punctuation.definition.string"],settings:{foreground:"#81A1C1"}},{name:"[Markdown] String Other Link Description/Title",scope:["text.html.markdown constant.other.reference.link","text.html.markdown string.other.link.description","text.html.markdown string.other.link.title"],settings:{foreground:"#88C0D0"}},{name:"[Perl] Perl Sigils",scope:"source.perl punctuation.definition.variable",settings:{foreground:"#D8DEE9"}},{name:"[PHP] Meta Function-Call Object",scope:["source.php meta.function-call","source.php meta.function-call.object"],settings:{foreground:"#88C0D0"}},{name:"[Python] Decorator",scope:["source.python entity.name.function.decorator","source.python meta.function.decorator support.type"],settings:{foreground:"#D08770"}},{name:"[Python] Function Call",scope:"source.python meta.function-call.generic",settings:{foreground:"#88C0D0"}},{name:"[Python] Support Type",scope:"source.python support.type",settings:{foreground:"#88C0D0"}},{name:"[Python] Function Parameter",scope:["source.python variable.parameter.function.language"],settings:{foreground:"#D8DEE9"}},{name:"[Python] Function Parameter Special",scope:["source.python meta.function.parameters variable.parameter.function.language.special.self"],settings:{foreground:"#81A1C1"}},{name:"[Rust] Entity types",scope:"source.rust entity.name.type",settings:{foreground:"#8FBCBB"}},{name:"[Rust] Macro",scope:"source.rust meta.macro entity.name.function",settings:{fontStyle:"bold",foreground:"#88C0D0"}},{name:"[Rust] Attributes",scope:["source.rust meta.attribute","source.rust meta.attribute punctuation","source.rust meta.attribute keyword.operator"],settings:{foreground:"#5E81AC"}},{name:"[Rust] Traits",scope:"source.rust entity.name.type.trait",settings:{fontStyle:"bold"}},{name:"[Rust] Interpolation Bracket Curly",scope:"source.rust punctuation.definition.interpolation",settings:{foreground:"#EBCB8B"}},{name:"[SCSS] Punctuation Definition Interpolation Bracket Curly",scope:["source.css.scss punctuation.definition.interpolation.begin.bracket.curly","source.css.scss punctuation.definition.interpolation.end.bracket.curly"],settings:{foreground:"#81A1C1"}},{name:"[SCSS] Variable Interpolation",scope:"source.css.scss variable.interpolation",settings:{foreground:"#D8DEE9",fontStyle:"italic"}},{name:"[TypeScript] Decorators",scope:["source.ts punctuation.decorator","source.ts meta.decorator variable.other.readwrite","source.ts meta.decorator entity.name.function","source.tsx punctuation.decorator","source.tsx meta.decorator variable.other.readwrite","source.tsx meta.decorator entity.name.function"],settings:{foreground:"#D08770"}},{name:"[TypeScript] Object-literal keys",scope:["source.ts meta.object-literal.key","source.tsx meta.object-literal.key"],settings:{foreground:"#D8DEE9"}},{name:"[TypeScript] Object-literal functions",scope:["source.ts meta.object-literal.key entity.name.function","source.tsx meta.object-literal.key entity.name.function"],settings:{foreground:"#88C0D0"}},{name:"[TypeScript] Type/Class",scope:["source.ts support.class","source.ts support.type","source.ts entity.name.type","source.ts entity.name.class","source.tsx support.class","source.tsx support.type","source.tsx entity.name.type","source.tsx entity.name.class"],settings:{foreground:"#8FBCBB"}},{name:"[TypeScript] Static Class Support",scope:["source.ts support.constant.math","source.ts support.constant.dom","source.ts support.constant.json","source.tsx support.constant.math","source.tsx support.constant.dom","source.tsx support.constant.json"],settings:{foreground:"#8FBCBB"}},{name:"[TypeScript] Variables",scope:["source.ts support.variable","source.tsx support.variable"],settings:{foreground:"#D8DEE9"}},{name:"[TypeScript] Parentheses in Template Strings",scope:["source.ts meta.embedded.line meta.brace.square","source.ts meta.embedded.line meta.brace.round","source.tsx meta.embedded.line meta.brace.square","source.tsx meta.embedded.line meta.brace.round"],settings:{foreground:"#ECEFF4"}},{name:"[XML] Entity Name Tag Namespace",scope:"text.xml entity.name.tag.namespace",settings:{foreground:"#8FBCBB"}},{name:"[XML] Keyword Other Doctype",scope:"text.xml keyword.other.doctype",settings:{foreground:"#5E81AC"}},{name:"[XML] Meta Tag Preprocessor",scope:"text.xml meta.tag.preprocessor entity.name.tag",settings:{foreground:"#5E81AC"}},{name:"[XML] Entity Name Tag Namespace",scope:["text.xml string.unquoted.cdata","text.xml string.unquoted.cdata punctuation.definition.string"],settings:{foreground:"#D08770",fontStyle:"italic"}},{name:"[YAML] Entity Name Tag",scope:"source.yaml entity.name.tag",settings:{foreground:"#8FBCBB"}}]},autoImport:!0,showCopyButton:!0,skipLanguages:[],filepath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/plugins/guide/setup-function.mdx"},i={sidebar_position:3},a=[{id:"\u63d2\u4ef6-api-\u5bf9\u8c61",text:"\u63d2\u4ef6 API \u5bf9\u8c61",depth:2},{id:"apiuseappcontext",text:"api.useAppContext",depth:3},{id:"apiuseresolvedconfigcontext",text:"api.useResolvedConfigContext",depth:3},{id:"apiusehookrunners",text:"api.useHookRunners",depth:3},{id:"\u5f02\u6b65-setup",text:"\u5f02\u6b65 setup",depth:2},{id:"\u751f\u547d\u5468\u671f\u94a9\u5b50",text:"\u751f\u547d\u5468\u671f\u94a9\u5b50",depth:2}],p="Setup \u51fd\u6570",l="\"---\\nsidebar_position: 3\\n---\\n\\n# Setup \u51fd\u6570\\n\\n\u5728[\u3010\u63d2\u4ef6\u5bf9\u8c61\u3011](/plugins/guide/plugin-object) \u90e8\u5206\u6211\u4eec\u77e5\u9053\u63d2\u4ef6\u5bf9\u8c61\u5305\u542b\u4e86\u4e00\u4e2a `setup` \u51fd\u6570\uff0c\u8be5\u51fd\u6570\u4e0d\u4ec5\u5305\u542b\u4e86\u4e00\u4e2a `api` \u5bf9\u8c61\u53c2\u6570\uff0c\u540c\u65f6\u8fd8\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a Hooks \u5bf9\u8c61\u3002\\n\\n## \u63d2\u4ef6 API \u5bf9\u8c61\\n\\n\u63d2\u4ef6\u7684 `setup` \u51fd\u6570\u4f1a\u63d0\u4f9b\u4e00\u4e2a `api` \u5bf9\u8c61\u53c2\u6570\uff0c\u4f60\u53ef\u4ee5\u8c03\u7528\u8be5\u5bf9\u8c61\u4e0a\u63d0\u4f9b\u7684\u4e00\u4e9b\u65b9\u6cd5\u6765\u83b7\u53d6\u5230\u914d\u7f6e\u3001\u9879\u76ee\u4e0a\u4e0b\u6587\u7b49\u4fe1\u606f\u3002\\n\\n```ts\\nexport default (): CliPlugin<ModuleTools> => ({\\n name: 'my-plugin',\\n\\n setup(api) {\\n // \u83b7\u53d6\u5e94\u7528\u539f\u59cb\u914d\u7f6e\\n const config = api.useConfigContext();\\n // \u83b7\u53d6\u5e94\u7528\u8fd0\u884c\u4e0a\u4e0b\u6587\\n const appContext = api.useAppContext();\\n // \u83b7\u53d6\u89e3\u6790\u4e4b\u540e\u7684\u6700\u7ec8\u914d\u7f6e\\n const resolvedConfig = api.useResolvedConfigContext();\\n },\\n});\\n```\\n\\n### `api.useAppContext`\\n\\n\u7528\u4e8e\u83b7\u53d6\u9879\u76ee\u4e0a\u4e0b\u6587\u4fe1\u606f\u3002\\n\\n```ts\\nconst useAppContext: () => IAppContext;\\n\\ninterface IAppContext {\\n appDirectory: string;\\n configFile: string | false;\\n packageName: string;\\n nodeModulesDirectory: string;\\n internalDirectory: string;\\n plugins: {\\n cli?: any;\\n server?: any;\\n }[];\\n}\\n```\\n\\n:::info\\n\u901a\u8fc7\u5b9e\u9645\u7684\u7c7b\u578b\u6587\u4ef6\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u8fd8\u5b58\u5728\u7740\u5176\u4ed6\u7684\u5b57\u6bb5\uff0c\u4e0d\u8fc7\u76ee\u524d\u5bf9\u4e8e\u6a21\u5757\u5de5\u7a0b\u6709\u610f\u4e49\u7684\u5b57\u6bb5\u53ea\u6709\u4ee5\u4e0a\u5185\u5bb9\u3002api \u5bf9\u8c61\u5176\u4ed6\u7684\u65b9\u6cd5\u4e5f\u662f\u5982\u6b64\u3002\\n:::\\n\\n### `api.useResolvedConfigContext`\\n\\n\u7528\u4e8e\u83b7\u53d6\u89e3\u6790\u4e4b\u540e\u7684\u6700\u7ec8\u914d\u7f6e\u3002\\n\\n:::info\\n\u5982\u679c\u9700\u8981\u83b7\u53d6\u6784\u5efa\u76f8\u5173\u7684\u6700\u7ec8\u914d\u7f6e\uff0c\u9700\u8981\u4f7f\u7528 [`beforeBuild`]() Hook\u3002\\n:::\\n\\n```ts\\nconst useResolvedConfigContext: () => NormalizedConfig;\\n\\ninterface NormalizedConfig {\\n buildConfig: PartialBuildConfig;\\n buildPreset: BuildPreset;\\n designSystem?: Record<string, any>;\\n dev: Dev;\\n plugins: PluginConfig;\\n runtime: RuntimeConfig;\\n runtimeByEntries?: RuntimeByEntriesConfig;\\n _raw: UserConfig;\\n}\\n```\\n\\n### `api.useHookRunners`\\n\\n\u7528\u4e8e\u83b7\u53d6 Hooks \u7684\u6267\u884c\u5668\uff0c\u5e76\u89e6\u53d1\u7279\u5b9a\u7684 Hook \u6267\u884c\u3002\\n\\n```ts\\nimport type { CliPlugin } from '@modern-js/core';\\n\\nexport default (): CliPlugin => ({\\n name: 'my-plugin',\\n\\n async setup(api) {\\n const hookRunners = api.useHookRunners();\\n // \u89e6\u53d1 afterBuild Hook\\n await hookRunners.afterBuild();\\n },\\n});\\n```\\n\\n## \u5f02\u6b65 setup\\n\\nCLI \u63d2\u4ef6\u7684 setup \u53ef\u4ee5\u662f\u4e00\u4e2a\u5f02\u6b65\u51fd\u6570\uff0c\u5728\u521d\u59cb\u5316\u8fc7\u7a0b\u4e2d\u6267\u884c\u5f02\u6b65\u903b\u8f91\u3002\\n\\n```ts\\nexport default (): CliPlugin<ModuleTools> => ({\\n name: 'my-plugin',\\n\\n async setup(api) {\\n await doSomething();\\n },\\n});\\n```\\n\\n## \u751f\u547d\u5468\u671f\u94a9\u5b50\\n\\n\u6211\u4eec\u77e5\u9053 `setup` \u51fd\u6570\u4f1a\u8fd4\u56de\u4e00\u4e2a Hooks \u5bf9\u8c61\uff0c\u6240\u8c13 Hooks \u5bf9\u8c61\u4e5f\u53ef\u4ee5\u7406\u89e3\u662f\u5177\u6709 module-tools \u751f\u547d\u5468\u671f\u94a9\u5b50\u7684\u5bf9\u8c61\u3002\\n\\n\u76ee\u524d\u4e3b\u8981\u5305\u542b\u4e24\u7c7b\u94a9\u5b50\uff1a\\n\\n- \u6784\u5efa\u94a9\u5b50\uff1a\u4ec5\u5728\u6267\u884c `build` \u547d\u4ee4\u6784\u5efa\u6e90\u7801\u4ea7\u7269\u65f6\u89e6\u53d1\u3002\\n- `buildPlatform` \u94a9\u5b50\uff1a\u4ec5\u5728\u6267\u884c `build --platform` \u547d\u4ee4\u751f\u6210\u5176\u4ed6\u6784\u5efa\u4ea7\u7269\u65f6\u89e6\u53d1\u3002\\n- \u8c03\u8bd5\u94a9\u5b50\uff1a\u8fd0\u884c `dev` \u547d\u4ee4\u65f6\u4f1a\u89e6\u53d1\u7684\u94a9\u5b50\u3002\\n\\n\u5173\u4e8e\u751f\u547d\u5468\u671f\u94a9\u5b50\u7684\u5b8c\u6574\u5217\u8868\u53c2\u8003 [API \u6587\u6863](/api/plugin-api/plugin-hooks)\u3002\\n\"";function d(e){const o=Object.assign({h1:"h1",a:"a",p:"p",code:"code",h2:"h2",h3:"h3",div:"div",ul:"ul",li:"li"},e.components);return s||u("CH",!1),s.Code||u("CH.Code",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.h1,{id:"setup-\u51fd\u6570",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#setup-\u51fd\u6570",children:"#"}),"Setup \u51fd\u6570"]}),"\n",(0,n.jsxs)(o.p,{children:["\u5728",(0,n.jsx)(o.a,{href:"/module-tools/plugins/guide/plugin-object.html",children:"\u3010\u63d2\u4ef6\u5bf9\u8c61\u3011"})," \u90e8\u5206\u6211\u4eec\u77e5\u9053\u63d2\u4ef6\u5bf9\u8c61\u5305\u542b\u4e86\u4e00\u4e2a ",(0,n.jsx)(o.code,{children:"setup"})," \u51fd\u6570\uff0c\u8be5\u51fd\u6570\u4e0d\u4ec5\u5305\u542b\u4e86\u4e00\u4e2a ",(0,n.jsx)(o.code,{children:"api"})," \u5bf9\u8c61\u53c2\u6570\uff0c\u540c\u65f6\u8fd8\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a Hooks \u5bf9\u8c61\u3002"]}),"\n",(0,n.jsxs)(o.h2,{id:"\u63d2\u4ef6-api-\u5bf9\u8c61",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#\u63d2\u4ef6-api-\u5bf9\u8c61",children:"#"}),"\u63d2\u4ef6 API \u5bf9\u8c61"]}),"\n",(0,n.jsxs)(o.p,{children:["\u63d2\u4ef6\u7684 ",(0,n.jsx)(o.code,{children:"setup"})," \u51fd\u6570\u4f1a\u63d0\u4f9b\u4e00\u4e2a ",(0,n.jsx)(o.code,{children:"api"})," \u5bf9\u8c61\u53c2\u6570\uff0c\u4f60\u53ef\u4ee5\u8c03\u7528\u8be5\u5bf9\u8c61\u4e0a\u63d0\u4f9b\u7684\u4e00\u4e9b\u65b9\u6cd5\u6765\u83b7\u53d6\u5230\u914d\u7f6e\u3001\u9879\u76ee\u4e0a\u4e0b\u6587\u7b49\u4fe1\u606f\u3002"]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"CliPlugin",props:{style:{color:"#8FBCBB"}}},{content:"<",props:{style:{color:"#ECEFF4"}}},{content:"ModuleTools",props:{style:{color:"#8FBCBB"}}},{content:">",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" (",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"name",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"my-plugin",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"setup",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#ECEFF4"}}},{content:"api",props:{style:{color:"#D8DEE9"}}},{content:")",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#ECEFF4"}}},{content:"// \u83b7\u53d6\u5e94\u7528\u539f\u59cb\u914d\u7f6e",props:{style:{color:"#616E88"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"config",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"api",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"useConfigContext",props:{style:{color:"#88C0D0"}}},{content:"()",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#ECEFF4"}}},{content:"// \u83b7\u53d6\u5e94\u7528\u8fd0\u884c\u4e0a\u4e0b\u6587",props:{style:{color:"#616E88"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"appContext",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"api",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"useAppContext",props:{style:{color:"#88C0D0"}}},{content:"()",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#ECEFF4"}}},{content:"// \u83b7\u53d6\u89e3\u6790\u4e4b\u540e\u7684\u6700\u7ec8\u914d\u7f6e",props:{style:{color:"#616E88"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"resolvedConfig",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"api",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"useResolvedConfigContext",props:{style:{color:"#88C0D0"}}},{content:"()",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"ts"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h3,{id:"apiuseappcontext",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#apiuseappcontext",children:"#"}),(0,n.jsx)(o.code,{children:"api.useAppContext"})]}),"\n",(0,n.jsx)(o.p,{children:"\u7528\u4e8e\u83b7\u53d6\u9879\u76ee\u4e0a\u4e0b\u6587\u4fe1\u606f\u3002"}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"useAppContext",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"IAppContext",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"interface",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"IAppContext",props:{style:{color:"#8FBCBB"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" appDirectory",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"string",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" configFile",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"string",props:{style:{color:"#8FBCBB"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"|",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"false",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" packageName",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"string",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" nodeModulesDirectory",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"string",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" internalDirectory",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"string",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" plugins",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" cli",props:{style:{color:"#D8DEE9FF"}}},{content:"?:",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"any",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" server",props:{style:{color:"#D8DEE9FF"}}},{content:"?:",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"any",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:"[]",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"ts"},annotations:[]}]}),"\n",(0,n.jsxs)(o.div,{className:"modern-directive info",children:[(0,n.jsx)(o.p,{className:"modern-directive-title",children:"INFO"}),(0,n.jsx)(o.div,{className:"modern-directive-content",children:(0,n.jsx)(o.p,{children:"\n\u901a\u8fc7\u5b9e\u9645\u7684\u7c7b\u578b\u6587\u4ef6\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u8fd8\u5b58\u5728\u7740\u5176\u4ed6\u7684\u5b57\u6bb5\uff0c\u4e0d\u8fc7\u76ee\u524d\u5bf9\u4e8e\u6a21\u5757\u5de5\u7a0b\u6709\u610f\u4e49\u7684\u5b57\u6bb5\u53ea\u6709\u4ee5\u4e0a\u5185\u5bb9\u3002api \u5bf9\u8c61\u5176\u4ed6\u7684\u65b9\u6cd5\u4e5f\u662f\u5982\u6b64\u3002"})})]}),"\n",(0,n.jsxs)(o.h3,{id:"apiuseresolvedconfigcontext",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#apiuseresolvedconfigcontext",children:"#"}),(0,n.jsx)(o.code,{children:"api.useResolvedConfigContext"})]}),"\n",(0,n.jsx)(o.p,{children:"\u7528\u4e8e\u83b7\u53d6\u89e3\u6790\u4e4b\u540e\u7684\u6700\u7ec8\u914d\u7f6e\u3002"}),"\n",(0,n.jsxs)(o.div,{className:"modern-directive info",children:[(0,n.jsx)(o.p,{className:"modern-directive-title",children:"INFO"}),(0,n.jsx)(o.div,{className:"modern-directive-content",children:(0,n.jsxs)(o.p,{children:["\n\u5982\u679c\u9700\u8981\u83b7\u53d6\u6784\u5efa\u76f8\u5173\u7684\u6700\u7ec8\u914d\u7f6e\uff0c\u9700\u8981\u4f7f\u7528 ",(0,n.jsx)(o.a,{href:"",children:(0,n.jsx)(o.code,{children:"beforeBuild"})}),"Hook\u3002"]})})]}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"useResolvedConfigContext",props:{style:{color:"#88C0D0"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"NormalizedConfig",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"interface",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"NormalizedConfig",props:{style:{color:"#8FBCBB"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" buildConfig",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"PartialBuildConfig",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" buildPreset",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"BuildPreset",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" designSystem",props:{style:{color:"#D8DEE9FF"}}},{content:"?:",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"Record",props:{style:{color:"#8FBCBB"}}},{content:"<",props:{style:{color:"#ECEFF4"}}},{content:"string",props:{style:{color:"#8FBCBB"}}},{content:",",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"any",props:{style:{color:"#8FBCBB"}}},{content:">",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" dev",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"Dev",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" plugins",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"PluginConfig",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" runtime",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"RuntimeConfig",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" runtimeByEntries",props:{style:{color:"#D8DEE9FF"}}},{content:"?:",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"RuntimeByEntriesConfig",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" _raw",props:{style:{color:"#D8DEE9FF"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"UserConfig",props:{style:{color:"#8FBCBB"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"ts"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h3,{id:"apiusehookrunners",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#apiusehookrunners",children:"#"}),(0,n.jsx)(o.code,{children:"api.useHookRunners"})]}),"\n",(0,n.jsx)(o.p,{children:"\u7528\u4e8e\u83b7\u53d6 Hooks \u7684\u6267\u884c\u5668\uff0c\u5e76\u89e6\u53d1\u7279\u5b9a\u7684 Hook \u6267\u884c\u3002"}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"type",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"CliPlugin",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"from",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"@modern-js/core",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"CliPlugin",props:{style:{color:"#8FBCBB"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" (",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"name",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"my-plugin",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"async",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"setup",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#ECEFF4"}}},{content:"api",props:{style:{color:"#D8DEE9"}}},{content:")",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"hookRunners",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"api",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"useHookRunners",props:{style:{color:"#88C0D0"}}},{content:"()",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#ECEFF4"}}},{content:"// \u89e6\u53d1 afterBuild Hook",props:{style:{color:"#616E88"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"await",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"hookRunners",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"afterBuild",props:{style:{color:"#88C0D0"}}},{content:"()",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"ts"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h2,{id:"\u5f02\u6b65-setup",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#\u5f02\u6b65-setup",children:"#"}),"\u5f02\u6b65 setup"]}),"\n",(0,n.jsx)(o.p,{children:"CLI \u63d2\u4ef6\u7684 setup \u53ef\u4ee5\u662f\u4e00\u4e2a\u5f02\u6b65\u51fd\u6570\uff0c\u5728\u521d\u59cb\u5316\u8fc7\u7a0b\u4e2d\u6267\u884c\u5f02\u6b65\u903b\u8f91\u3002"}),"\n",(0,n.jsx)(s.Code,{codeConfig:c,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"CliPlugin",props:{style:{color:"#8FBCBB"}}},{content:"<",props:{style:{color:"#ECEFF4"}}},{content:"ModuleTools",props:{style:{color:"#8FBCBB"}}},{content:">",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" (",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"name",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"my-plugin",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"async",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"setup",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#ECEFF4"}}},{content:"api",props:{style:{color:"#D8DEE9"}}},{content:")",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"await",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"doSomething",props:{style:{color:"#88C0D0"}}},{content:"()",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"ts"},annotations:[]}]}),"\n",(0,n.jsxs)(o.h2,{id:"\u751f\u547d\u5468\u671f\u94a9\u5b50",children:[(0,n.jsx)(o.a,{className:"header-anchor","aria-hidden":"true",href:"#\u751f\u547d\u5468\u671f\u94a9\u5b50",children:"#"}),"\u751f\u547d\u5468\u671f\u94a9\u5b50"]}),"\n",(0,n.jsxs)(o.p,{children:["\u6211\u4eec\u77e5\u9053 ",(0,n.jsx)(o.code,{children:"setup"})," \u51fd\u6570\u4f1a\u8fd4\u56de\u4e00\u4e2a Hooks \u5bf9\u8c61\uff0c\u6240\u8c13 Hooks \u5bf9\u8c61\u4e5f\u53ef\u4ee5\u7406\u89e3\u662f\u5177\u6709 module-tools \u751f\u547d\u5468\u671f\u94a9\u5b50\u7684\u5bf9\u8c61\u3002"]}),"\n",(0,n.jsx)(o.p,{children:"\u76ee\u524d\u4e3b\u8981\u5305\u542b\u4e24\u7c7b\u94a9\u5b50\uff1a"}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["\u6784\u5efa\u94a9\u5b50\uff1a\u4ec5\u5728\u6267\u884c ",(0,n.jsx)(o.code,{children:"build"})," \u547d\u4ee4\u6784\u5efa\u6e90\u7801\u4ea7\u7269\u65f6\u89e6\u53d1\u3002"]}),"\n",(0,n.jsxs)(o.li,{children:[(0,n.jsx)(o.code,{children:"buildPlatform"})," \u94a9\u5b50\uff1a\u4ec5\u5728\u6267\u884c ",(0,n.jsx)(o.code,{children:"build --platform"})," \u547d\u4ee4\u751f\u6210\u5176\u4ed6\u6784\u5efa\u4ea7\u7269\u65f6\u89e6\u53d1\u3002"]}),"\n",(0,n.jsxs)(o.li,{children:["\u8c03\u8bd5\u94a9\u5b50\uff1a\u8fd0\u884c ",(0,n.jsx)(o.code,{children:"dev"})," \u547d\u4ee4\u65f6\u4f1a\u89e6\u53d1\u7684\u94a9\u5b50\u3002"]}),"\n"]}),"\n",(0,n.jsxs)(o.p,{children:["\u5173\u4e8e\u751f\u547d\u5468\u671f\u94a9\u5b50\u7684\u5b8c\u6574\u5217\u8868\u53c2\u8003 ",(0,n.jsx)(o.a,{href:"/module-tools/api/plugin-api/plugin-hooks.html",children:"API \u6587\u6863"}),"\u3002"]})]})}function u(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}o.default=function(e={}){const{wrapper:o}=e.components||{};return o?(0,n.jsx)(o,Object.assign({},e,{children:(0,n.jsx)(d,e)})):d(e)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_modern_js_module_tools_docs=self.webpackChunk_modern_js_module_tools_docs||[]).push([[4390],{2423:function(n,e,r){r.r(e),r.d(e,{content:function(){return d},frontmatter:function(){return s},title:function(){return o},toc:function(){return c}});var t=r(97458);const s=void 0,c=[{id:"\u5b98\u65b9\u63d2\u4ef6",text:"\u5b98\u65b9\u63d2\u4ef6",depth:2}],o="\u603b\u89c8",d='"# \u603b\u89c8\\n\\n## \u5b98\u65b9\u63d2\u4ef6\\n\\n\uff08\u5efa\u8bbe\u4e2d\uff09\\n"';function i(n){const e=Object.assign({h1:"h1",a:"a",h2:"h2",p:"p"},n.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(e.h1,{id:"\u603b\u89c8",children:[(0,t.jsx)(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u603b\u89c8",children:"#"}),"\u603b\u89c8"]}),"\n",(0,t.jsxs)(e.h2,{id:"\u5b98\u65b9\u63d2\u4ef6",children:[(0,t.jsx)(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u5b98\u65b9\u63d2\u4ef6",children:"#"}),"\u5b98\u65b9\u63d2\u4ef6"]}),"\n",(0,t.jsx)(e.p,{children:"\uff08\u5efa\u8bbe\u4e2d\uff09"})]})}e.default=function(n={}){const{wrapper:e}=n.components||{};return e?(0,t.jsx)(e,Object.assign({},n,{children:(0,t.jsx)(i,n)})):i(n)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_modern_js_module_tools_docs=self.webpackChunk_modern_js_module_tools_docs||[]).push([[7991],{344:function(t,r,e){var n=e(47627).Z.Symbol;r.Z=n},71395:function(t,r,e){e.d(r,{Z:function(){return l}});var n=e(344),o=Object.prototype,a=o.hasOwnProperty,u=o.toString,i=n.Z?n.Z.toStringTag:void 0;var c=function(t){var r=a.call(t,i),e=t[i];try{t[i]=void 0;var n=!0}catch(c){}var o=u.call(t);return n&&(r?t[i]=e:delete t[i]),o},f=Object.prototype.toString;var v=function(t){return f.call(t)},s=n.Z?n.Z.toStringTag:void 0;var l=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?c(t):v(t)}},96184:function(t,r){var e="object"==typeof global&&global&&global.Object===Object&&global;r.Z=e},47627:function(t,r,e){var n=e(96184),o="object"==typeof self&&self&&self.Object===Object&&self,a=n.Z||o||Function("return this")();r.Z=a},7247:function(t,r){r.Z=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}},54764:function(t,r){r.Z=function(t){return null!=t&&"object"==typeof t}},80718:function(t,r,e){var n=e(71395),o=e(54764);r.Z=function(t){return"symbol"==typeof t||(0,o.Z)(t)&&"[object Symbol]"==(0,n.Z)(t)}},67933:function(t,r,e){e.d(r,{Z:function(){return g}});var n=e(7247),o=e(47627),a=function(){return o.Z.Date.now()},u=/\s/;var i=function(t){for(var r=t.length;r--&&u.test(t.charAt(r)););return r},c=/^\s+/;var f=function(t){return t?t.slice(0,i(t)+1).replace(c,""):t},v=e(80718),s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,p=/^0o[0-7]+$/i,h=parseInt;var y=function(t){if("number"==typeof t)return t;if((0,v.Z)(t))return NaN;if((0,n.Z)(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=(0,n.Z)(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=f(t);var e=l.test(t);return e||p.test(t)?h(t.slice(2),e?2:8):s.test(t)?NaN:+t},_=Math.max,b=Math.min;var d=function(t,r,e){var o,u,i,c,f,v,s=0,l=!1,p=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(r){var e=o,n=u;return o=u=void 0,s=r,c=t.apply(n,e)}function g(t){return s=t,f=setTimeout(m,r),l?d(t):c}function j(t){var e=t-v;return void 0===v||e>=r||e<0||p&&t-s>=i}function m(){var t=a();if(j(t))return w(t);f=setTimeout(m,function(t){var e=r-(t-v);return p?b(e,i-(t-s)):e}(t))}function w(t){return f=void 0,h&&o?d(t):(o=u=void 0,c)}function Z(){var t=a(),e=j(t);if(o=arguments,u=this,v=t,e){if(void 0===f)return g(v);if(p)return clearTimeout(f),f=setTimeout(m,r),d(v)}return void 0===f&&(f=setTimeout(m,r)),c}return r=y(r)||0,(0,n.Z)(e)&&(l=!!e.leading,i=(p="maxWait"in e)?_(y(e.maxWait)||0,r):i,h="trailing"in e?!!e.trailing:h),Z.cancel=function(){void 0!==f&&clearTimeout(f),s=0,o=v=u=f=void 0},Z.flush=function(){return void 0===f?c:w(a())},Z};var g=function(t,r,e){var o=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return(0,n.Z)(e)&&(o="leading"in e?!!e.leading:o,a="trailing"in e?!!e.trailing:a),d(t,r,{leading:o,maxWait:r,trailing:a})}},39933:function(t,r,e){e.d(r,{Z:function(){return je}});var n=function(){this.__data__=[],this.size=0};var o=function(t,r){return t===r||t!=t&&r!=r};var a=function(t,r){for(var e=t.length;e--;)if(o(t[e][0],r))return e;return-1},u=Array.prototype.splice;var i=function(t){var r=this.__data__,e=a(r,t);return!(e<0)&&(e==r.length-1?r.pop():u.call(r,e,1),--this.size,!0)};var c=function(t){var r=this.__data__,e=a(r,t);return e<0?void 0:r[e][1]};var f=function(t){return a(this.__data__,t)>-1};var v=function(t,r){var e=this.__data__,n=a(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function s(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=i,s.prototype.get=c,s.prototype.has=f,s.prototype.set=v;var l=s;var p=function(){this.__data__=new l,this.size=0};var h=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e};var y=function(t){return this.__data__.get(t)};var _=function(t){return this.__data__.has(t)},b=e(71395),d=e(7247);var g,j=function(t){if(!(0,d.Z)(t))return!1;var r=(0,b.Z)(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},m=e(47627),w=m.Z["__core-js_shared__"],Z=(g=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"";var O=function(t){return!!Z&&Z in t},A=Function.prototype.toString;var z=function(t){if(null!=t){try{return A.call(t)}catch(r){}try{return t+""}catch(r){}}return""},x=/^\[object .+?Constructor\]$/,S=Function.prototype,T=Object.prototype,E=S.toString,k=T.hasOwnProperty,P=RegExp("^"+E.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var $=function(t){return!(!(0,d.Z)(t)||O(t))&&(j(t)?P:x).test(z(t))};var F=function(t,r){return null==t?void 0:t[r]};var I=function(t,r){var e=F(t,r);return $(e)?e:void 0},M=I(m.Z,"Map"),B=I(Object,"create");var C=function(){this.__data__=B?B(null):{},this.size=0};var D=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},N=Object.prototype.hasOwnProperty;var U=function(t){var r=this.__data__;if(B){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return N.call(r,t)?r[t]:void 0},W=Object.prototype.hasOwnProperty;var L=function(t){var r=this.__data__;return B?void 0!==r[t]:W.call(r,t)};var R=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=B&&void 0===r?"__lodash_hash_undefined__":r,this};function V(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}V.prototype.clear=C,V.prototype.delete=D,V.prototype.get=U,V.prototype.has=L,V.prototype.set=R;var q=V;var G=function(){this.size=0,this.__data__={hash:new q,map:new(M||l),string:new q}};var H=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t};var J=function(t,r){var e=t.__data__;return H(r)?e["string"==typeof r?"string":"hash"]:e.map};var K=function(t){var r=J(this,t).delete(t);return this.size-=r?1:0,r};var Q=function(t){return J(this,t).get(t)};var X=function(t){return J(this,t).has(t)};var Y=function(t,r){var e=J(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function tt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}tt.prototype.clear=G,tt.prototype.delete=K,tt.prototype.get=Q,tt.prototype.has=X,tt.prototype.set=Y;var rt=tt;var et=function(t,r){var e=this.__data__;if(e instanceof l){var n=e.__data__;if(!M||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new rt(n)}return e.set(t,r),this.size=e.size,this};function nt(t){var r=this.__data__=new l(t);this.size=r.size}nt.prototype.clear=p,nt.prototype.delete=h,nt.prototype.get=y,nt.prototype.has=_,nt.prototype.set=et;var ot=nt;var at=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var ut=function(t){return this.__data__.has(t)};function it(t){var r=-1,e=null==t?0:t.length;for(this.__data__=new rt;++r<e;)this.add(t[r])}it.prototype.add=it.prototype.push=at,it.prototype.has=ut;var ct=it;var ft=function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1};var vt=function(t,r){return t.has(r)};var st=function(t,r,e,n,o,a){var u=1&e,i=t.length,c=r.length;if(i!=c&&!(u&&c>i))return!1;var f=a.get(t),v=a.get(r);if(f&&v)return f==r&&v==t;var s=-1,l=!0,p=2&e?new ct:void 0;for(a.set(t,r),a.set(r,t);++s<i;){var h=t[s],y=r[s];if(n)var _=u?n(y,h,s,r,t,a):n(h,y,s,t,r,a);if(void 0!==_){if(_)continue;l=!1;break}if(p){if(!ft(r,(function(t,r){if(!vt(p,r)&&(h===t||o(h,t,e,n,a)))return p.push(r)}))){l=!1;break}}else if(h!==y&&!o(h,y,e,n,a)){l=!1;break}}return a.delete(t),a.delete(r),l},lt=e(344),pt=m.Z.Uint8Array;var ht=function(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e};var yt=function(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e},_t=lt.Z?lt.Z.prototype:void 0,bt=_t?_t.valueOf:void 0;var dt=function(t,r,e,n,a,u,i){switch(e){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!u(new pt(t),new pt(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var c=ht;case"[object Set]":var f=1&n;if(c||(c=yt),t.size!=r.size&&!f)return!1;var v=i.get(t);if(v)return v==r;n|=2,i.set(t,r);var s=st(c(t),c(r),n,a,u,i);return i.delete(t),s;case"[object Symbol]":if(bt)return bt.call(t)==bt.call(r)}return!1};var gt=function(t,r){for(var e=-1,n=r.length,o=t.length;++e<n;)t[o+e]=r[e];return t},jt=Array.isArray;var mt=function(t,r,e){var n=r(t);return jt(t)?n:gt(n,e(t))};var wt=function(t,r){for(var e=-1,n=null==t?0:t.length,o=0,a=[];++e<n;){var u=t[e];r(u,e,t)&&(a[o++]=u)}return a};var Zt=function(){return[]},Ot=Object.prototype.propertyIsEnumerable,At=Object.getOwnPropertySymbols,zt=At?function(t){return null==t?[]:(t=Object(t),wt(At(t),(function(r){return Ot.call(t,r)})))}:Zt;var xt=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n},St=e(54764);var Tt=function(t){return(0,St.Z)(t)&&"[object Arguments]"==(0,b.Z)(t)},Et=Object.prototype,kt=Et.hasOwnProperty,Pt=Et.propertyIsEnumerable,$t=Tt(function(){return arguments}())?Tt:function(t){return(0,St.Z)(t)&&kt.call(t,"callee")&&!Pt.call(t,"callee")},Ft=$t;var It=function(){return!1},Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bt=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,Ct=Bt&&Bt.exports===Mt?m.Z.Buffer:void 0,Dt=(Ct?Ct.isBuffer:void 0)||It,Nt=/^(?:0|[1-9]\d*)$/;var Ut=function(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&Nt.test(t))&&t>-1&&t%1==0&&t<r};var Wt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Lt={};Lt["[object Float32Array]"]=Lt["[object Float64Array]"]=Lt["[object Int8Array]"]=Lt["[object Int16Array]"]=Lt["[object Int32Array]"]=Lt["[object Uint8Array]"]=Lt["[object Uint8ClampedArray]"]=Lt["[object Uint16Array]"]=Lt["[object Uint32Array]"]=!0,Lt["[object Arguments]"]=Lt["[object Array]"]=Lt["[object ArrayBuffer]"]=Lt["[object Boolean]"]=Lt["[object DataView]"]=Lt["[object Date]"]=Lt["[object Error]"]=Lt["[object Function]"]=Lt["[object Map]"]=Lt["[object Number]"]=Lt["[object Object]"]=Lt["[object RegExp]"]=Lt["[object Set]"]=Lt["[object String]"]=Lt["[object WeakMap]"]=!1;var Rt=function(t){return(0,St.Z)(t)&&Wt(t.length)&&!!Lt[(0,b.Z)(t)]};var Vt=function(t){return function(r){return t(r)}},qt=e(96184),Gt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ht=Gt&&"object"==typeof module&&module&&!module.nodeType&&module,Jt=Ht&&Ht.exports===Gt&&qt.Z.process,Kt=function(){try{var t=Ht&&Ht.require&&Ht.require("util").types;return t||Jt&&Jt.binding&&Jt.binding("util")}catch(r){}}(),Qt=Kt&&Kt.isTypedArray,Xt=Qt?Vt(Qt):Rt,Yt=Object.prototype.hasOwnProperty;var tr=function(t,r){var e=jt(t),n=!e&&Ft(t),o=!e&&!n&&Dt(t),a=!e&&!n&&!o&&Xt(t),u=e||n||o||a,i=u?xt(t.length,String):[],c=i.length;for(var f in t)!r&&!Yt.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||a&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Ut(f,c))||i.push(f);return i},rr=Object.prototype;var er=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||rr)};var nr=function(t,r){return function(e){return t(r(e))}}(Object.keys,Object),or=Object.prototype.hasOwnProperty;var ar=function(t){if(!er(t))return nr(t);var r=[];for(var e in Object(t))or.call(t,e)&&"constructor"!=e&&r.push(e);return r};var ur=function(t){return null!=t&&Wt(t.length)&&!j(t)};var ir=function(t){return ur(t)?tr(t):ar(t)};var cr=function(t){return mt(t,ir,zt)},fr=Object.prototype.hasOwnProperty;var vr=function(t,r,e,n,o,a){var u=1&e,i=cr(t),c=i.length;if(c!=cr(r).length&&!u)return!1;for(var f=c;f--;){var v=i[f];if(!(u?v in r:fr.call(r,v)))return!1}var s=a.get(t),l=a.get(r);if(s&&l)return s==r&&l==t;var p=!0;a.set(t,r),a.set(r,t);for(var h=u;++f<c;){var y=t[v=i[f]],_=r[v];if(n)var b=u?n(_,y,v,r,t,a):n(y,_,v,t,r,a);if(!(void 0===b?y===_||o(y,_,e,n,a):b)){p=!1;break}h||(h="constructor"==v)}if(p&&!h){var d=t.constructor,g=r.constructor;d==g||!("constructor"in t)||!("constructor"in r)||"function"==typeof d&&d instanceof d&&"function"==typeof g&&g instanceof g||(p=!1)}return a.delete(t),a.delete(r),p},sr=I(m.Z,"DataView"),lr=I(m.Z,"Promise"),pr=I(m.Z,"Set"),hr=I(m.Z,"WeakMap"),yr="[object Map]",_r="[object Promise]",br="[object Set]",dr="[object WeakMap]",gr="[object DataView]",jr=z(sr),mr=z(M),wr=z(lr),Zr=z(pr),Or=z(hr),Ar=b.Z;(sr&&Ar(new sr(new ArrayBuffer(1)))!=gr||M&&Ar(new M)!=yr||lr&&Ar(lr.resolve())!=_r||pr&&Ar(new pr)!=br||hr&&Ar(new hr)!=dr)&&(Ar=function(t){var r=(0,b.Z)(t),e="[object Object]"==r?t.constructor:void 0,n=e?z(e):"";if(n)switch(n){case jr:return gr;case mr:return yr;case wr:return _r;case Zr:return br;case Or:return dr}return r});var zr=Ar,xr="[object Arguments]",Sr="[object Array]",Tr="[object Object]",Er=Object.prototype.hasOwnProperty;var kr=function(t,r,e,n,o,a){var u=jt(t),i=jt(r),c=u?Sr:zr(t),f=i?Sr:zr(r),v=(c=c==xr?Tr:c)==Tr,s=(f=f==xr?Tr:f)==Tr,l=c==f;if(l&&Dt(t)){if(!Dt(r))return!1;u=!0,v=!1}if(l&&!v)return a||(a=new ot),u||Xt(t)?st(t,r,e,n,o,a):dt(t,r,c,e,n,o,a);if(!(1&e)){var p=v&&Er.call(t,"__wrapped__"),h=s&&Er.call(r,"__wrapped__");if(p||h){var y=p?t.value():t,_=h?r.value():r;return a||(a=new ot),o(y,_,e,n,a)}}return!!l&&(a||(a=new ot),vr(t,r,e,n,o,a))};var Pr=function t(r,e,n,o,a){return r===e||(null==r||null==e||!(0,St.Z)(r)&&!(0,St.Z)(e)?r!=r&&e!=e:kr(r,e,n,o,t,a))};var $r=function(t,r,e,n){var o=e.length,a=o,u=!n;if(null==t)return!a;for(t=Object(t);o--;){var i=e[o];if(u&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++o<a;){var c=(i=e[o])[0],f=t[c],v=i[1];if(u&&i[2]){if(void 0===f&&!(c in t))return!1}else{var s=new ot;if(n)var l=n(f,v,c,t,r,s);if(!(void 0===l?Pr(v,f,3,n,s):l))return!1}}return!0};var Fr=function(t){return t==t&&!(0,d.Z)(t)};var Ir=function(t){for(var r=ir(t),e=r.length;e--;){var n=r[e],o=t[n];r[e]=[n,o,Fr(o)]}return r};var Mr=function(t,r){return function(e){return null!=e&&(e[t]===r&&(void 0!==r||t in Object(e)))}};var Br=function(t){var r=Ir(t);return 1==r.length&&r[0][2]?Mr(r[0][0],r[0][1]):function(e){return e===t||$r(e,t,r)}},Cr=e(80718),Dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nr=/^\w*$/;var Ur=function(t,r){if(jt(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!(0,Cr.Z)(t))||(Nr.test(t)||!Dr.test(t)||null!=r&&t in Object(r))};function Wr(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function(){var n=arguments,o=r?r.apply(this,n):n[0],a=e.cache;if(a.has(o))return a.get(o);var u=t.apply(this,n);return e.cache=a.set(o,u)||a,u};return e.cache=new(Wr.Cache||rt),e}Wr.Cache=rt;var Lr=Wr;var Rr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vr=/\\(\\)?/g,qr=function(t){var r=Lr(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(Rr,(function(t,e,n,o){r.push(n?o.replace(Vr,"$1"):e||t)})),r}));var Gr=function(t,r){for(var e=-1,n=null==t?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o},Hr=lt.Z?lt.Z.prototype:void 0,Jr=Hr?Hr.toString:void 0;var Kr=function t(r){if("string"==typeof r)return r;if(jt(r))return Gr(r,t)+"";if((0,Cr.Z)(r))return Jr?Jr.call(r):"";var e=r+"";return"0"==e&&1/r==-Infinity?"-0":e};var Qr=function(t){return null==t?"":Kr(t)};var Xr=function(t,r){return jt(t)?t:Ur(t,r)?[t]:qr(Qr(t))};var Yr=function(t){if("string"==typeof t||(0,Cr.Z)(t))return t;var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r};var te=function(t,r){for(var e=0,n=(r=Xr(r,t)).length;null!=t&&e<n;)t=t[Yr(r[e++])];return e&&e==n?t:void 0};var re=function(t,r,e){var n=null==t?void 0:te(t,r);return void 0===n?e:n};var ee=function(t,r){return null!=t&&r in Object(t)};var ne=function(t,r,e){for(var n=-1,o=(r=Xr(r,t)).length,a=!1;++n<o;){var u=Yr(r[n]);if(!(a=null!=t&&e(t,u)))break;t=t[u]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&Wt(o)&&Ut(u,o)&&(jt(t)||Ft(t))};var oe=function(t,r){return null!=t&&ne(t,r,ee)};var ae=function(t,r){return Ur(t)&&Fr(r)?Mr(Yr(t),r):function(e){var n=re(e,t);return void 0===n&&n===r?oe(e,t):Pr(r,n,3)}};var ue=function(t){return t};var ie=function(t){return function(r){return null==r?void 0:r[t]}};var ce=function(t){return function(r){return te(r,t)}};var fe=function(t){return Ur(t)?ie(Yr(t)):ce(t)};var ve=function(t){return"function"==typeof t?t:null==t?ue:"object"==typeof t?jt(t)?ae(t[0],t[1]):Br(t):fe(t)};var se=function(t,r,e,n){for(var o=t.length,a=e+(n?1:-1);n?a--:++a<o;)if(r(t[a],a,t))return a;return-1};var le=function(t){return t!=t};var pe=function(t,r,e){for(var n=e-1,o=t.length;++n<o;)if(t[n]===r)return n;return-1};var he=function(t,r,e){return r==r?pe(t,r,e):se(t,le,e)};var ye=function(t,r){return!!(null==t?0:t.length)&&he(t,r,0)>-1};var _e=function(t,r,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(r,t[n]))return!0;return!1};var be=function(){},de=pr&&1/yt(new pr([,-0]))[1]==1/0?function(t){return new pr(t)}:be;var ge=function(t,r,e){var n=-1,o=ye,a=t.length,u=!0,i=[],c=i;if(e)u=!1,o=_e;else if(a>=200){var f=r?null:de(t);if(f)return yt(f);u=!1,o=vt,c=new ct}else c=r?[]:i;t:for(;++n<a;){var v=t[n],s=r?r(v):v;if(v=e||0!==v?v:0,u&&s==s){for(var l=c.length;l--;)if(c[l]===s)continue t;r&&c.push(s),i.push(v)}else o(c,s,e)||(c!==i&&c.push(s),i.push(v))}return i};var je=function(t,r){return t&&t.length?ge(t,ve(r,2)):[]}}}]);