I have a node.js-like environment (low.js actually) and I have to deploy to a device that has very little storage. Since it's a node.js-like env. I don't need Webpack overhead creating a single file and custom require function etc. All I need is a tool that based on the require() (or import) statements in the entry point(s) selects all JS files included directly or indirectly. So instead of copying the entire directory with doc/ package.json etc etc I want a tool that creates the same directory structure that I already have, but only puts JS files (and no other) and only those actually required in them.I already know how to get a single file bundle using Webpack, but as I said, I don't want the overhead. Debugging issues on that IoT device already is hard enough without the code being wrapped into all that bundler meta magic.On actual node.js on a PC I would just install into node_modules on the target, on our target device that wold overflow the limited storage with mostly unused files. So I won't run npm installon the target system, instead I want to call the "bundler" that puts all necessary (JS only) files into a directory that I then sync to the device.
Submitted December 05, 2018 at 06:20PM by FanOfHoles
No comments:
Post a Comment