<commit_before>import React from 'react'
import ReactDom from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import OfflinePluginRuntime from 'offline-plugin/runtime'
import App from './components/App'
import './styles/global.scss'

const render = (Component) => {
  ReactDom.render(
    <AppContainer>
      <Component />
    </AppContainer>,
  document.getElementById('app'))
}

render(App)

if (module.hot) {
  module.hot.accept('./components/App', () => { render(App) })
}

if (process.env.NODE_ENV === 'production') {
  OfflinePluginRuntime.install({
    onUpdateReady: () => OfflinePluginRuntime.applyUpdate(),
    onUpdated: () => location.reload(),
  })
}<commit_msg>Use SW default behavior for installing/updating<commit_after>import React from 'react'
import ReactDom from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import OfflinePluginRuntime from 'offline-plugin/runtime'
import App from './components/App'
import './styles/global.scss'

const render = (Component) => {
  ReactDom.render(
    <AppContainer>
      <Component />
    </AppContainer>,
  document.getElementById('app'))
}

render(App)

if (module.hot) {
  module.hot.accept('./components/App', () => { render(App) })
}

if (process.env.NODE_ENV === 'production') {
  OfflinePluginRuntime.install()
}
{'fraction_non_alphanumeric': 0.15720858895705522, 'fraction_numerical': 0.0, 'mean_word_length': 4.483193277310924, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '3983830', 'n_tokens_mistral': 400, 'n_tokens_neox': 399, 'n_words': 87}