我一直在使用带有“清除”选项的 Tailwind,以使最终的 css 文件更小且更成功。但是,我一直想知道我的方法的效率。我正在处理有很多子文件夹的项目,我都指定如下:
purge: {
layers: ['components', 'utilities', 'base'],
content: [
'../A.Umb.E.Platform.Frontend/Assets/**/*.css',
'../A.Umb.E.Platform.Vue/src/Apps/ESearch/*.vue',
'../A.Umb.E.Platform.Vue/src/Apps/ESearch/Components/*.vue',
'../A.Umb.E.Platform.Vue/src/Apps/HSearch/*.vue',
'../A.Umb.E.Platform.Vue/src/Apps/HSearch/Components/*.vue',
'../A.Umb.E.Platform.Web/Views/**/*.cshtml',
'../A.Umb.E.Platform.Web/Views/**/**/*.cshtml',
'../A.Umb.E.Platform.Web/Views/**/**/**/*.cshtml',
'../A.Umb.E.Platform.Web/Views/**/**/**/**/*.cshtml',
]
}
我一直在寻找这种低效方法的解决方案,但我能找到的只是在同一文件夹中只有几个 html 或 vue 文件的小型项目的示例。所以我的问题是:有没有办法更有效地做到这一点,还是我必须像我已经做过的那样做?