Exclude folder from production build?


Is it possible to create a package that serves to exclude a whole folder from becoming part of production builds? Could be a folder with a specific name or containing a specific config file, but the contents of which are only relevant during development.

For instance – if I wanted developers to be able to place templates and scripts inside a /styleguide folder and have them loaded while Meteor is in development mode, but NOT when in production mode.

The only alternative I see is for making sure some things are kept out of production is for the users (developers) themselves to wrap their stuff in a package of its own, marked as debugOnly.



You can start any file or directory with dot (’.’) and they won’t include in the build.


That’s the way to go currently for your styleguide use case. It’s very easy :wink: meteor create --package styleguide and then add the debugOnly: true to package.js.