<commit_before>'use strict';

import '@babel/polyfill';
import React from 'react';
import {render} from 'react-dom';
import {createHashHistory} from 'history';
import {renderRoutes} from 'react-router-config';
import {Provider} from 'react-redux';
import {ConnectedRouter} from 'react-router-redux';

import configureStore from 'reduxes/store';
import configureRoutes from './config.routes';

import 'scss/index.scss';

const history = createHashHistory(),
    store = configureStore(history);

function renderAppContainer() {
    render(
        <Provider store={store}>
            <ConnectedRouter history={history}>
                {renderRoutes(configureRoutes(store))}
            </ConnectedRouter>
        </Provider>,
        document.getElementById('app-container')
    );
}

renderAppContainer();

// 热替换
if (process.env.NODE_ENV === 'development' && module.hot) {
    module.hot.accept('examples/config.routes.js', renderAppContainer);
}<commit_msg>update hot loader<commit_after>'use strict';

import '@babel/polyfill';
import React from 'react';
import {render} from 'react-dom';
import {createHashHistory} from 'history';
import {renderRoutes} from 'react-router-config';
import {Provider} from 'react-redux';
import {ConnectedRouter} from 'react-router-redux';

import configureStore from 'reduxes/store';
import configureRoutes from './config.routes';

import 'scss/index.scss';

const history = createHashHistory(),
    store = configureStore(history);

function renderAppContainer() {
    render(
        <Provider store={store}>
            <ConnectedRouter history={history}>
                {renderRoutes(configureRoutes(store))}
            </ConnectedRouter>
        </Provider>,
        document.getElementById('app-container')
    );
}

renderAppContainer();

// hot
if (process.env.NODE_ENV === 'development' && module.hot) {
    module.hot.accept('examples/config.routes.js', renderAppContainer);
    module.hot.accept('reduxes/store', renderAppContainer);
    module.hot.accept('reduxes/reducers', () => {
        store.replaceReducer(require('reduxes/reducers').default);
    });
}
{'fraction_non_alphanumeric': 0.14306016106110847, 'fraction_numerical': 0.0, 'mean_word_length': 4.151219512195122, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '5240691', 'n_tokens_mistral': 613, 'n_tokens_neox': 608, 'n_words': 130}