Dogstudio / highway

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

Add code splitting for Renderers #22

Closed zhw2590582 closed 6 years ago

zhw2590582 commented 6 years ago

It seems that all the renderers are loaded all at once. I expect the renderer to be lazy to load, just a little try.

const H = new Highway.Core({
  renderers: {
    home: () => import('./Home'),
    about: () => import('./About'),
    contact: () => import('./Contact')
  },
  transitions: {}
});

Example: https://github.com/zhw2590582/I-am-sleepy Preview: https://sleepy.im/index.html

Anthodpnt commented 4 years ago

@all-contributors please add @zhw2590582 for code

allcontributors[bot] commented 4 years ago

@Anthodpnt

I've put up a pull request to add @zhw2590582! :tada: