createEntry.js 514 B

1234567891011
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = createEntry;
  6. function createEntry(filePaths) {
  7. return ['// runtime helper', 'function inManifest(id) { return global.__webpackManifest__.indexOf(id) >= 0;}', 'function run(id) { __webpack_require__(id);}', '', '// modules to execute goes here', 'var ids = [', filePaths.map(function (path) {
  8. return 'require.resolve(' + path + ')';
  9. }).join(','), '];', '', 'ids.filter(inManifest).forEach(run)'].join('\n');
  10. }