Incorporating HTML/CSS/JS theme into Meteor 1.6


Haven’t used Meteor since 1.3 and trying to get back into it. Back then the best practice was to store the theme files (purchased from a site like Themeforest) was in the /client/ folder.

However whenever a page was visited everything stored in the /client/ folder would load which is pretty taxing on load time as themes can be pretty hefty.

In Meteor 1.6 what’s the best way to incorporate a theme without having the theme load on each page visit?


Current best practice is to use a combination of ES6 imports and ES Next dynamic imports to split your app.

Recommended folder structure:

A little bit about dynamic imports:

I’m splitting my app by route and getting FlowRouter to wait for the dynamic imports to resolve before changing the page. This means the initial page load is small, and resources for heavy pages are lazy loaded when needed.