benonymus

benonymus

Elixir Phoenix webpack keeps recompiling constantly while running

Hey,

I have an elixir phoenix project that has some react webpack goody in it.
Now when I start the project with mix phx.server everything start up nicely, but webpack keeps recompiling the project without having any file changes made to any of the files.

I experience the same on my m1 mac locally and if I run the project in a dev container as well.

This is the output:

[Sentry Webpack Plugin] Creating new release:
 'longtextnumberhere'
[Sentry Webpack Plugin] Calling upload-sourcemaps with:
 {
  finalize: true,
  rewrite: true,
  include: [ './../priv/static' ],
  deploy: { env: 'production' },
  dryRun: true
}
[Sentry Webpack Plugin] Finalizing release:
 'longtextnumberhere'
[Sentry Webpack Plugin] Calling deploy with:
 {
  env: 'production',
  started: undefined,
  finished: undefined,
  time: undefined,
  name: undefined,
  url: undefined
}
assets by status 33.8 MiB [cached] 6 assets
Entrypoint app 19 MiB = ../css/app.css 265 KiB app.js 18.8 MiB
Entrypoint demo 3.29 MiB = ../css/demo.css 57.4 KiB demo.js 3.24 MiB
Entrypoint live 11.5 MiB = ../css/live.css 144 KiB live.js 11.4 MiB
cached modules 7.64 MiB (javascript) 6.32 KiB (runtime) [cached] 1165 modules
modules by layer 300 bytes (javascript) 351 KiB (css/mini-extract)
  modules by path ./css/*.css 200 bytes (javascript) 332 KiB (css/mini-extract)
    javascript modules 200 bytes 4 modules
    css modules 332 KiB 4 modules
  modules by path ./node_modules/ 100 bytes (javascript) 19.4 KiB (css/mini-extract)
    javascript modules 100 bytes
      ./node_modules/tippy.js/dist/tippy.css 50 bytes [built]
      ./node_modules/@shoelace-style/shoelace/dist/themes/light.css 50 bytes [built]
    css modules 19.4 KiB
      css ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./node_modules/tippy.js/dist/tippy.css 1.38 KiB [built]
      css ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./node_modules/@shoelace-style/shoelace/dist/themes/light.css 18 KiB [built]
webpack 5.51.1 compiled successfully in 1029 ms

The project is working fine, but it really ramps up the heat, and is just a waste.

Any tips or ideas as to what might be causing this?

Thanks

First Post!

benonymus

benonymus

In the dev config I have:
watchers: [ npm: [ "run", "watch", cd: Path.expand("../assets", __DIR__) ] ]

If I comment this part out the problem stops. So this might be the cause

Where Next?

Popular in Questions Top

siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43622 214
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47930 226
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New

We're in Beta

About us Mission Statement