---
title: "Discussion on \"What is the size impact of importing one method from date-fns\" | Hashnode"
description: "Discussion on \"What is the size impact of importing one method from date-fns\". In this article, I'll take a quick look at the build size of a simple code that imports a method from date-fns. I check results from both, webpack & esbuild.\nThe code\nThe code I use in this test is as follows:\nimport { sub } from \"date-fns\";\n\nconst t..."
url: "https://hashnode.com/posts/what-is-the-size-impact-of-importing-one-method-from-date-fns/6103a5989036db5b3513bcab"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is the size impact of importing one method from date-fns](https://how-to.dev/what-is-the-size-impact-of-importing-one-method-from-date-fns?utm_source=hashnode&utm_medium=feed)

In this article, I'll take a quick look at the build size of a simple code that imports a method from date-fns. I check results from both, webpack & esbuild. The code The code I use in this test is as follows: import { sub } from "date-fns"; const t...

Jul 30, 2021 · 2 min read · how-to.dev  
Updated Aug 5, 2021  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Marcin Wosinek](https://hashnode.com/@marcin-wosinek)

@marcin-wosinek · Valencia, Spain

  
[View profile](https://hashnode.com/@marcin-wosinek)

JavaScript developer

I'm JS developer with 13 years of professional experience. I'm always happy to teach my craft.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
