forest-express-mongoose icon indicating copy to clipboard operation
forest-express-mongoose copied to clipboard

How to ignore Babel build artifacts ?

Open cidylle opened this issue 8 years ago • 1 comments

My build will output javascript source map files using Babel. The init function from forest-express-mongoose will try to load these files as they are co-located with other model files after the build. The init function then fails.

Is there a way to ignore certain files or file patterns during this initialization process ?

cidylle avatar Sep 12 '17 06:09 cidylle

Hi @cidylle,

Maybe what you could do is:

  • Remove the modelsDir option in the init call.
  • Ensure that for mongoose: require('mongoose'), Forest can access all your Mongoose models calling require('mongoose').models.

It should work this way. Let me know.

arnaudbesnier avatar Sep 20 '17 11:09 arnaudbesnier