Performance: Plugin system overview
MEDIUM IMPACT
Tailwind plugins affect build time and CSS bundle size, impacting page load speed and rendering performance.
module.exports = {
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography')
]
}module.exports = {
plugins: [
function({ addUtilities }) {
addUtilities({
'.custom-shadow': {
boxShadow: '0 4px 6px rgba(0,0,0,0.1)',
filter: 'drop-shadow(0 0 5px rgba(0,0,0,0.2))'
}
})
}
]
}| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Heavy custom plugin utilities | No direct DOM impact | No direct reflows | High paint cost due to large CSS | [X] Bad |
| Official lightweight plugins | No direct DOM impact | No direct reflows | Lower paint cost with smaller CSS | [OK] Good |