Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better JS bundling #95

Open
sc0ttj opened this issue Dec 20, 2019 · 0 comments
Open

Better JS bundling #95

sc0ttj opened this issue Dec 20, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@sc0ttj
Copy link
Owner

sc0ttj commented Dec 20, 2019

1. Support multiple JS CDNs:

Allow user to set preferred CDN in site.yml:

2. Bundle the NPM deps defined in site.yml as a single JS file:

Reduce network requests, while keeping things cache-able, by bundling the main site JS deps as a single file at build time:

  • site deps: use curl at build time to grab the JS, put it into assets/js/site.js

If a page has its own, separate list of deps, bundle them into a separate file:

  • page deps: use curl at build time to grab the JS, put it into assets/js/${page_slug}.js
@sc0ttj sc0ttj added the enhancement New feature or request label Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant