compression options
This commit is contained in:
@@ -31,6 +31,23 @@
|
|||||||
RewriteCond %{QUERY_STRING} .
|
RewriteCond %{QUERY_STRING} .
|
||||||
RewriteRule ^uploads/(.+)\.(jpe?g|png)$ media.php?url=uploads/$1.$2 [NC,QSA,L]
|
RewriteRule ^uploads/(.+)\.(jpe?g|png)$ media.php?url=uploads/$1.$2 [NC,QSA,L]
|
||||||
|
|
||||||
|
# AddEncoding allows you to have certain browsers uncompress information on the fly.
|
||||||
|
AddEncoding gzip .gz
|
||||||
|
|
||||||
|
#Serve gzip compressed CSS files if they exist and the client accepts gzip.
|
||||||
|
RewriteCond %{HTTP:Accept-encoding} gzip
|
||||||
|
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
||||||
|
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
|
||||||
|
|
||||||
|
# Serve gzip compressed JS files if they exist and the client accepts gzip.
|
||||||
|
RewriteCond %{HTTP:Accept-encoding} gzip
|
||||||
|
RewriteCond %{REQUEST_FILENAME}\.gz -s
|
||||||
|
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
|
||||||
|
|
||||||
|
# Serve correct content types, and prevent mod_deflate double gzip.
|
||||||
|
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
|
||||||
|
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
|
||||||
|
|
||||||
# Send Requests To Front Controller...
|
# Send Requests To Front Controller...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ export default defineConfig({
|
|||||||
refresh: true,
|
refresh: true,
|
||||||
}),
|
}),
|
||||||
analyzer({ summaryOnly: true }),
|
analyzer({ summaryOnly: true }),
|
||||||
// compression({
|
compression({
|
||||||
// include: [/\.(js)$/, /\.(css)$/],
|
include: [/\.(js)$/, /\.(css)$/],
|
||||||
// deleteOriginalAssets: true,
|
// deleteOriginalAssets: true,
|
||||||
// }),
|
}),
|
||||||
],
|
],
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user