examples/webpack/example-builder.js
function getJsSource(chunk, jsName) {
  let jsSource;
  for (let i = 0, ii = chunk.modules.length; i < ii; ++i) {
    const module = chunk.modules[i];
    if (module.modules) {
      jsSource = getJsSource(module, jsName);
      if (jsSource) {
        return jsSource;
      }
    }
    if (module.identifier.endsWith(jsName) && module.source) {
      return module.source;
    }
  }
}
function getJsSource(chunk, jsName) {
  let jsSource;
  for (let i = 0, ii = chunk.modules.length; i < ii; ++i) {
    const module = chunk.modules[i];
    if (module.modules) {
      jsSource = getJsSource(module, jsName);
      if (jsSource) {
        return jsSource;
      }
    }
    if (module.identifier.endsWith(jsName) && module.source) {
      return module.source;
    }
  }
}
function getJsSource ( chunk , jsName ) { let jsSource ; for ( let i = 0 , ii = chunk . modules . length ; i < ii ; ++ i ) { const module = chunk . modules [ i ] ; if ( module . modules ) { jsSource = getJsSource ( module , jsName ) ; if ( jsSource ) { return jsSource ; } } if ( module . identifier . endsWith ( jsName ) && module . source ) { return module . source ; } } }
Gets the source for the chunk that matches the jsPath
@param {Object} chunk Chunk.
@param {string} jsName Name of the file.
@return {string} The source.
Gets the source for the chunk that matches the jsPath