Deploying on a multisite

I’m trying to deploy my Frontity theme on my employers already existing multisite. I have managed to get the links working by using a subdirectory in the Frontity theme’s settings however when I check in the network tab no links are getting prefetched and when a link is clicked the page does a refresh like normal WordPress sites.

I have deployed the site for testing in the following way.
ssh into a server running node v14.17.1. Cloned my Frontity repository, ran npm install, npx Frontity build and npx Frontity serve.

I get this warning.

asset size limit: The following asset(s) exceed the recommended size limit (488 KiB).
This can impact web performance.
Assets:
  frontity.es5.4e2069465430bc4c73fe.js (504 KiB)
  frontity-cy.es5.027ee26687fc9dd67984.js (504 KiB)

entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (488 KiB). This can impact web performance.
Entrypoints:
  frontity (504 KiB)
      frontity.es5.4e2069465430bc4c73fe.js
  frontity-cy (504 KiB)
      frontity-cy.es5.027ee26687fc9dd67984.js

I modified my HOSTS file on my local machine so I could test the theme.

Any help would be appreciated.

Those warnings won’t cause any issues, other than slow loading times.

Do you get any messages/errors in the browser console (enable ‘preserve log’ to see stuff before refresh), or any messages in the terminal when browsing through your project?

And does the project work without your custom theme? Because that would narrow down the location of the issue.

And lastly; without any code it’s hard to see what is wrong, so a repo with the full codebase would help a lot to figure out what is going on. See About the 🙋Get Help category to know what is helpful for us.

1 Like

Hi Johan,

Thank you for your quick response.

I cant give you the repo to my code unfortunately. I have managed to replicate the problem by creating a new frontity project (mars theme), adding in a subdirectory, and serving it on my employer’s node.js server.

I think the problem is somthing to do with our server/domain setup which i cant think of how I could get you to replicate (as I don’t fully understand how it’s working myself).

I appreciate if you cant see the repo nor the server setup helping me will be a challenge.

If you can give me any pointers from the information I’ve given that would be very helpful.

I get two errors in my console:
GET https:///static/frontity.module.js net::ERR_ABORTED 404 (Not Found)
GET https:///static/list.module.js net::ERR_ABORTED 404 (Not Found)

I solved this by using the --public-path option.

npx frontity build --public-path https://mySite.com/subdirectory/static

1 Like