The overhead of setting up NPM, some repo when I can achieve the same thing with that snippet, seems just to over the top.
What overhead? You don’t run any optimization step on your code? I haven’t seen a single front end project without package.json in years in all the companies I consulted for, and I don’t even deal with fancy frameworks.
The web projects that I work on are rendered at the server and then that is displayed to the client.
The overhead of setting up NPM, some repo when I can achieve the same thing with that snippet, seems just to over the top.