Open BSFishy opened 9 months ago
Makes total sense, Matt. I will work on this to implement the feature! Thanks for the suggestion.
@BSFishy,
I want to come back with this recommendation. Do you have any recommendations for a bundler to use? What do you think about webpack
? What do you use - you guys - in OUI and OSD?
You can also use https://www.npmjs.com/package/@vercel/ncc
Oh yeah. I did try @vercel/ncc
before. That one is a good choice. Thanks, Ashwin! I will try that!
Sorry if this is a dumb question -
Do you want just the node_modules packed into a single file, or should I bundle everything in the application?
Check what @BSFishy mentioned at the beggining. The idea is to bundle the application entirely in a single file and don't worry about submit the _nodemodules folder.
I feel like I mentioned at some point to add the
node_modules
directory to the.gitignore
, which I think the consensus was that it breaks the running because those dependencies don't exist at runtime. Looking at some actions that I've authored myself, I realized I used a bundler to make sure I didn't include thenode_modules
directory.I feel like including the
node_modules
directory is unnecessary and a little bit of a bad practice, as it can get out of sync with thepackage.json
andpackage-lock.json
, and makes clones and usages of the repo larger.Have you considered employing a bundler to bundle everything together into a single file so that you don't need to worry about including the
node_modules
file? Of course, this would mean with each change you would need to re-bundle, but it's possible that could be automated with a precommit hook that bundles and adds the file to the commit so that there's no additional work necessary.Just curious if it's something you've considered and thoughts around it :)