With Preprocess Scripts and Preprocess Inline Scripts features you can run selected javascripts on server side. It is similar to Server Side Scripts, but with this feature you can run theme or plugin scripts on the server.

You can use full or partial URLs/filenames for Preprocess Scripts. To use run inline scripts on server side you need to add some unique string from its content.

If you specify a script, Swift Performance will also include all dependencies (eg jQuery) automatically.

Debugging

If you enable logging in General settings, and set the loglevel to Error, then if there is any javascript error on the server side, you can see the errors in the Swift Performance debug log, and the browser console if you check the cached page.

Example:

Run all Elementor scripts on server side