r/opencode • • 7h ago

Clone Website Design in Codemulator

2 Upvotes

4 comments sorted by

1

u/YoRt3m 5h ago

Am I hallucinating or all it does is taking the html and add <base> meta tag?

1

u/Codemulator 5h ago

I think you are hallucinating because alcohol! 🙂 As for your question the <base> tag is injected automatically by the preview sandbox so relative URLs (images, links, scripts) resolve correctly when loading external HTML that part is intentional. The codemulator itself actually executes the code live. The screenshot just used Reddit's page source as a test input.

1

u/YoRt3m 5h ago

The base tag also takes all the js and css files so what's the use of this cloning exactly?

I didn't ask because of the screenshot, I tried "cloning" a site, this is why.

1

u/Codemulator 3h ago

Fair point. The clone is just the entry point it drops the page's source into the editor so you can edit it freely, run it live in the sandbox, and export it. The base tag only exists so the preview resolves assets while you work. You're right that the exported HTML still pulls CSS/JS from the origin a fully self-contained offline copy would need asset localization, which is a fair idea for a future "save offline" mode.

This feature has many issues, and i will work on improving it in the coming days.