You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, thanks for the work you put into this, it’s looking great!
I just wanted to know if there is a particular reason for forcing the publicdir to false, and how can I handle static assets.
As a basic example, I want to store a favicon in my repo, and my initial idea was using the vite publicdir, as it would be compiled (moved) to the shopify assets folder.
I tried to set the publicdir in vite config, but vte plugin shopify overrides it, forcing it to be ignored.
How/where can I put static images or other assets that I don’t want to be transformed, so they still are copied to the assets folder (and pushed to shopify)?
Would it be possible to add it as a plugin option, instead of forcing it?
Thanks again!
The text was updated successfully, but these errors were encountered:
We disable it by default because public is not part of the directory structure of a Shopify theme.
The assets in the public directory get copied to the dist directory during build only. You should be able to enable it in your vite config file using the publicDir option, then you could use rollup-plugin-copy to copy those files during dev as well.
Hey @montalvomiguelo, thanks so much for that! I was able to solve this following your instructions. I just ended up replacing rollup-plugin-copy with my own node script. Thank you!
Hi guys, thanks for the work you put into this, it’s looking great!
I just wanted to know if there is a particular reason for forcing the publicdir to false, and how can I handle static assets.
As a basic example, I want to store a favicon in my repo, and my initial idea was using the vite publicdir, as it would be compiled (moved) to the shopify assets folder.
I tried to set the publicdir in vite config, but vte plugin shopify overrides it, forcing it to be ignored.
How/where can I put static images or other assets that I don’t want to be transformed, so they still are copied to the assets folder (and pushed to shopify)?
Would it be possible to add it as a plugin option, instead of forcing it?
Thanks again!
The text was updated successfully, but these errors were encountered: