# Javascript ES6 Modules

**URL:** https://forum.pinegrow.com/t/javascript-es6-modules/7229
**Category:** Javascript
**Created:** [November 18, 2022, 8:07pm UTC](https://forum.pinegrow.com/t/javascript-es6-modules/7229 "2022-11-18T20:07:17Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![TechAkayy](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@TechAkayy](https://forum.pinegrow.com/u/TechAkayy)
#### Post date: [November 20, 2022, 9:32pm UTC](https://forum.pinegrow.com/t/javascript-es6-modules/7229/2 "2022-11-20T21:32:32Z")

</div>

I have used webpack for a long time to bundle my es6 modules. It works great, uses babel plugin.

You can use Vite as well. It has a [lib](https://vitejs.dev/guide/build.html#library-mode) mode.

The challenge I have faced with Vite is the inability to use commonjs npm modules, but if you are not having such dependencies and using primarily to bundle just your code, it should work great.

Again, you need Vite only if want a dev-server with hmr. Vite uses esbuild underneath, so if you want to just run in watch mode and continuously bundle into a disk location, you could directly use esbuild itself.

Btw, I don’t know about how you integrate with wordpress. Share your experience 😃

---

_[View the full topic](https://forum.pinegrow.com/t/javascript-es6-modules/7229)._
