How to exclude node_modules from distribution

How can I exclude unneeded items from node_modules in distributing my game?

I have made a small game using some javascript tools from node.js. I use webpack to compile these into javascript plugins. But when I start packaging my game for distribution using file-->deployment from the game editor and it seems to be including a ton of stuff from node_modules.

Is it possible to exclude that somehow?

Thanks.
You would do your plugin development in a different folder than where your game lives. As part of the webpack/plugin build process, copy the files that you need from your plugin dev folder to your project folder.
You would do your plugin development in a different folder than where your game lives. As part of the webpack/plugin build process, copy the files that you need from your plugin dev folder to your project folder.
Thanks. That makes sense.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-exclude-node_modules-from-distribution.107095/