Updating static assets

I’m working on an existing phoenix app that doesn’t seem to recognize changes i was making to webpack config, css or the js files.

When I inspected them in the Sources tab of my browsers dev tools, they were staying static despite changes to the source files in my assets directory. I deleted the cached, unchanged, files from the priv/static/css/ and priv/static/js folders, and now I’m seeing Phoenix.Router.NoRouteError for those assets in my server log.

I’ve looked for documentation around static assets and the Endpoint stuff, but have yet to find anything that might help me resolve the issue.

I’m curious if anyone here has encountered something similar, or have ideas on where I might look next?

Look in dev.exs in the configuration for the Endpoint under watchers key. What do you have in there?

I found the issue shortly after posting this.

It turns out the webpack config file had modified the output of static assets, and it was being disguised by the applications gitignore file.

1 Like