3.3.1
- New: Add support for an esm/.ts tailwind.configs #794
thanks to @albohlabs
Note: Twin will now autoload a tailwind.config.ts
config file if found when a tailwind.config.[.js/.cjs]
doesn't exist.
// tailwind.config.ts
// generate with: `npx tailwindcss init --ts`
import type { Config } from 'tailwindcss'
export default {
content: ['*'],
theme: {
extend: {},
},
plugins: [],
} satisfies Config
// tailwind.config.js
// generate with: `npx tailwindcss init --esm`
/** @type {import('tailwindcss').Config} */
export default {
content: ['*'],
theme: {
extend: {},
},
plugins: [],
}
// Classic tailwind.config.js for comparison
// generate with: `npx tailwindcss init`
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['*'],
theme: {
extend: {},
},
plugins: [],
}