NodeMainTemplate.runtime.js 846 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. // eslint-disable-next-line no-unused-vars
  6. var $hotChunkFilename$ = undefined;
  7. var hotAddUpdateChunk = undefined;
  8. var installedChunks = undefined;
  9. var $hotMainFilename$ = undefined;
  10. module.exports = function() {
  11. // eslint-disable-next-line no-unused-vars
  12. function hotDownloadUpdateChunk(chunkId) {
  13. var chunk = require("./" + $hotChunkFilename$);
  14. hotAddUpdateChunk(chunk.id, chunk.modules);
  15. }
  16. // eslint-disable-next-line no-unused-vars
  17. function hotDownloadManifest() {
  18. try {
  19. var update = require("./" + $hotMainFilename$);
  20. } catch (e) {
  21. return Promise.resolve();
  22. }
  23. return Promise.resolve(update);
  24. }
  25. //eslint-disable-next-line no-unused-vars
  26. function hotDisposeChunk(chunkId) {
  27. delete installedChunks[chunkId];
  28. }
  29. };