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.

Snowpack 2.0

322 pointsby pspeter3almost 5 years ago

31 comments

orfalmost 5 years ago
Some of this wording confuses me and should probably be reworked:<p>&gt; Snowpack is a O(1) build system… Every file goes through a linear input -&gt; build -&gt; output build pipeline<p>Seems like O(n) to me?<p>&gt; Snowpack starts up in less than 50ms. That’s no typo: 50 milliseconds or less. On your very first page load, Snowpack builds your first requested files and then caches them for future use<p>So you can open a socket in 50ms? Seems disingenuous to imply anything takes 50ms when really you’re just waiting until the first request to do anything.<p>Looks like an interesting project though.
评论 #23331768 未加载
评论 #23331575 未加载
评论 #23336820 未加载
评论 #23331541 未加载
评论 #23335009 未加载
评论 #23334574 未加载
评论 #23331500 未加载
评论 #23331590 未加载
评论 #23331602 未加载
评论 #23331484 未加载
评论 #23332893 未加载
评论 #23331488 未加载
elpool2almost 5 years ago
I started using Snowpack just last week, but I&#x27;m not even using the dev server or the bundler part. All I really needed was its ability to convert npm packages into single-file ES modules. Once everything is an ES module you can just let the browser load them all, no bundler or dev server needed at all in your dev cycle. The only dev-time conversion needed is the compilation from typescript to JS, which my IDE already does instantly whenever I save. Previously this worked fine for all our own code but not for dependencies, so I&#x27;m pretty happy Snowpack was able to solve that problem.
评论 #23331550 未加载
评论 #23331596 未加载
renewiltordalmost 5 years ago
Okay, this is really cool but I don&#x27;t want to &quot;create a snowpack app&quot;. I just want a &quot;If you&#x27;re using webpack + babel and want more speed, do this&quot; thing. With the webpack dev server builds aren&#x27;t <i>too</i> bad for the size of thing I&#x27;m working on.
评论 #23337249 未加载
k__almost 5 years ago
For everyone who was as confused as me:<p>It&#x27;s basically a tool that allows you to develop without bundling, but it still bundles for production via Parcel.<p>So it&#x27;s not a Webpack&#x2F;Parcel&#x2F;Rollup killer.
评论 #23337414 未加载
评论 #23332533 未加载
flanbiscuitalmost 5 years ago
I really don&#x27;t get a sense of what snowpack exactly does from their website but I found this blog post useful: <a href="https:&#x2F;&#x2F;blog.logrocket.com&#x2F;snowpack-vs-webpack&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.logrocket.com&#x2F;snowpack-vs-webpack&#x2F;</a>
评论 #23331598 未加载
评论 #23331583 未加载
0azalmost 5 years ago
How does Snowpack compare to Rollup? I use Rollup because it&#x27;s light-weight and dependency-free.
评论 #23331861 未加载
评论 #23334760 未加载
orraalmost 5 years ago
I find this interesting. As a mainly desktop developer now doing web frontend work, the JS ecosystem has been so frustrating.<p>Bundlers struck me as unnecessary given JS now has native module support, and that is the premise of this project.<p>Some out of memory issues when bundling certain dependencies, and slow &quot;npm start&quot; times with React, has only strengthened my initial impressions. So again, this could be a welcome impovement.
评论 #23336940 未加载
mavsmanalmost 5 years ago
Shameless plug for those of you who prefer video tutorials to written <a href="https:&#x2F;&#x2F;youtu.be&#x2F;nbwt3A9RzNw" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;nbwt3A9RzNw</a> It&#x27;s an intro to Snowpack v1 but it&#x27;ll still give you a good idea of what Snowpack does and how it differs from Webpack. I would agree that Snowpack isn&#x27;t quite there for production projects, mostly due to the fact that many projects still don&#x27;t ship their modiels as ES modules.
stefan_almost 5 years ago
I don&#x27;t think they understand what O(1) even means.
评论 #23331520 未加载
评论 #23332727 未加载
评论 #23333246 未加载
juliusalmost 5 years ago
From other comments I understand Snowpack as:<p>Development: Creates many ESM-Files. Firefox&#x2F;Chrome can load them.<p>Production: Bundles&amp;Minimizes these ESM-Files.<p>One Question: There is a JS-Error, only occuring in IE11. &quot;t._x is undefined&quot;. How do I debug that?
评论 #23334212 未加载
XCSmealmost 5 years ago
Sounds interesting. It&#x27;s a bit unclear for me what the &quot;runs in 15ms&quot; means. I think in my projects, the TypeScript compilation is what takes the longest, so although I use parcel and it&#x27;s pretty fast, I still have to wait 1-2 seconds for TypeScript to compile changes. If it does not bundle, and still uses all the external transformers (TypeScript, Babel, etc.), what exactly does it do? Does it somehow optimize the execution of those transformers&#x2F;transpilers?
评论 #23331616 未加载
nojvekalmost 5 years ago
Having the browser make one request per npm bundle sounds awful. It’s great if client has fast internet and server is close by, or mostly localhost, but latency will play a far bigger role than the 50ms startup time. That’s not a good metric to look at.<p>The metric that corresponds to user experience is cold compile + page reload time, incremental compile + page reload time i.e. How long before I press enter on a command and I see something usable in a browser to devloop on.<p>If you let the browser load the first file, parse and figure out the next file to load, a large project could have 100s of roundtrips. That’s why JS bundlers were created in first place. To avoid the cost of a long critical chain.<p>Using a device from Africa (Uganda) to connect to US servers, one feels how bad an experience latency can make. More and more development is done on cloud machines or remote host, so this isn’t a rare usecase.<p>What I do hope for is if there is a new bundler, it can use the webpack plugin ecosystem. It’s massive and anything new has to foster a similar ecosystem of tooling.<p>Or please just make webpack fast with incremental disk compiles. I would pay money for that.
评论 #23342125 未加载
matthewhartmansalmost 5 years ago
Congrats on V2 and everyone involved!
mgoetzkealmost 5 years ago
I just tried it in a @microsoft&#x2F;rush project of mine.<p>Added a new project with 1 dependency (which contains a single one-liner function to return a test string). No other dependencies.<p>Takes about 30s to start. Not sure whether the fact that my dependency is a link with many siblings due to rush and pnpm is an issue, but it is a far cry from 50ms.<p>Also I did not get it to reliably pick up when the dependency has changed (cache invalidation most likely has an incompatible strategy with `npm link`&#x2F;`pnpm`.<p>Snowpack in principle looks nice, but I think I need something else
dangalmost 5 years ago
Related from 4 months ago: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21989967" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21989967</a>
MatekCopatekalmost 5 years ago
Is anyone using this in combination with a plain ole&#x27; server rendered app? All the examples seem to build on a SPA example where you have a single index.js entrypoint for your entire app. What about a Rails&#x2F;Django project where each page loads a few scripts it needs?<p>That usecase has been stuck with the &quot;global jQuery plugins&quot; approach for ages and it feels like &lt;script type=&quot;module&quot;&gt; + something like Snowpack would really improve it.
评论 #23334954 未加载
ecmascriptalmost 5 years ago
Is it just me, or is the build time pretty much never an issue? Usually when I develop stuff builds&#x2F;recompiles faster than I can switch to my browser to try it out.<p>How is this such a big problem for people that people need to write yet another build tool, instead of improving the one everyone already use?
评论 #23337301 未加载
dreenalmost 5 years ago
I guess Im different to most JS developers, because I prefer to work with HMR off about 95% of the time. Its good for UI prototyping (which I dont do much tbf), but it tends to get in my way when doing anything else. Maybe in total it makes me loose a minute or two but thats not an issue.
评论 #23335960 未加载
koolbaalmost 5 years ago
In my experience using webpack, once you’ve configured incremental builds, the only slow part is TypeScript type checking. That’s solved by doing it async and having the dev build be compile only. Even a huge project builds after a single file change faster than you can notice.
评论 #23332008 未加载
评论 #23332932 未加载
italmost 5 years ago
I had been avoiding bundling due to its effect on development, but this looks well worth a shot.<p>I do wonder though if it would be enough to turn on CloudFlare&#x27;s minification for prod.
pvgalmost 5 years ago
Recently: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21989967" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21989967</a>
iddanalmost 5 years ago
Once create React app will use it by default it will be fun
taneqalmost 5 years ago
Thankyou for putting, nice and prominently at the top, what Snowpack actually is! (“Snowpack 2.0: A build system for the modern web.“)
KaoruAoiShihoalmost 5 years ago
Is Svelte really now a tier 1 library compelling enough to put in advertisements like this?
评论 #23331653 未加载
simonebrunozzialmost 5 years ago
Tell me what it is exactly, before starting with a list of features, 50ms start, etc.
sktrdiealmost 5 years ago
If you&#x27;re bit confused by what this is (as I was) here&#x27;s a simple TLDR conversation I had with them on Twitter [1]:<p>&gt; Me: Would you say Snowpack is mainly about generating ESM files (and their common code) for each import statement? Curious how that is different from webpack&#x27;s code splitting strategy perhaps together with an ESM plugin<p>&gt; Snowpack: Snowpack&#x27;s dependency installation is a form of bundling + code-spliting: your entire dependency tree is bundled together and then split into one-file-per top-level package.<p>In other words: they&#x27;re a code-splitting strategy where they &quot;don&#x27;t touch your code&quot;, they only look at it to find the dependencies and then they generate files (ESM modules) from the dependencies information. Then they serve that and let the (modern) browser do the rest.<p>Really simply idea but effective.<p>1. <a href="https:&#x2F;&#x2F;twitter.com&#x2F;lmatteis&#x2F;status&#x2F;1262126825427415044" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;lmatteis&#x2F;status&#x2F;1262126825427415044</a>
m00dyalmost 5 years ago
What if a file depends on another file. So, I think it is O(n)
评论 #23332190 未加载
PunksATawnyFillalmost 5 years ago
Which is... ?
yesionalmost 5 years ago
So Vite is already dead? Geez!
评论 #23331721 未加载
评论 #23331521 未加载
CyberDildonicsalmost 5 years ago
Would it have killed them to actually say what it is in the title of their self promotion?
malandrewalmost 5 years ago
I came here hoping this was related to figuring our avalanche conditions when backcountry skiing.
评论 #23334871 未加载