My toxic trait is that I firmly believe that NPM is a backend technology that should vend no code you actually send to a browser.
-
My toxic trait is that I firmly believe that NPM is a backend technology that should vend no code you actually send to a browser.
-
@slightlyoff After looking at how to package node_modules for import map consumption + SSR consumption for server, I am starting to think that the industry has got this inverted!
We need a client-side centered library package manager like .. as funny as this would sound ... bower ... that node.js consumes, rather than other way round!
jspm exists though, but I am hitting issues with it
-
@munawwar I've long argued that NPM should have a way to explicitly ship source for use in frontend projects (to kill transitive dependency transpiler cruft), and that bundled/minified sources should be able to be marked with language/browser support explicitly. That is, modules should have a "web modules" section.
-
@munawwar ...and that "frontend npm" (like bower) should only ever allow flat deps trees
-
@slightlyoff I just recently learned that LibMan is a thing. Guess it's not really limited to dotnet projects. https://learn.microsoft.com/en-us/aspnet/core/client-side/libman/libman-cli?view=aspnetcore-8.0
-
@tskardal TIL!
-
@slightlyoff I was genuinely confused years ago when it seemed to me that people were using npm for client-side JavaScript. I thought "That can’t be right—I must’ve misunderstood.”
-
@adactio ISTM that the whole community was in a fog of war. I heard from people *who were at NPM* that they were surprised to find the primary use was for frontend development.
And then they did nothing to attenuate the downsides.
-
It's too bad browser vendors are so asleep at the wheel here. Really the last 15 years of frontend has been focused on code reuse. And it's not going back. So why browsers have done very little on this is the root cause of the issues you describe.
-
@matthew As someone who was trying very hard to get things done here, let me just highlight the ways that a major vendor with no competition and a penchant for structurally under-funding engine work can effectively put a damper on all progress:
Safari 16.4 Is An Admission - Infrequently Noted
What's going on with WebKit is not 'normal'. At no time since 2007 has the codebase gotten this much love this quickly; but why? Time for a deep dive.
Infrequently Noted (infrequently.org)