Live data from Hacker News

Parcel CSS: A new CSS parser, compiler, and minifier

parceljs.org

111–120 of 129 posts

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#111
post #50

Earlier quoted context omitted.

I have been using esbuild for a while, and I can say that it's looking like a huge improvement over webpack, snowpack, vite, etc. I made a web app starter that uses esbuild to bundle a react-redux app [0] and my experience was very positive of the bundler. [0] https://github.com/samhuk/tree-starter

Vite and snowpack are built on top of esbuild, so I’m not sure your comment makes sense.

The point being that, IMHO, extensions over ESBuild tend to not improve the developer experience because they have a tendency to bloat and steer towards being "webpack but esbuild", which defeats the point of esbuild, being the "anti-webpack".

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#112
post #46

Earlier quoted context omitted.

Which is the cherry on top for those types of self-chastisement fetishists who willingly put themselves at the mercy of CRA ;-)

Check out the CRACO project. Allows config of CRA w o ejecting.

Vite is so much better, IMO. Quicker too, since it uses esbuild in dev mode.

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#113
post #111

Earlier quoted context omitted.

Vite and snowpack are built on top of esbuild, so I’m not sure your comment makes sense.

The point being that, IMHO, extensions over ESBuild tend to not improve the developer experience because they have a tendency to bloat and steer towards being "webpack but esbuild", which defeats the point of esbuild, being the "anti-webpack".

Tools such as Vite, aren’t designed to improve the developer experience of ESBuild. They exist separately and leverage ESBuild’s strong qualities – JS, TS and CSS bundling and minification.

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#114
post #39

Earlier quoted context omitted.

Webpack is under active development though, nothing legacy about it as far as I'm aware. Are you referring to abandoned third-party plugins maybe? Vite and all the other bundlers are really awesome, but Webpack's strenght - and I think this may also be the root of the issues you seem to be having with the tool - is that there's almost no magic and barely any handholding. Freedom and reliability at the cost of having…

> there's almost no magic That depends entirely on your definition of “magic”. Needing a specific incantation of seven different plugins and rules, that are often conflicting and incomprehensible, to get a basic project to build, is the same as magic to me. I assume you mean magic == conventions or implicit behavior. I’ll take that over the Webpack mess any day.

Magic as in runtime hacks and precompiled semi-proprietary rust binaries.

Neither of which are necessarily negatives of course!

Only thing is that for every minute gained from those speedy rust builds, I lost five more on debugging stuff that used to work fine with Babel + having to learn this new language to write replacements for now unsupported plugins :)

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#115

Earlier quoted context omitted.

Parcel is becoming my go-to choice most of the time now. I’ve migrated some apps out of CRA, pure Webpack and Snowpack to it and I need to say it was incredible. Some minor issues with HMR on one of those projects I still can’t figure out. Anyway having something that works, with JSX, with TS, really fast, in just 2/3 really simple steps is amazing! You don’t even need to turn your brain on. My two cents.

Just a stab in the dark, but I was having HMR issues as well and it turned out to be an obscure transitive dependency conflict - details and solutions here on the outside chance it's the same thing affecting your project https://github.com/parcel-bundler/parcel/issues/6685

I'm also on that issue with you :)

Sadly in my use case it is not a dependency conflict, but I'm failing to replicate it (and actually not even trying very hard). I guess it will automagically fix itself on some minor update.

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#116

I feel stupid asking this question, but isn't the browser that parses css? i understand minifying css, but what does parcel's css parsing refer to?

For packages that have images and css, it reads css and extracts image files to be bundled.

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#117
Is it just me or parcel is starting to lose focus and performance?

Back in the v1 days, things just worked without config and with v2, I need some config and even basic glob pattern to include all files in a directory is now a plugin and for some reason a parcel process takes 3GB of memory to compile a smallish project and I don't know how to fix it or pinpoint what the cause is.

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#118

Earlier quoted context omitted.

Hi, author of Parcel CSS here. I have been thinking about implementing the CSS OM spec as the JS API. This is the same API that browsers expose for manipulating stylesheets. The advantage of this is that we don't need to invent something custom. Still thinking through options. https://github.com/parcel-bundler/parcel-css/issues/5 That said, I think I'd want to keep the use cases for JS plugins limited, because it wil…

Separate question, that may be seemingly unrelated however I'm curious. How did you kinda "learn" how to read these specs effectively? I can read them, and I think I can reasonably understand them, however I feel like I have little confidence in saying yes I get this . Is there anything you point to that helps? Tips or recommendations? I'm trying to learn how to parse these standards docs better myself.

In addition to dfabulich's excellent comment, I'd also suggest: read specs of tech you're most familiar with first, rather than specs of new cutting edge stuff you're curious about. Doing that will give you huge amounts of extra context because you're just reading something you already know expressed in a different format.

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#119

Earlier quoted context omitted.

> literally zero reasons What about module federation? Has any other bundler implemented that?

Do you know any success stories with that?

I haven't heard any, but I haven't gone looking either. I'm just saying there's at least literally one reason to use webpack for new code.

Re: Parcel CSS: A new CSS parser, compiler, and minifier

#120

When a site's CSS is well written, with a capable web developer knowing, what they are doing, such a tool would not be necessary. People pump out megabytes of JavaScript, but then they worry about a few kilobytes of CSS being saved by compressing it, at the same time making it less readable by minifying it. (We are not yet shipping hundreds of kilobytes of CSS, are we?!) When there is a need for a tool that minifies…

What a load of crock. You should always use a css minifier to - at minimum - remove white space and trailing semicolons.
Post reply on HN