How to use the html-webpack-plugin/lib/chunksorter.js.none function in html-webpack-plugin

To help you get started, we’ve selected a few html-webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github janoist1 / helmet-webpack-plugin / src / index.js View on Github external
sortChunks (chunks) {
    // Custom function
    if (typeof this.options.chunksSortMode === 'function') {
      return chunks.sort(this.options.chunksSortMode)
    }
    // Disabled sorting:
    if (this.options.chunksSortMode === 'none') {
      return chunkSorter.none(chunks)
    }
    // Check if the given sort mode is a valid chunkSorter sort mode
    if (typeof chunkSorter[this.options.chunksSortMode] !== 'undefined') {
      return chunkSorter[this.options.chunksSortMode](chunks)
    }
    throw new Error('"' + this.options.chunksSortMode + '" is not a valid chunk sort mode')
  }