@403page if Iām not mistaken, the approach in Pantheon is going to be changing Webpackās publicPath to use a different /static folder.
Imagine you have a folder structure like this:
/var/www/html
/wp-includes
/wp-content
/frontity
/build
/static
...
Then you would change the publicPath to "/frontity/build/static" and the URL of your scripts/fonts will become:
https://yourdomain.com/frontity/build/static/my-assets.some-hash.js
If the Frontity folder is instead inside wp-content, like this:
/var/www/html
/wp-includes
/wp-content
/frontity
/build
/static
...
Then, then publicPath would be "/wp-content/frontity/build/static" and the URL:
https://yourdomain.com/wp-content/frontity/build/static/my-assets.some-hash.js
That way, Nginx can find the files in the file-system and everything works fine.
Our current idea is to add the ability to change the publicPath in build-time:
> npx frontity build --publicPath="/other/folder"
or in run-time, to be able to store the setting in WordPress:
https://mydomain.com/some-post/?frontity_publicPath=/other/folder
More info on the Public Path feature discussion. Feel free to give us your feedback 