如何在TYPO3中动态压缩(缩小)我的JavaScript和CSS文件?
由于
答案 0 :(得分:28)
您可以使用Typoscript(自4.6起):
config {
concatenateJs = 1
concatenateCss = 1
compressJs = 1
compressCss = 1
}
page {
includeJS {
myFile1 = fileadmin/js_file1.js
myFile2 = fileadmin/js_file2.js
myFile2.excludeFromConcatenation = 1
}
includeCSS {
myFile1 = fileadmin/css_file1.css
myFile2 = fileadmin/css_file2.css
myFile2.disableCompression = 1
}
}
答案 1 :(得分:2)
我建议使用scriptmerger扩展名。它会为您自动执行此任务。