App for admin and for store front


#1

Is it possible to load different js ang css for admin route and store front route.

I am planning to create a e-commerce site using meteor. I do not want to load admin js and css to the store front page.

any ideas?


#2

There is a card in future https://trello.com/c/24s6vyxo/55-incremental-loading .

But now, i think you can use this package temporarily.

https://atmospherejs.com/miro/preloader


#3

@mrphu3074 This is nice but how about template files. When I inspect in the browser the template files (js) of the admin page is loaded in the store front page. Any ideas how to include templates?


#4

have no idea @ccfiel. because everything (except public folder) will be build before running.
Maybe need someone who solved this problem.


#5

I had a similar issue and ended up just making a separate meteor application for the admin and pointing it at the same database as the main one. Then I just made sure that the server folders were synced between the 2 projects. I realise this is a pretty hacky solution, but I couldn’t find a way to not server the admin JS and CSS at all.

That being said I have now actually just combined the projects and keep each one in a separate meteor package. It doesn’t stop the admin clientside js being sent, but it does separate the functionality nicely. (I decided trying to hide the admin js was not work the effort).


#6