---
title: "Discussion on \"Dynamic Module Pattern for JavaScript\" | Hashnode"
description: "Discussion on \"Dynamic Module Pattern for JavaScript\". Dynamically load JavaScript bundles only when they are needed using HTML and WebPack"
url: "https://hashnode.com/posts/dynamic-module-pattern-for-javascript/61008b90d3dd5634ae9068aa"
---

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

Discussion

# [Dynamic Module Pattern for JavaScript](https://hasnain.dev/dynamic-module-pattern-for-javascript?utm_source=hashnode&utm_medium=feed)

Dynamically load JavaScript bundles only when they are needed using HTML and WebPack

Jul 27, 2021 · 6 min read · hasnain.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#optimization](https://hashnode.com/tag/optimization)
-   [#performance](https://hashnode.com/tag/performance)
-   [#patterns](https://hashnode.com/tag/patterns)
-   [#design-patterns](https://hashnode.com/tag/design-patterns)

## Written by

[Muhammad Hasnain](https://hashnode.com/@hasnaindev)

@hasnaindev · KPK, Pakistan

  
[View profile](https://hashnode.com/@hasnaindev)

I will find you, and I will develop you.

I am a developer from Pakistan. I love to read and write about different topics, from technology to philosophy and psychology. My mission is to uplift people, to give them the confidence to achieve their goals and realize their dreams.

## Responses 1

Markdown supported · ⌘↵ to post

[Mobeen Abdullah](https://hashnode.com/@mobeenabdullah)

[Jul 29, 2021](https://hashnode.com/posts/dynamic-module-pattern-for-javascript/61008b90d3dd5634ae9068aa/comment/6102c062805a765b08874c3d)

Thanks for sharing [Muhammad Hasnain](https://hashnode.com/@hasnaindev).

[Muhammad Hasnain](https://hashnode.com/@hasnaindev)

[Jul 29, 2021](https://hashnode.com/posts/dynamic-module-pattern-for-javascript/61008b90d3dd5634ae9068aa/comment/6102c062805a765b08874c3d#reply-6102f1b59036db5b3513af8b)

Thanks a lot for reading this Mobeen! I'm glad you liked it. :)
