const { source, dest } = require('../../lib/path-helpers');

const dllStats = require(dest('assets/dlls/dll-stats.json')); // eslint-disable-line

module.exports = {
  dllStats,
  template: source('skeleton.html'),
  inject: true,
  chunksSortMode: (a, b) => {
    if (a.names[0] === 'devScript') return -1;
    if (a.names[0] === 'styleguide' && b.names[0] !== 'bundle') return 1;
    if (a.names[0] === 'bundle') return 1;
    return 0;
  }
};

@@ -138,16 +138,105 @@
 ble-line
+%0Aconst %7B outputModes, outputSort %7D = require(source('fc-config')); // eslint-disable-line
 %0A%0Amodule
@@ -335,201 +335,18 @@
 de: 
-(a, b) =%3E %7B%0A    if (a.names%5B0%5D === 'devScript') return -1;%0A    if (a.names%5B0%5D === 'styleguide' && b.names%5B0%5D !== 'bundle') return 1;%0A    if (a.names%5B0%5D === 'bundle') return 1;%0A    return 0;%0A  %7D
+outputSort
 %0A%7D;%0A

use fc-config outputsort