Community forum for knowledge and support

Updated 2 months ago

Improving Custom Code Workflow with VSCode, GitHub, Netlify, and Vite

At a glance

A community member is trying to improve their custom code workflow using VSCode, GitHub, Netlify, and Vite. They have successfully set up the first three and Vite for local editing, but are struggling with getting auto-refresh to work for JavaScript or CSS changes. The issue is that Webflow doesn't allow "module" in a script link due to a CORS error. The community member is linking their scripts and CSS through a CDN hosted on Netlify and tracking changes with GitHub. They appreciate VSCode for integrating ChatGPT and providing a "no-code" flow on a low-code level. However, Netlify builds are not instant, and it's easy to break JavaScript and CSS on production. The community member has set up a local solution with Vite to test changes before committing to Git, but the auto-refresh is still not working. They are 95% there in their workflow improvements.

Hey Everyone! πŸ‘‹ Currently I'm in a process of improving my custom code workflow with vscode + github + netlify + vite.
I managed to work the first three and also vite for local editing without messing up the production page. However the only thing I can't make work is the auto refresh for js or css change.

Unfortunately Webflow doesn't allow "module" in a script link because of a CORS error.

Is anyone tried to do something similar? Now I have to manually refresh when I save my code. It's not bad but auto refresh would be ace πŸ€™

The workflow itself in detail:

I'm linking my scripts and css through a CDN hosted on Netlify and I can also track changes with Github. I also appreciate VSCode as a tool, because I can integrate chatgpt and get a "no-code" flow on a low-code level. I also don't have to publish my site from webflow all the time, however netlify builds not instant either and it's easy to break js and css on production. These are the reasons why I also wanted to host a local solution as well with vite. Before I commit anything to git, I can mess around with js and css, so changes are instant. Except it's not auto refreshing currently. I'm 95% there... πŸ˜„

Add a reply
Sign up and join the conversation on Slack