Skip to content Skip to sidebar Skip to footer

How To Determine Which Css File Will Be Sent To Clients

I started a simple project with Meteor. But now it is getting complicated. I am trying add a management panel for project. I want to separate site and its panel. But every css and

Solution 1:

TLDR; If you put your files over in the /public folder, they wont automatically be sent to the client, they just need to be referenced manually.

To reference your files manually, just add them into your HTML just before where your </body> is. So for a file at /public/js/myFile1.js :

<scripttype="text/javascript"src="/js/myFile1.js"></script></body>

All of the following are sent to the client, all js,css,font & html files in the top level (root directory that & subdirectories that aren't:

  • server
  • public
  • assets
  • packages
  • public
  • folders that begin with a '.'
  • or tests (not sure)

are all concatenated into a single file and sent to the client.

So in the public folder meteor pretty much ignores them. You can manually reference them to include them if you wish.

Another option might be to make a private package so you can explicitly decide on which files you want to include, this makes it easy to also use your same design on different related meteor apps.

Post a Comment for "How To Determine Which Css File Will Be Sent To Clients"