Join the Webstudio community

Updated 2 months ago

Vanilla export with no js dependecies?

At a glance

The community member has completed a Webstudio project but is facing a challenge. The client needs only the HTML, image assets, and CSS, without any JavaScript dependencies, as they will be using the project as the front-end for a Django web app and need to edit everything outside of Webstudio. The community member has tried a static export but found that the files still have JavaScript dependencies, and removing the server routing JavaScript causes issues with the CSS layout and fonts. Other community members suggest that this is because the project uses components like Radix UI, which require React, making a pure HTML export infeasible. The only option seems to be copying the HTML directly from the browser, but this would result in losing the dynamic functionality and logic. The community member is trying to find a way to provide the client with the necessary HTML and CSS without the JavaScript dependencies.

Useful resources
I've just almost completed my first Webstudio project however I've hit a snag in that the client really just needs the html, image assets and CSS and NO js dependencies as they'll be using everything as the front end for a Django web app and they need to edit everything on their own outside of Webstudio, so I'm hoping there's an established way to provide that to them without the "entry-server-routing.js" or the rest of the scripts from a Vanilla export? Thank you in advance for any advice you may have. Here's the project: https://health-daily-dev-02.org/
O
m
11 comments
Thanks, but I exported the site to build/download Vanilla static site which I thought would be static, however the result is that the files still have js dependecies and can only be edited (meaning changing the text of say an h1 for example) when the server routing js is removed, but then the CSS layout and fonts don't work properly?
ah yes that's right, because there are components like radix ui which require react, we can't do a pure html export and keeping everything functional
its possible but then only basic hmtl components would work
your only option in this case is just copying html out of the browser directly
this is not the kind of workflow we have built this for, at least not for now.
Okay I was afraid of that, but isn't copying html from the browser effectively the same as the static export? For example the homepage index html of the site looks to be the same wether it's from the static export or from the browser.
no, js is managing the rendering, you are loosing all the dynamic functionality/logic
html is just an artifact of the current state
if that's all you need go for it
Yeah I don't need any of the dynamic stuff, just the html/CSS, but when I comment out the scripts which appear right before </body> it screws up the layout, though fonts and images and some styles are fine. I'm running a version locally just to try getting it to work.
Add a reply
Sign up and join the conversation on Discord