Closed jormaechea closed 5 years ago
I have some dynamically included modules that I include in package manually.
But this modules have others dependencies, some are mine and some are npm packages.
This last non-dinamically resolved dependencies are not being included in the function package.
Examples:
// handler.js const moduleName = 'A'; const module = require(`./module${moduleName}`);
// moduleA.js const module = require(`./aDependency`);
// serverless.yml functions: functionA: include: - moduleA.js
This way, aDependency.js is still missing. This can be solved manually including the dependency's dependencies, although it's a pain in the a$$.
aDependency.js
// moduleA.js const module = require(`some-npm-module`);
In this case, the npm package some-npm-module (and it's dependencies) are not packaged, and this cannot be manually solved.
some-npm-module
Indeed it's not how it should work, it also should not be difficult to solve, let me look into.
Fixed with d7d827fc8d965851172747e367939a33a2dea9c7 and published with v3.2.2
Thanks @medikoo !
I have some dynamically included modules that I include in package manually.
But this modules have others dependencies, some are mine and some are npm packages.
This last non-dinamically resolved dependencies are not being included in the function package.
Examples:
1. Local dependency
This way,
aDependency.js
is still missing. This can be solved manually including the dependency's dependencies, although it's a pain in the a$$.2. Npm package dependency
In this case, the npm package
some-npm-module
(and it's dependencies) are not packaged, and this cannot be manually solved.