Link to static HTML page from within Svelte component

374 Views Asked by At

How can I move from a Svelte component to an HTML file using window.location.href?

I tried various combinations, but the HTML can't be found. Do I have to set up routing?

Folder Structure:

project
├── example.html
├── svelteProject
    ├── src
        ├── App.svelte
1

There are 1 best solutions below

0
Natumanya Guy On

The most ideal thing would be to use Sveltekit. You could also try to create a full page iframe, not sure how you'd reference your HTML file though.