TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Parcel: Fast, zero configuration web application bundler

112 pointsby humilityalmost 7 years ago

20 comments

merricksbalmost 7 years ago
Discussed 7 months ago:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15853149" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15853149</a> (435 points&#x2F;163 comments)
评论 #17551077 未加载
Jasper_almost 7 years ago
I spent the day finally adding a modern build system &#x2F; bundler to my side project, and I chose Parcel. Parcel is really cool! I really wish they&#x27;d stop calling it &quot;zero-configuration&quot;. It has configuration options (--out-dir, --public-url), there&#x27;s just no configuration file for them. I really wish they would make one, since it&#x27;s annoying to have your configuration be hidden in a batch file.
评论 #17548291 未加载
评论 #17548087 未加载
评论 #17548354 未加载
评论 #17548064 未加载
yzmtf2008almost 7 years ago
Congrats to the Parcel team! Really great work. Having used Parcel in personal projects for the past year, it really is a great user experience.<p>Despite what people says in the comments, Parcel has its (great) value. The ability to import a rust file directly and have it compiled to a web assembly module for example, is a great piece of engineering and exceeded my expectations for web build tools. Parcel also hits the sweet spot where it&#x27;s both zero-config, and easy to customize if you find the need.<p>Honestly? Parcel has a better experience than your C++ build tools. Be it CMake, Ninja, or whatever build tools people use in 2018.
评论 #17547802 未加载
评论 #17548067 未加载
spankaleealmost 7 years ago
I love that Parcel is out, even if yes it is another bundle, because it helps highlight the major problem with bundlers right now: they (but especially WebPack) are a meta-platform over the web unto themselves and they encourage use of features that are not supported by the web platform, in a way that&#x27;s not easily transformed into what the web platform does currently, or will realistically, support, creating lock-in.<p>Just as we&#x27;re getting to the point where many of these tools should be optional because we have great modern JS and modules support in browsers, and many projects are already written in supposedly standard modules, many are blocked from actually shipping code that runs un-built on the browser because of bundler features like importing images, CSS, etc.
评论 #17547855 未加载
bradknowlesalmost 7 years ago
IMO, the fact that 1726 modules is a “reasonable” number for a web app is a clear indication that there is something seriously wrong with this process.
评论 #17548139 未加载
评论 #17547707 未加载
评论 #17547719 未加载
mattbreedenalmost 7 years ago
I hate doing javascript. I have no desire to attempt to understand or mess with JS or build systems past the bare minimum I can manage to get a project working so I can move on with my life.<p>So I tried using this. It was nice while what I was doing fit inside of everything that was default settings and&#x2F;or what maintainers used. As soon as I stepped outside of that I ran into things like having to hope someone implemented a Parcel plugin for some random transform (an issue that applies to Webpack, too, but Webpack has so many more users that you&#x27;re guaranteed someone actually did make one that actually works correctly), or: <a href="https:&#x2F;&#x2F;github.com&#x2F;parcel-bundler&#x2F;parcel&#x2F;issues&#x2F;645" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;parcel-bundler&#x2F;parcel&#x2F;issues&#x2F;645</a>. Having an issue on something as popular as Bootstrap 4 be open for 6+ months is pretty frustrating. I spent several hours flailing at this issue to no avail.<p>I switched to Webpack 4 and had all of my existing build system and some additional niceties working in &lt;45 minutes.
评论 #17547783 未加载
评论 #17548294 未加载
jacobsimonalmost 7 years ago
I&#x27;ve used used Parcel for a few projects this year and really enjoyed it for the most part. I&#x27;ve found it&#x27;s basically effortless for building static projects, but its lack of documentation can be frustrating when errors pop up (e.g. I was stuck on an older version for a while due to some issue with a newer release) and I still haven&#x27;t quite figured out the best pattern for extracting the hashed bundle names for use in other places.<p>That being said, Webpack 4 (released months ago) shipped with a similar zero config option, so I&#x27;ll likely go back to it for future projects.
评论 #17547862 未加载
crooked-valmost 7 years ago
The main complication remaining with Parcel, IMO, is one that mostly derives from the syntax being used: there&#x27;s no clear way to separate &quot;I want this file to be added to the bundle, and a string URL for it&quot; and &quot;I want the appropriate representation of this file&#x27;s contents&quot;.<p>My line of thought here is helper methods in an empty package namespace, so that they only exist at build time and are stripped out in the result.
codecurvealmost 7 years ago
I love the idea of Parcel but I&#x27;ve struggled with a number of non-obvious problems when using it on hobby projects.<p>° Sourcemaps not working (wrong files &#x2F; no source translation)<p>° Randomly losing exports (a module with multiple exports where one of them ends up as an empty object - fix by clearing cache and restarting)<p>° Errors like &quot;module 71b not found&quot;<p>° Hot module reload enabled by default, meaning that all top level code runs again when you reload the code (e.g. here&#x27;s an extra canvas in your dom)<p>My preferred zero config setup for hobby projects has become &lt;script type=&quot;module&quot;&gt;[1] and a live reload server[2].<p>If I&#x27;m working on a React project then I will always use Create React App when I can[3].<p>When I take something beyond the hobby stage and into maintaining it as an ongoing project, I use TypeScript Quickstart[4]—to abstract the underlying Webpack config and start writing code immediately.<p>I&#x27;ll only reach for Webpack when I know that I need more flexibility than any of these other tools offer—which isn&#x27;t very often.<p>[1]: <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2017&#x2F;es-modules-in-browsers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2017&#x2F;es-modules-in-browsers&#x2F;</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;tapio&#x2F;live-server" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tapio&#x2F;live-server</a><p>[3]: <a href="https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;create-react-app" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;create-react-app</a><p>[4]: <a href="https:&#x2F;&#x2F;github.com&#x2F;danprince&#x2F;typescript-quickstart" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;danprince&#x2F;typescript-quickstart</a>
jf-almost 7 years ago
I think the ultimate solution to bundling is to go the way of the CLIs, and Angular CLI in particular, where the framework team configures a sensible default bundle config with a few options exposed via the CLI. The user can then build with a single command and everything just works. The user can eject from the CLI and configure manually if needs be, but most of the time that won’t be necessary.<p>Bundlers probably have a certain minimum complexity that can’t be reduced if they want to be universally applicable, but a lot of that can be hidden for most use cases, particularly if using the same framework.
评论 #17548302 未加载
评论 #17548279 未加载
jillesvangurpalmost 7 years ago
Just tried it quickly; didn&#x27;t work. It did something and then I got a blank page. Probably some config missing that it needs but the point is: no zero conf and doesn&#x27;t work as advertised.
评论 #17548418 未加载
评论 #17548201 未加载
gvalkovalmost 7 years ago
For a recent project (with modest needs), I just used a short makefile[1] and plain ES5. I found the experience refreshing as there is definitely peace of mind in depending on one less black box.<p>There is indeed something uncomfortable about a big node_modules directory or a magic build tool. It&#x27;s almost like bathophobia, where instead of depths there is 3rd-party javascript code.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;gvalkov&#x2F;tailon-next&#x2F;blob&#x2F;master&#x2F;frontend&#x2F;Makefile" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gvalkov&#x2F;tailon-next&#x2F;blob&#x2F;master&#x2F;frontend&#x2F;...</a>
synthmeatalmost 7 years ago
Gulp has&#x2F;had the right approach. There&#x27;s only so much flexibility and complexity configuration format can support without becoming strange copy-pasted incantations that can only be reasonably expressed and clearly visualized through code. And they&#x27;ve proven that, eating Grunt&#x27;s lunch, but then they blew it with never-ending alpha and general stewardship fail.<p>And with regards to Parcel vs Webpack, it&#x27;s not (at least not yet) even a competition since webpack 4 is basically zero-configuration and is so much more advanced tool at all levels.
评论 #17548283 未加载
minpur2almost 7 years ago
This looks cool, Quick question if anyone is using Parcel with Angular. How well is this working for you when compared to webpack?
评论 #17547616 未加载
评论 #17547623 未加载
nkkollawalmost 7 years ago
I suspect that most services start very lean, and if they become popular people request more and more stuff and it gets added, making the thing more complicated.<p>Webpack is too complicated though, so if this can stay simple, why not.
deltron3030almost 7 years ago
Seems like a nice alternative to more opinionated language dependent site generators and webapp frameworks built on top of Webpack (ex. Gatsby, Next.js, Nuxt).
ivanfonalmost 7 years ago
Is something really wrong with WebPack? Didn’t we decide that we want more modularity and plugins, instead of “zero configuration” solutions that lock you into a few technologies? What about the next hip new frameworks that release in the future? Will they just be piled into parcel, or will they add a plugin system? This seems like an unsustainable model.
评论 #17547809 未加载
评论 #17547746 未加载
joshwaalmost 7 years ago
Ah, the neverending cycle.<p>1. The existing tool is way too complicated to configure and slow. Let me introduce a new, zero-configuration, blazing fast tool<p>2. OK so because it&#x27;s strongly opinionated there are some things it can&#x27;t do. So we&#x27;ll allow you to extend it via plugins. You&#x27;ll have to configure this.<p>3. Due to the increasing popularity, we are making a meta-version that lets you re-plug any element in the entire system with one of your own choosing. You&#x27;ll have to configure this.<p>4. GOTO 1.
评论 #17547642 未加载
评论 #17547644 未加载
评论 #17547665 未加载
评论 #17547942 未加载
cjhanksalmost 7 years ago
The code looks nice, I hope it has helped you in your life.<p>But frankly, if a JavaScript developer ever really wants to solve the problem... Learn enough C++ to write the equivalent code that compiles 6.5M in 0.1 seconds (assuming a nice HD).
评论 #17547594 未加载
评论 #17547655 未加载
评论 #17547606 未加载
评论 #17547626 未加载
评论 #17547820 未加载
simplecomplexalmost 7 years ago
Please God no. We don’t need another bundler.<p>Also. What’s up with the obsessive use of emojis everywhere? Take a look at this issue for example: <a href="https:&#x2F;&#x2F;github.com&#x2F;parcel-bundler&#x2F;parcel&#x2F;issues&#x2F;144" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;parcel-bundler&#x2F;parcel&#x2F;issues&#x2F;144</a>
评论 #17547610 未加载
评论 #17547604 未加载
评论 #17547615 未加载