You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
746 B

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