# Suggestion on choosing build system

**URL:** <https://discourse.aurelia.io/t/suggestion-on-choosing-build-system/2916>\
**Category:** Best Practices\
**Created:** [September 9, 2019, 9:47am UTC](https://discourse.aurelia.io/t/suggestion-on-choosing-build-system/2916 "2019-09-09T09:47:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PraveenGandhi](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/praveengandhi/32/1611_2.png) [@PraveenGandhi](https://discourse.aurelia.io/u/PraveenGandhi)\
**Post date:** [September 9, 2019, 9:47am UTC](https://discourse.aurelia.io/t/suggestion-on-choosing-build-system/2916/1 "2019-09-09T09:47:26Z")

</div>

Hi All,

As Aurelia supports buch of build systems (loader and bundler), is there a significant difference when using one instead of the other.

Actually, when I started working with SPA, I used Aurelia with skeleton-navigation. Later I used dotnet-core with webpack like below

```
UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions
                    {
                        HotModuleReplacement = true
                    });

```

Because it seems like easy to understand, nowadays I use [Fusebox loader](https://github.com/fuse-box/fuse-box-aurelia-loader#note) mostly.

Requesting your suggestions on the bundler-loader choice significance in terms of development benefits and production benefits.

Thanks,  
Praveen Gandhi P.

---

<div class="post-metadata">

**Author:** ![khuongduybui](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/khuongduybui/32/44_2.png) [@khuongduybui](https://discourse.aurelia.io/u/khuongduybui)\
**Post date:** [September 9, 2019, 11:58am UTC](https://discourse.aurelia.io/t/suggestion-on-choosing-build-system/2916/2 "2019-09-09T11:58:04Z")

</div>

1. I tend to use the options provided by [https://github.com/aurelia/cli](https://github.com/aurelia/cli) only. (Doesn’t mean you can’t use outside loaders)
2. With 1 being said, I have tried all loader / bundler options the CLI provided and eventually picked [https://github.com/requirejs/alameda](https://github.com/requirejs/alameda) because it requires the LEAST amount of tinkering with aurelia.json. Webpack is not a bad choice either, but having to `PAL.moduleName()` everything is annoying.
3. My main criteria for picking a loader / bundler so far has been to avoid having to tinker with aurelia.json for every new dependency. In Aurelia vNext, I’ve already seen that aurelia.json is not even there anymore. Therefore, it will be mostly just personal preference then, although webpack does have some advantages such as tree shaking capability, hot module reloading, etc.

---

<div class="post-metadata">

**Author:** ![ghiscoding](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/ghiscoding/32/1199_2.png) [@ghiscoding](https://discourse.aurelia.io/u/ghiscoding)\
**Post date:** [September 9, 2019, 9:19pm UTC](https://discourse.aurelia.io/t/suggestion-on-choosing-build-system/2916/3 "2019-09-09T21:19:40Z")

</div>

Just a side note, the `PLATFORM.moduleName()` is going away and won’t be necessary anymore in Aurelia 2. That was mentioned by core team member somewhere in a Discourse article or in their GitHub, though I forgot where exactly, so I can’t link it.

I’m with WebPack since a while, I tried RequireJS long time ago and I think WebPack is better in importing not just JS/TS but also other file type like CSS/SCSS/LESS in your code. I haven’t used any other than WebPack in a while so I could be wrong now, JavaScript world is changing fast so.

EDIT

Here’s the [link](https://github.com/aurelia/aurelia/pull/527#issuecomment-513624763) where it’s mentioned that `PLATFORM.moduleName()` is going away in Aurelia 2.

---

<div class="post-metadata">

**Author:** ![CuddleBunny](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/cuddlebunny/32/1037_2.png) [@CuddleBunny](https://discourse.aurelia.io/u/CuddleBunny)\
**Post date:** [September 10, 2019, 3:04am UTC](https://discourse.aurelia.io/t/suggestion-on-choosing-build-system/2916/4 "2019-09-10T03:04:18Z")

</div>

I use Aurelia in a lot of composite UI/micro-services projects and prefer requirejs because it is the easiest to get working with that pattern. I used to still wrap everything in `PLATFORM.moduleName` anyways so that I could swap build systems if I had a reason to but since I heard it is going away I’ve stopped.

Personally, I also feel more comfortable modifying gulp scripts than a webpack config. I’ve done many a deep dive into webpack but feel like I need a Ph.D to get everything I need out of it. Gulp may be a little slower sometimes but I know that I can get exactly what I want every time.

Once upon a time I wrote off Alameda but can’t recall the reason. I suggest some research on trade-offs if you’re down to just those two.

---

<div class="post-metadata">

**Author:** ![veikkoeeva](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/veikkoeeva/32/529_2.png) [@veikkoeeva](https://discourse.aurelia.io/u/veikkoeeva)\
**Post date:** [September 13, 2019, 5:58am UTC](https://discourse.aurelia.io/t/suggestion-on-choosing-build-system/2916/5 "2019-09-13T05:58:04Z")

</div>

RollupJS looks better and better every time I see it being used. Here’s a short video that makes it look very easy: [https://twitter.com/DasSurma/status/1161293821105364993](https://twitter.com/DasSurma/status/1161293821105364993).

---

<div class="post-metadata">

**Author:** ![fragsalat](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/fragsalat/32/270_2.png) [@fragsalat](https://discourse.aurelia.io/u/fragsalat)\
**Post date:** [September 13, 2019, 2:04pm UTC](https://discourse.aurelia.io/t/suggestion-on-choosing-build-system/2916/6 "2019-09-13T14:04:57Z")

</div>

I prefer RequireJS for older browsers and Alameda for newer. The reason I prefer it before webpack is that the resulting code is way easier to read in my eyes. That makes debugging easy and I don’t need / use sourcemaps. This also gives me a better knowledge of what is the transpiled result and what it means to the performance in terms of executed code etc.  
I only recognized in an edge case a downside that I couldn’t used two aurelia applications on one page. Both had different sources and aurelia versions. The aurelia amd config doesn’t support contexts which means the one application loads sources from the other applications as they share the module context.  
Anyhow that’s a very rare edge case and I still prefer alameda 🙂
