<commit_before>/* global __webpack_css_chunk_hashes__, __webpack_public_path__, __webpack_websocket_port__, __webpack_chunkname__ */

/*
  Links to the stylesheet and adds hot reloading for stylesheets
*/

import hotCssReplacementClient from './hot-css-replacement-client?transpiled-javascript-string'

const isWatch = process.env.WATCH

export default __webpack_css_chunk_hashes__
  .map((cssHash, index) => <link href={`${__webpack_public_path__ + cssHash}.css`} rel='stylesheet' type='text/css' key={'stylesheet_' + index} />)
  .concat(isWatch && createHotReload(__webpack_websocket_port__, __webpack_css_chunk_hashes__, __webpack_chunkname__, __webpack_public_path__))
  .filter(Boolean)

function createHotReload(port, cssHashes, chunkName, publicPath) {
  return (
    <script
      key='stylesheet_hotCssReplacementClient'
      dangerouslySetInnerHTML={{
      __html: `(${hotCssReplacementClient})(${port}, ${JSON.stringify(cssHashes)}, '${chunkName}', '${publicPath}')`
      }}
    />
  )
}
<commit_msg>using hash instead of index as a key for stylesheets<commit_after>/* global __webpack_css_chunk_hashes__, __webpack_public_path__, __webpack_websocket_port__, __webpack_chunkname__ */

/*
  Links to the stylesheet and adds hot reloading for stylesheets
*/

import hotCssReplacementClient from './hot-css-replacement-client?transpiled-javascript-string'

const isWatch = process.env.WATCH

export default __webpack_css_chunk_hashes__
  .map(cssHash => <link href={`${__webpack_public_path__ + cssHash}.css`} rel='stylesheet' type='text/css' key={`stylesheet_${cssHash}`} />)
  .concat(isWatch && createHotReload(__webpack_websocket_port__, __webpack_css_chunk_hashes__, __webpack_chunkname__, __webpack_public_path__))
  .filter(Boolean)

function createHotReload(port, cssHashes, chunkName, publicPath) {
  return (
    <script
      key='stylesheet_hotCssReplacementClient'
      dangerouslySetInnerHTML={{
      __html: `(${hotCssReplacementClient})(${port}, ${JSON.stringify(cssHashes)}, '${chunkName}', '${publicPath}')`
      }}
    />
  )
}

{'fraction_non_alphanumeric': 0.12172647914645975, 'fraction_numerical': 0.0, 'mean_word_length': 6.188153310104529, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1276643', 'n_tokens_mistral': 659, 'n_tokens_neox': 655, 'n_words': 117}