I'm using tw-in-js/twind in Svelte.
when using the vanilla setup for Svelte App and after including Twind I cannot find any way to get plugins to work:
<script>
import {tw, apply, setup} from 'twind/css';
setup ({
plugins: {
h1style: apply`
uppercase
text-6xl
font-thin
`,
},
});
const h1style2 = apply `uppercase text-6xl font-thin`;
export let name;
</script>
<main>
<h1 class={tw`h1style`}>Hello {name}!</h1>
<p>Visit the <a href="https://svelte.dev/tutorial" class={tw`italic`}>Svelte tutorial</a> to learn how to build Svelte apps.</p>
</main>
In the code sample above h1style2 (the const declaration) works but the Plugin h1style does not.
I would appreciate knowing if anyone can get this to work.
question from:
https://stackoverflow.com/questions/65879072/how-to-get-tw-in-js-twind-plugins-to-work-in-svelte 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…