Home > Back-end >  Rails asset pipeline not automatically compiling with esbuild only on WSL
Rails asset pipeline not automatically compiling with esbuild only on WSL

Time:07-31

I have a rails 6 app using esbuild to bundle all my js files to app/assets/build. I have to manually run rails assets:precompile in order for the changes that are in app/assets/build to actually be loaded from sprockets. I'll make a change to a file, I can see that esbuild has bundled the changes in app/assets/build but refreshing the page does not reflect the changes, unless I stop the server, precompile assets and then start server again. This is on my windows laptop running WSL

I just tested the exact same app on my macbook and the changes are picked up by the asset pipeline without having to manually precompile assets.

Any ideas on what the issue with windows/WSL is on this would be greatly appreciated!

CodePudding user response:

The issue was a public/assets folder being present. Removing that made assets get served from assets/builds

  • Related