logo
  • Guide
  • Config
  • Plugin
  • API
  • Examples
  • Community
  • Modern.js 2.x Docs
  • English
    • 简体中文
    • English
    • Introduction
      Plugin System
      CLI Plugins
      CLI Plugin API
      Life Cycle
      Runtime Plugins
      Plugin API
      Life Cycle
      Server Plugins
      Plugin API
      Life Cycle
      Official Plugins
      CLI Plugins
      BFF Plugin
      SSG Plugin
      styled-components Plugin
      📝 Edit this page
      Previous pagePlugin APINext pageCLI Plugins

      #Life Cycle

      Info

      Runtime Hooks

      The onReset hook is triggered at runtime when files change or code recompilation (rspack) is needed. It is not part of the initialization flow, so it is not shown in the diagram above.

      • Trigger Timing: File changes (event.type: 'file-change') or code recompilation (rspack) completion (event.type: 'repack')
      • Use Cases: Clearing cache, re-initializing resources, etc.