Theme developers need to add files to the root directory, and we’ve been requesting it for years. Adding files to the root is required for properly functioning Service Workers and PWA. Even if it’s limited to SPA builds and Service Workers, that would be enough. Not having this option is a serious drawback for any experienced web dev who is considering using Shopify.
Seriously, how is this not an option yet? It’s not that hard to build this feature, and it would save a lot of pain in fixing site speed issues.
There are plenty of issues with Shopify theme development – no localhost environment, no flexibility with page routing, no built-in functionality for SPA, no dev environment for a backend database, no way to add metafields to customer accounts from the client-side, no customer auth on the storefront graphql API without Shopify Plus – but by and large, not having access to the root directory on a theme is a HUGE setback. It makes web development very painful. I shouldn’t have to add a proxy server to do something as basic as adding a javascript file to the root.
Please add this functionality as soon as possible.