---
title: "Discussion on \"How to set up ES module library for the frontend JavaScript\" | Hashnode"
description: "Discussion on \"How to set up ES module library for the frontend JavaScript\". This article will show how to set up an npm library package as an ES module that can be easily used in other packages, with a minimum size impact. \nLibrary code\nI generated the package.json with npm run -y. The only difference was adding \"type\": \"mod..."
url: "https://hashnode.com/posts/how-to-set-up-es-module-library-for-the-frontend-javascript/612bb52afd0bf8636d76df65"
---

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

Discussion

# [How to set up ES module library for the frontend JavaScript](https://how-to.dev/how-to-set-up-es-module-library-for-the-frontend-javascript?utm_source=hashnode&utm_medium=feed)

This article will show how to set up an npm library package as an ES module that can be easily used in other packages, with a minimum size impact. Library code I generated the package.json with npm run -y. The only difference was adding "type": "mod...

Aug 29, 2021 · 2 min read · how-to.dev  
Updated Feb 6, 2022  
Read the article

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

## 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.
