# How Baseline Can Help You Reduce JavaScript Bundle Size

Leverage browser-native features to minimize dependencies.

- **Source:** [Articles on Smashing Magazine — For Web Designers And Developers](https://brifing.si/source/e66a90c0-835e-4d99-8b50-d2215183ea28)
- **Published:** 2026-08-07
- **Topic:** [Software & Engineering](https://brifing.si/c/engineering)
- **Original article:** <https://smashingmagazine.com/2026/08/how-baseline-can-help-ship-less-javascript/>
- **On Brifing:** https://brifing.si/s/e58aa400-687c-4186-97ae-f0df454673d8

## The Burden of Unnecessary Dependencies

Modern web applications often suffer from bloated bundle sizes due to unnecessary dependencies. For instance, date and number formatting are now natively supported by browsers. However, many teams continue to use outdated libraries instead of updating their dependencies. This negatively impacts application performance and user experience.

## What is Baseline?

Baseline is a project developed by the WebDX Community Group. Its primary goal is to determine how safely web features can be used across major browsers (Chrome, Edge, Firefox, Safari). Features are classified into three states: 'Limited availability', 'Newly available', and 'Widely available'. This classification helps developers understand which features can be safely used.

## Questions to Ask Before Removing Dependencies

Before removing a library, three critical questions must be answered: 1) Is the native feature safe for your audience? 2) What is the cost of this change? 3) Does the platform feature cover your real use case? These questions are key to safely removing dependencies.

## Gains with Internationalization (Intl)

Browser features under the Intl namespace render many small libraries obsolete. For example, timeago.js provides date formatting functions, but Intl.RelativeTimeFormat offers this natively. Similarly, libraries like numeral and pluralize can be replaced with Intl.NumberFormat and Intl.PluralRules.

## Time Formatting with RelativeTimeFormat

Intl.RelativeTimeFormat converts timestamps into phrases like '3 hours ago'. This feature is classified as 'Widely available' by Baseline. For instance, the 'numeric: auto' option produces more natural phrases like 'yesterday' instead of '1 day ago'. This significantly enhances user experience.

## Number Formatting with NumberFormat

Intl.NumberFormat formats numbers according to local conventions. This feature eliminates the need for libraries like numeral. For example, currencies or percentages can be easily formatted. This reduces bundle size while improving application performance.

## Plural Formatting with PluralRules

Intl.PluralRules handles plural formatting functions. This feature reduces the need for libraries like pluralize. For instance, phrases like '1 book' and '2 books' can be easily generated. This is particularly advantageous for international applications.

## List Joining with ListFormat

Intl.ListFormat handles list joining functions. This feature eliminates the need for libraries like list-joining helpers. For example, phrases like 'apple, pear, and banana' can be easily generated. This provides more natural text in user interfaces.

## Time Operations with Temporal

Temporal is a new API for date and time operations. This API reduces the need for libraries like moment.js. However, Temporal is not yet supported by all browsers. Therefore, using this feature may require adding a polyfill, which could increase bundle size.

## HTTP Requests with Fetch

The Fetch API provides a native solution for HTTP requests. This feature reduces the need for libraries like axios. However, features like interceptors and request cancellation offered by axios must be reimplemented with fetch. This can create additional work for developers.

## Modals and Tooltips

Browsers offer native features for modals and tooltips. These features reduce the need for libraries like react-modal. However, these features are not yet fully supported by all browsers. Therefore, caution is required when using them.

## Conclusion and Repeatable Process

Using Baseline, it is possible to significantly reduce JavaScript bundle size. This process requires regularly auditing dependencies and actively leveraging browser-native features. This approach improves both performance and user experience.

## Sources covering this story

- https://smashingmagazine.com/2026/08/how-baseline-can-help-ship-less-javascript/ — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
