Skip to content

Commit 4063fd8

Browse files
committed
Webkit Fix
Fixed Vuejs Gzipping for WebKit (Apple) Devices.
1 parent 3a83d56 commit 4063fd8

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

src/ESPDash.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void ESPDashClass::init(AsyncWebServer& server){
122122
});
123123

124124
server.on("/js/app.js", HTTP_GET, [](AsyncWebServerRequest *request){
125-
AsyncWebServerResponse *response = request->beginResponse(SPIFFS, "/dash/js/app.js.gz", "application/javascript");
125+
AsyncWebServerResponse *response = request->beginResponse(SPIFFS, "/dash/js/app.js", "application/javascript");
126126
response->addHeader("Content-Encoding","gzip");
127127
request->send(response);
128128
});

vue-frontend/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ npm install
1111
```
1212
npm run serve
1313
```
14+
Warning: `app.js` will be Gzipped with .gz extension!
15+
1416

1517
### Compiles and minifies for production
1618
```
1719
npm run build
1820
```
1921

22+
Warning: `app.js` will be Gzipped with .gz extension!
23+
2024
### Run your tests
2125
```
2226
npm run test

vue-frontend/vue.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
configureWebpack: {
2424
plugins: [
2525
new CompressionWebpackPlugin({
26-
filename: '[path].gz[query]',
26+
filename: '[path]',
2727
algorithm: 'gzip',
2828
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
2929
threshold: 10240,

0 commit comments

Comments
 (0)