Sanjibukai

Sanjibukai

Hi everybody,

I’m playing around with the asset pipeline and I tried for example to replace Webpack with Rollup.
While I somehow managed to get the pipeline working (I’m trying Svelte btw) I’m getting a lot of Live reload debug events when I’m changing a file (around 40 lines!).

In my package.json file (from a svelte project) I got the following script tasks:

"scripts": {
    "build": "rollup -c",
    "dev": "rollup -c -w"

So I set the following watcher in my dev.exs file:

watchers: [yarn: ["dev", cd: Path.expand("../assets", __DIR__)]]

If you’re interested, here is a pastebin of an example log I got when I save a file.

Also something weird is that it took almost half a second (here 458ms for example, but it can be more or less) while I have a very little project (a simple sveltejs/template starter project actually).

For example I compared live reload time compilations with a bare Svelte JS project (without Phoenix) with both Rollup and Webpack, and did the same within Phoenix, with Rollup and Webpack.

In the Phoenix Webpack version I got also several debug Live reload lines, but it’s way more less (~6). It’s also way more faster with webpack.
Here is a pasthebin of the log for the Webpack version.

Regarding both of the Phoenix projects I’m running them inside docker while I tested the bare JS versions of Svelte in my host without docker.

For the bare JS versions, the compilation times are a little faster, but in any cases the rollup version is also faster (80~100ms) than the webpack version (100~150ms). Which is more the expecting situation if I look around the internet about benchmarks.

I’m not counting the ms (even if with half a second it becomes really noticeable and the pages are flickering which is kind of annoying) but it’s rather all those logging lines that is frustrating.

But I heard around that Rollup is known to be fast..
Does anyone know what I’m doing wrong?

NB: Here are some pastebins for:

Thank you very much.

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews