简体   繁体   English

如何在 Svelte 中重命名 index.html 文件?

[英]How can I rename index.html file in Svelte?

So I have two components in one svelte app that I run separately using separate rollup.config files.所以我在一个苗条的应用程序中有两个组件,我使用单独的 rollup.config 文件单独运行它们。 But the problem is they both render on index.html so both render the same thing.但问题是它们都在 index.html 上呈现,所以它们都呈现相同的东西。 How can I use a different index.html file for both?如何为两者使用不同的 index.html 文件?

Technically I know they should be independent separate apps.从技术上讲,我知道它们应该是独立的独立应用程序。 But it's an iframe that renders the rest of the components so it's difficult to manage and run two apps.但它是一个 iframe 呈现组件的 rest,因此很难管理和运行两个应用程序。 Is there a hack or a way to rename index.html?有没有办法重命名 index.html?

Svelte doesn't use your index.html, your index.html uses svelte. Svelte 不使用您的 index.html,您的 index.html 使用 svelte。 Simply make a new html file and point it to the other bundle.只需制作一个新的 html 文件并将其指向另一个包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM