jaydp17 / serverless-plugin-ncc

A serverless plugin to use @zeit/ncc for bundling
MIT License
21 stars 6 forks source link

When providing `externals` to ncc, can the plugin auto include those externals to the deployment package? #5

Open MacMcIrish opened 5 years ago

MacMcIrish commented 5 years ago

For example, with the following custom config:

custom:
  ncc:
    externals:
      - 'external-packge'

Is it possible for the plugin to inject those externals similar to:

package:
  include:
    - 'node_modules/external-package/**'

Thanks for the plugin btw!

jaydp17 commented 5 years ago

Hello @MacMcIrish, I don't think that's something that this plugin should do. However, if you just want this for development only & if the external-package is available in the node_modules/ directory, it should pick it up.

For example:

<project-root>/
├── dist/
└── node_modules/
    └── external-module/