Skip to content

Bundling of node modules works oddly #117

@JakubMatejka

Description

@JakubMatejka

I use webpack-node-externals for bundling mode modules like this:

externals: [nodeExternals({
    modulesFromFile: true,
  })],

(whole config is here: https://github.com/keboola/developer-portal/blob/master/webpack.config.js)

And it worked quite well until recently when I decided to move the deployment to Docker and noticed that the code stopped working because some modules are missing. I have found out that the nodeExternals() method returns list of 47 modules however when I run serverless deploy, it bundles 137 modules. Although quite more then I want but the code still works. But the weird thing is that when I run the same deployment from a docker container (using this Dockerfile: https://github.com/keboola/developer-portal/blob/docker-travis/Dockerfile) it bundles only 18 modules, so the code fails on missing modules. Would you have any idea why is this going on? Thanks.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions