Auth0 Home Blog Docs

Webtask: wt --bundle without node_modules?



I would like to create a multi-file webtask. I use wt —bundle to create a single file for WebTasks.

However, this bundles the node_modules as well for some reason, which increases the size to over 100kb.

Is there a way to prevent this behaviour?


I might be missing something, but I just used the latest version of wt-cli (8.2.0) to create a webtask that is composed of multiple files using:

wt create -b multiple.js

In addition, there was a package.json file containing the external dependencies that that were required and the command completed successfully informing me that the dependencies were being provisioned.

In conclusion, based on ( the dependencies will be installed and not bundled.


Thanks! It worked.
My problem was because my package.json was outside. My JS files are in a folder called dist. So first, I had to copy package.json into the dist folder, and then build the dist folder.