Process tailwind from node package

2023-02-01

I kept running into a problem where I want to modularize some of my svelte components into other packages, but the Tailwind classes in the host project are being purged.

I’m not sure if there is a more extravagant way of doing this, but adding the package folder into the contents config in tailwind.config.js works!

module.exports = {
	content: [
		'./src/**/*.{html,js,svelte,ts}', // the usual stuff
		'./node_modules/<package-name>/**/*.{html,js,svelte,ts}' // node package
	],
	...
}