News for hackers. Stuff that matters.
Re:I loved jQuery, and still do (2019) by bluedevil2k on Tuesday June 29, 2021 @12:03PM (#27677840)
> If you like quick and dirty, just make sure you have a working Node.js environment and generate a simple project that supports Webpack or Parcel

There’s nothing quick or easy about these steps. Linking to a jQuery CDN and getting working code immediately is easy.

Re:I loved jQuery, and still do (2019) by bstar77 on Tuesday June 29, 2021 @12:14PM (#27677989)
I respectfully disagree. If you take 15 min to understand the basics it becomes trivially easy and the productivity you gain going forward is massive.
Re:I loved jQuery, and still do (2019) by mickaelkerjean on Tuesday June 29, 2021 @12:40PM (#27678348)
I respectfully disagree if you have some other things to do in your free time than maintaining dependencies, trying to figure out why your project won't compile at all in 6 months of time while reporting 100 security issues, what will be the next change in webpack to will require to update both your config and some plugins, why does npm now cry for you to use a "--legacy-peer-deps" flags to nicely handle dependencies you didn't know you had while being happy you can't compile your frontend project on a small raspberry pi. It's not because you can use all those tools than you should
Re:I loved jQuery, and still do (2019) by bstar77 on Tuesday June 29, 2021 @12:50PM (#27678494)
You are literally criticising Webpack for its best features. Identifying outdated libraries and potentially dangerous vulnerabilities is a huge plus for Webpack. Do you think just because you include a CDN lib in the global space vulnerabilities just magically go away?

You also don't need to include packages that are poorly engineered and maintained. For what you do decide to use, you are getting visibility into the warts that you may have blissfully ignored in the past.

The issues you are describing are not really problems anymore unless you let your app get woefully out of date. The web and browsers are a moving target, so it's critical that you minimize running legacy code wherever possible. Npm/Yarn and Webpack is a huge step in making that manageable. jQuery has been on autopilot for years because it has limited usefulness. We've collectively moved on except for a few holdouts.

Re:I loved jQuery, and still do (2019) by gunapologist99 on Tuesday June 29, 2021 @01:11PM (#27678776)
You are literally criticizing jQuery for its best features. Not having outdated libraries and potentially dangerous vulnerabilities is a huge plus for jQuery. Do you think just because you use a build tool for modules from all over the npm-verse that vulnerabilities just magically go away?
Re:I loved jQuery, and still do (2019) by bstar77 on Tuesday June 29, 2021 @01:30PM (#27679072)
jQuery has had its share of dangerous vulnerabilities. https://snyk.io/vuln/npm:jquery
Re:I loved jQuery, and still do (2019) by gunapologist99 on Tuesday June 29, 2021 @03:55PM (#27680929)
agreed, but it's only one library, and might be the only one you need; really, it has an excellent track record considering that it's been around longer than npm itself.
Re:I loved jQuery, and still do (2019) by kayodelycaon on Tuesday June 29, 2021 @12:37PM (#27678311)
I've been dealing with Webpacker for almost a year and it's been a nightmare every time I've tried to use it. And yes, I did sit down and try to figure out what the hell was going on.
Re:I loved jQuery, and still do (2019) by bstar77 on Tuesday June 29, 2021 @12:45PM (#27678409)
Parcel is literally zero configuration, maybe that would have been a better solution for your usecase. You need to understand some Webpack basics for it to be functionally useful, but all the criticisms of Webpack could easily be levied against jQuery and some.
Re:I loved jQuery, and still do (2019) by brainbag on Thursday July 01, 2021 @11:37PM (#27707601)
Vite is the way to go now, IMO. It just works and is extremely fast.
Re:I loved jQuery, and still do (2019) by sc68cal on Tuesday June 29, 2021 @12:32PM (#27678232)
It's not going to take 15 minutes to understand WebPack and Parcel. Let's be a little more realistic. Sometimes you don't have the luxury of time and tools that you already know are going to get used, instead of new tools you don't.
Re:I loved jQuery, and still do (2019) by bstar77 on Tuesday June 29, 2021 @12:55PM (#27678551)
https://parceljs.org/getting_started.html

If you have a use case as simple as the author is advocating, this only take about 15 minutes to grok. If it takes longer then you probably don't have enough front-end experience to productively contribute to this conversation. That is a little harsh, but the FUD in the JS world is incredible, mainly by people that have very little experience and understanding.