Closed cabbbbage closed 3 years ago
Hi @kkemila, Please pull the latest version, I've just added https=true option to the vite.config.js and update packages to the latest. Note: run npm install after pulling from the repo Thanks for trying the theme and reporting the issue, and please let me know does it solve the problem. :)
One more thing... Please edit functions.php and set VITE_SERVER to httpS also, I missed that in this push. define('VITE_SERVER', 'https://localhost:3000');
Actually it seams a bit deeper problem. I just tested and figure out browser not allowing connection to the Vite dev server via httpS without certificate. Will try to find solution. In the mean time I recommend reverting all settings (and yoursitedomain.local) to http not httpS, and everything should work fine.
I've added solution tips in latest version. Basically certificate need to be generated for serving Vite localhost dev and properly configured. I did test but please let me know does it work for you. Thanks
If your local development domain is served via https:// then generating certificate for localhost usage and some changes in config are required
# install mkcert
choco install mkcert
# global one time install
mkcert -install
# run in project/theme folder to create localhost-key.pem & localhost.pem
mkcert localhost
So https will work with a certificate like described above, I will close it.
[blocked] The page at https://mydomain.com/ was not allowed to run insecure content from http://localhost:3000/main.js.
Hi! This theme is looking very interesting. How should I fix this? Nothing is loading, just plain text. This happens only after npm run dev and if this is set to true: define('IS_VITE_DEVELOPMENT', true);