Dogstudio / highway

Highway - A Modern Javascript Transitions Manager
https://highway.js.org/
MIT License
1.43k stars 92 forks source link

How to set code splitting ? #21

Closed zhw2590582 closed 6 years ago

zhw2590582 commented 6 years ago

I made a simple demo. But it seems that all the renderers are loaded all at once. I expect the renderer to be lazy to load, Am I wrong with which step? Thank you very much.

import Highway from "@dogstudio/highway/build/es5/highway";

const H = new Highway.Core({
  renderers: {
    index: import('./index'),
    about: import('./about')
  }
});

Repository: https://github.com/zhw2590582/I-am-sleepy Demo: https://sleepy.im/index.html