code: function createChunkSplits(extraConfig, dirName){
  
    // Only if there are libs to process
    if(!extraConfig.lib) return;
  
    // Notify about it
    console.log('Creating library splits');
  
    // Create a common loader
    var loader = function(config, cb){
      // This will tell webpack to create a new chunk
      rq.ensure(['INDEX_PATH'],function(rq){
        let library = rq('INDEX_PATH');
        library = library.default || library; // To preven issues between versions
        cb(
          // Expected to export an initializing function
          library(config)
        );
      },'NAME');
    }
  
    // For each lib in the config or for each app_module
    var
      loaders = []
      fileOut = extraConfig.libDir + '/libraries.websdk.js'
      names   = Object.keys(extraConfig.lib)
    ;
    if( !names.length ) return;
    names.forEach(function(it){
      var libPath = path.resolve(extraConfig.lib[it]).replace(/\\/g,'/');
  
      // Add the definition for this loader
      loaders.push(
        'Registry["' + it + '"] = ' + loader.toString()
          .replace(/INDEX_PATH/g, libPath)
          .replace(/NAME/g, it)
          .replace(/rq/g,'require') + ';'
      );
    });
  
    // Create the libraries file, this file can be committed if desired
    fs.writeFileSync( fileOut,
      'import Registry from "websdk/essential/ensure-import/registry";\n'
      + loaders.join("\n")
    );
    console.log('Created a library at: ' + fileOut);
    console.log('If you require this file from a runtime file, chunks will be generated for you');
  }
docs: ================================================== Create a file with references that will create library chunks if used