Remove portal code from site when not used

<script defer src="https://unpkg.com/@tryghost/portal@~1.0.0/umd/portal.min.js" ....></script><style> .gh-post-upgrade-cta-content ....

I do not use Portal feature as my theme has its own membership sites. After I disabled the Portal feature in Ghost Admin, there should be no Portal code inserted to the site anymore.

Why load scripts and styles even the feature is not used?

Any solution to remove the code?

1 Like

As explained here: Remove portal code from site when not used · Issue #12835 · TryGhost/Ghost · GitHub

The script is still in use.