support auto pre-loading for js variants
Merge pull request #446 from tkellen/auto-preloading

support auto pre-loading for js variants