navneetsharmaui/sveltekit-starter

Not being able to use @layer based components/utilities

outerlook opened this issue · 1 comments

It appears with the current config we are not able to detect @layer definitions inside svelte files at build time...
but by asking for some guidance I discovered I've got to add

// tailwind.config.js
module.exports = {
  purge: {
    options: {
	  content: ['./src/**/*.{html,js,svelte,ts}'],
      defaultExtractor: content => [
        ...(content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || []),
        ...(content.match(/(?<=class:)[^=>\/\s]*/g) || []),
      ],
    },
  },

but I don't fully understand how exactly it fixes. I don't mind pushing a PR, but for the reason I don't dominate it very well yet, first I would like to open a issue to discover if it would be against something this repo aims to accomplish...

content: ['./src/**/*.{html,js,svelte,ts}'],

@outerlook check the latest code of the repo. If the issue persist you can reopen the issue.