Symfony 4 / Webpack Encore : jQuery doesn't work

If you have enableSingleRuntimeChunk() in your webpack.config.js you need to add <script src="{{ asset('build/runtime.js') }}"></script> in your base template.

There is a Twig helper encore_entry_script_tags() to handle this automatically.


Solution found

Change .enableSingleRuntimeChunk() to .disableSingleRuntimeChunk() in webpack.config.js

If you just comment on the line, it works but you have a warning message when you run a npm run dev or npm run build.