dougmoscrop / serverless-plugin-include-dependencies

MIT License
184 stars 40 forks source link

include external dependencies #28

Closed samikarak closed 5 years ago

samikarak commented 5 years ago

In my current application I have db models, which gets shared by each serverless application. I would like to include these external models in my serverless deployment

// handler.js const myModel = require('../models/myModel.model');

Is that possible with this plugin ? If not, is this a feature you would consider to integrate ?

dougmoscrop commented 5 years ago

Sorry I somehow missed this issue. I don't think I understand the request, can you give more detailed example?

jmonster commented 5 years ago

I believe they're asking if they can include their own files and not just npm dependencies -- which is something offered by specifying Webpack: true in the dot-yaml-file

dougmoscrop commented 5 years ago

Oh, the simplest way to achieve this would just be to use severless' built-in support?

like

package:
  include:
    - src/**/*.model
dougmoscrop commented 5 years ago

Okay I think this issue is solved using native Serverless support, closing, but if there's something this plugin can do that makes it easier than a one liner ^ please reopen with requirements etc