<commit_before>import {
  mergeStates,
} from 'fractal-core'

declare const FuseBox

if (!process.env.isProduction) {

  const customizedHMRPlugin = {
    hmrUpdate: data => {
      if (data.type === 'js') {
          FuseBox.flush()
          FuseBox.dynamic(data.path, data.content)
          let newMod = FuseBox.import(data.path)
          if (FuseBox.mainFile && newMod.name && newMod.hasOwnProperty('state') && newMod.interfaces) {
            let Root = FuseBox.import('./Root')
            ;(window as any).app.moduleAPI.reattach(Root, mergeStates)
          } else if (FuseBox.mainFile) {
            FuseBox.import(FuseBox.mainFile)
          }
          return true
      }
    }
  }

  if (!process.env.hmrRegistered) {<commit_msg>Dispose App in hmr when not use hot-swap<commit_after>import {
  mergeStates,
} from 'fractal-core'

declare const FuseBox

if (!process.env.isProduction) {

  const customizedHMRPlugin = {
    hmrUpdate: data => {
      if (data.type === 'js') {
          FuseBox.flush()
          FuseBox.dynamic(data.path, data.content)
          if (FuseBox.mainFile && data.path.slice(0, 4) === 'Root') {
            let Root = FuseBox.import('./Root')
            ;(window as any).app.moduleAPI.reattach(Root, mergeStates)
          } else if (FuseBox.mainFile) {
            ;(window as any).app.moduleAPI.dispose()
            FuseBox.import(FuseBox.mainFile)
          }
          return true
      }
    }
  }

  if (!process.env.hmrRegistered) {
{'fraction_non_alphanumeric': 0.13283884018880648, 'fraction_numerical': 0.0013486176668914363, 'mean_word_length': 2.2190889370932756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7500587', 'n_tokens_mistral': 497, 'n_tokens_neox': 486, 'n_words': 91}