I was able to partially setup the rollup + svelte + tailwind + multi-page , but its slow and debugging is difficult.
though there is svelte + snowpack + tailwindcss is there here https://github.com/agneym/svelte-tailwind-snowpack
but multi-page snowpack is what i cannot figure out. I cannot even find any documentation for multi-page snowpack setup.
Can anyone help me in figuring out how to setup Snowpack + Svelte + multi-page + Tailwind-css ?
snowpack.config.mjs:
So, all file in
src
will compile todist
.In
/src
, setup an otherpage.js
exactly like theindex.js
(if you like, you can only change the import path).The
Page.svelte
imported inpage.js
will serve as another route aside fromindex
.In
/public
:Pay attention to the
<script>
tag inindex.html
:<script type="module" src="/dist/index.js"></script>
Now, create another
/public/page.html
, but use the newpage.js
:<script type="module" src="/dist/page.js"></script>
And, that it. You have a new
page
route.