Pageworks / papertrain

Papertrain: a Craft CMS 3 framework
http://download.papertrain.io
MIT License
5 stars 2 forks source link

Add Destroying Modules #146

Closed codewithkyle closed 5 years ago

codewithkyle commented 5 years ago

The Application doesn't work with Pjax. We need to add a public static unmount() method.

codewithkyle commented 5 years ago

I'm still debating if I want to keep the Application class baked into Papertrain or break it out into a new hybrid NPM package that combines Pjax and the Application into one library.

codewithkyle commented 5 years ago

Experimenting with a conversion to web components instead of a custom JavaScript runtime implementation, see my web components prototype for additional details.

codewithkyle commented 5 years ago

After experimenting with web components along with asset optimizations I think a better route to take would be to focus on developing tools to help optimize bundle and asset sizes along with creating a service worker that could prefetch key assets on specific pages based on actual user data on a per-site basis. As of now Pjax is a dependency, however, it is not currently implemented. I'll close this issue since the actual benefits of optimizing images and actively looking to lazy load scripts, css, videos, and images is a better path to proceed down.