DAILY NEWS

Stay Ahead, Stay Informed – Every Day

Advertisement
Vendor Chunking: The React Optimization I Wish I’d Known Earlier



I ignored my bundle size for months. By the time I checked, my production build was several megabytes of JavaScript in a single file — and every deploy forced my users to download all of it again. Vendor chunking is what I wish I’d known earlier.

Let’s say you are building a project using React, and for that project you need some component library, a library to handle date-related things, or a library to handle your state. So you reach for the usual suspects — Material UI, dayjs, TanStack Query, Redux and so on.

Initially, everything will work smoothly for you as well as for your end users. But as you keep shipping new features and adding dependencies, the bundle quietly grows. Locally, you don’t notice. But in production, it’s the end users who end up paying the price. What happens behind the scenes is that, when dependencies are included in the initial bundle, they can significantly increase the JavaScript downloaded by the browser. As a result, you end up with a poor Lighthouse score, slow initial load times, and a large JavaScript bundle — all of which hurt the user experience.

Your production build looks like this:

dist/assets/index-xxxx.js → 1.2 MB

Enter fullscreen mode

Exit fullscreen mode

This is exactly the kind of problem vendor chunking is designed to solve.

What is Vendor Chunking?

Vendor chunking is a technique where you can separate the third-party dependencies from your main bundle chunk. So you will have a main chunk which will contain your main application code and a vendor chunk which will contain the third-party dependency code.

How does Vendor Chunking help with large bundle size?

When you implement vendor chunking, your application is typically split into at least two separate bundles:

Main Chunk: Contains your application code
Vendor Chunk: Contains third-party dependencies and libraries

When a user visits your website for the first time, the browser downloads both chunks and stores them in the cache. This is where caching becomes very useful.

It’s worth noting that vendor chunking doesn’t come into play on the user’s first visit, because the browser still has to fetch both the chunks. The real performance gains show up when a user revisits the website and the cached vendor chunk can be reused.

Since third-party dependencies do not change frequently, the vendor chunk usually remains the same across deployments. On the other hand, whenever you ship new features, bug fixes, or other updates, your application code changes — which results in a new main chunk being generated.

When you generate a new production build, the bundler will again create:

A new main chunk containing the updated application code
The same vendor chunk, because the dependency code has not changed

Now consider this scenario where a user’s browser has already cached both the chunks because the user has already visited your website, and you deploy a new feature to the production. As a result, the user’s browser only needs to download the new main chunk, while the cached vendor chunk can be reused. This is how vendor chunks help in improving user experience.

Vendor Chunking in Action

Now let’s understand this whole thing using the code. I have a React project where I have installed multiple dependencies such as MUI, Chart.js, Lodash, dayjs and React Router.

Before Vendor Chunking, the build will look something like this:

Note: I’ve disabled tree-shaking for this demo to keep the bundle size large and make the impact of vendor chunking more visible.

The build will contain only one JS file and the browser has to download this large ~4.6 MB file.

Now I will implement vendor chunking by adding this code block in my vite.config.ts file:

Note: I’m using Vite v8, which uses Rolldown as the bundler. If you’re on an older Vite version with Rollup, the config syntax will be different

So after this, the build will look something like this:

As you can see, now we have two JS files:

Now the browser has to download both of these files so that our application loads correctly. Here comes the crazy part. Let’s update the code and try to generate the new production build. Here’s what it will generate:

If you compare the files with the previous build, you will find that only index-xx.js changed, while vendor-xx.js stays the same, because we didn’t upgrade any package versions; we only updated the application code.Now when a user revisits our website, the browser will only fetch the new index-xx.js from the server, vendor-xx.js will be served from cache.

This is how vendor chunking helps in performance improvement for web applications.

Splitting Vendors Further

So far we have bundled all the dependencies into a single chunk. This works well for small to medium applications, but as the dependency list grows, a single vendor chunk has a drawback. If you update the version of any library, a new vendor chunk will be generated and users have to re-download the whole thing – even if 95% of the code is same.

To tackle this issue, we can split vendors into multiple chunks. For example, you can keep your UI library in one chunk, your utility libraries in another, and your charting library in a third:

The final node_modules group is a catch-all so dependencies like React land in a vendor chunk too, rather than your main bundle.

After this config, your build output will look something like this:

Note: Just don’t go overboard with splitting — too many small chunks can hurt performance due to HTTP overhead and less effective compression

Wrapping Up

Vendor chunking is one of those optimizations that costs you a few lines of config and pays you back on every deploy. The core idea is simple: your application code changes often, third-party code doesn’t — so why force your users to re-download libraries they already have?

If you haven’t audited your production bundle in a while, run a build and take a look. You might be surprised how much of it is third-party code waiting to be cached properly.



Source link

Nvidia Set to Reveal First Consumer CPU in Over a Decade at Computex 2026



Nvidia, Microsoft, and Arm have released teasers that appear coordinated, hinting at a joint announcement at Computex 2026. This event is expected to showcase Nvidia’s first consumer CPU in more than ten years.All three companies used the phrase “A new era of PC” in their posts, which also included coordinates pointing to the Computex 2026 venue in Taipei. The announcement could come as soon as Monday, June 1.The teaser is interpreted as an early sign that Nvidia is preparing to support Windows on Arm with its own consumer processor, possibly the N1 series.What Nvidia’s N1 Series Is and Its Leaked SpecsThe N1, also known as N1X, is expected to be a consumer-focused, Arm-based system-on-chip. It is positioned as a consumer version of Project Digits, the high-end workstation mini PC that Nvidia revealed at CES 2025.Leaked specifications suggest the N1X will feature20 CPU cores divided into two clusters of 10 cores each. It is reported to include a Blackwell-based integrated GPU with 6,144 CUDA cores, which is comparable to the RTX 5070 in terms of core count but operates at lower clock speeds and power levels.Additionally, support for 128GB of RAM at 8,533 MT/s is indicated, based on a leaked notebook motherboard. The motherboard is also said to have an 8+6+2-phase VRM configuration.Benchmark leaks imply that this chip could perform similarly to recent mobile processors from Qualcomm, Apple, Intel, and AMD.Why Nvidia’s Return to Consumer CPUs Matters for Windows on ArmThe N1 would be Nvidia’s first consumer CPU since the Tegra X1, which powered the Nvidia Shield TV more than a decade ago. While Nvidia currently dominates the dedicated GPU and AI data center markets, it has not competed in the consumer processor space for years.This move aligns with Microsoft’s Windows on Arm strategy. Qualcomm’s Snapdragon X chips led Microsoft’s effort to match the power efficiency improvements Apple achieved with its M-series chips.Arm has stated that other chipmakers are expected to follow Qualcomm, and Nvidia entering the market would introduce significant competition to mobile processors and bolster the viability of Windows on Arm.Development Delays and When Nvidia Could Launch N1 DevicesReports suggest that Nvidia and its hardware partners initially planned to launch N1-based devices last year. However, significant hardware issues reportedly caused an internal delay to the first quarter of 2026, a timeline that has now passed.The upcoming Computex reveal is expected to be the first official appearance of the chip following these delays. The first products are likely to be laptops, possibly including 2-in-1 notebooks.The Computex 2026 event is scheduled from June 2 to 5. Nvidia CEO Jensen Huang’s keynote will take place on Monday, June 1 at 11 AM Taipei time at the Taipei Music Center. This is likely where Nvidia will announce the N1 and reveal other PC-related products.Additional variants of the N1 may be released later in 2026, with the N2 series expected in 2027. Nvidia has not officially confirmed product names, specifications, pricing, or release dates ahead of the keynote.



Source link

Experimental pill promises new hope for deadly pancreatic cancer : NPR


This undated microscope image from USC via the NIH shows pancreatic cancer cells, nuclei in blue, growing as a sphere encased in membranes, red.

Min Yu/AP/USC via NIH

hide caption

toggle caption

Min Yu/AP/USC via NIH

WASHINGTON — A novel pill helped people with advanced pancreatic cancer live longer, researchers reported Sunday, raising hopes of long-needed better treatments for one of the deadliest types of cancer. “While not curing the cancer, it is a very large step forward,” said Dr. Zev Wainberg, of the University of California, Los Angeles, who helped lead the study. The drug is called daraxonrasib and it blocks a mutated protein that fuels tumor growth in more than 90% of pancreatic cancer cases — a target that had eluded treatment for decades. The daily pills nearly doubled survival time, with fewer severe side effects, in a study that randomly assigned the experimental drug or more chemotherapy to 500 patients whose metastatic, or spreading, cancer had quit responding to prior treatment. The findings were published in the New England Journal of Medicine and presented Sunday at the American Society for Clinical Oncology meeting in Chicago.

Those taking daraxonrasib lived for a median of 13.2 months compared with 6.7 months for chemotherapy recipients. While that may seem like a small improvement, Wainberg said it marked the first drug to show a substantial advantage over chemotherapy. “Having treated pancreatic cancer for 16 years, I actually started crying” when first seeing the study results, Dr. Rachna Shroff of the University of Arizona Cancer Center, who wasn’t involved with the research, said from the ASCO meeting. She was struck by how “patients stayed on this treatment because it was providing durable and meaningful benefit to them.” The pills’ effects eventually wane but recipients used them for significantly longer than the comparison group stayed on chemotherapy, reporting less pain and a better quality of life as their tumors shrank. Many still were using the drug after the data was analyzed, which Wainberg said means the survival gap may widen as researchers continue tracking them. Dr. Brian Wolpin, of the Dana-Farber Cancer Institute, presented the findings Sunday. He said the drug should become “a new standard of care” for previously treated metastatic pancreatic cancer, adding that researchers also will explore its use earlier in the disease, including to see if tumor shrinkage might let more patients qualify for surgery.

Side effects most likely to affect pill usage were a rash that can be severe and mouth sores, he said. Maker Revolution Medicines funded the study and the Food and Drug Administration plans to expedite review of the drug. Meanwhile, the agency is allowing what’s called “expanded access” to the experimental drug for patients who meet certain criteria. The drug garnered public attention when former U.S. Sen. Ben Sasse described on “60 Minutes” how he’s had less pain while taking it. Oncologists are being flooded with requests as the special access program gets started. Pancreatic cancer is among the most deadly forms in large part because it’s hard to detect before it starts spreading to other organs. The American Cancer Society estimates about 67,000 new cases will be diagnosed in the U.S. this year and more than 52,000 people will die from the disease. The five-year overall survival rate is 13%. Unlike with other cancers that have benefitted from a variety of chemotherapy alternatives, pancreatic cancer has been harder to tackle. Cancer specialists not involved in the new research expressed optimism that this may be a turning point in the quest for new options, with dozens of experimental drugs in development. The new drug targets mutations in the RAS gene family that normally regulates cell growth. So-called KRAS mutations are especially critical in fueling pancreatic cancer. But a structure that made it hard for drugs to stick to the mutated proteins meant this cancer driver was long considered “undruggable.” Revolution Medicines’ drug uses what’s essentially a molecular glue to bind with multiple KRAS subtypes. Wainberg said researchers next will probe whether the drug worked better in certain of those subtypes. The drug will change pancreatic cancer treatment, said Dr. Andrew Coveler of the Fred Hutchinson Cancer Center, who wasn’t involved in the research.

“This thing works drastically differently,” he said. Wainberg said other drugs in development target specific KRAS subtypes. Other approaches in earlier stages of testing include vaccines designed to prevent recurrence after pancreatic cancer surgery by teaching the immune system to recognize the mutated protein.



Source link