Skip to content
Advertisement

Symfony Webpack not working server return 404 in CSS/JS

I working on Symfony project but when I want implement Tailwind I have problem when I want render images it return 404.. I went through the whole internet and found no answer please help me

btw. Rendering Image through url also not working

webpack.config.js

JavaScript

tailwind.config.js

JavaScript

assets/app.js

JavaScript

twig usage

JavaScript

Advertisement

Answer

Ok so I fixed it, I don’t know why, but I found this https://github.com/EresDev/HandwerkerFullstack/commit/3a1d9baf2caacf8e4b27404b111d47da1bd67a68

and just changed

.setPublicPath(Encore.isProduction() ? '/build' : '/test/public/build')

to

.setPublicPath('/build')

Maybe it will help

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement