Skip to content

Commit cc7acab

Browse files
committed
Modify compression scheme - no longer compressing index.html due to issues serving compressed file directly with .send on esp32
Removed css from compression plugin - using CSS-in-JS in app Introduce favicon - add mapping for favicon.ico, was previously sending html response for requests for the favicon
1 parent 1482061 commit cc7acab

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

interface/config-overrides.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ module.exports = function override(config, env) {
2121
const extractTextPlugin = config.plugins.find((plugin) => plugin instanceof ExtractTextPlugin);
2222
extractTextPlugin.filename = "css/[name].[contenthash:4].css";
2323

24-
// add compression plugin, compress javascript, html and css
24+
// add compression plugin, compress javascript
2525
config.plugins.push(new CompressionPlugin({
2626
asset: "[path].gz[query]",
2727
algorithm: "gzip",
28-
test: /\.(js|html|css)$/,
28+
test: /\.(js)$/,
2929
deleteOriginalAssets: true
3030
}));
3131
}

interface/public/favicon.ico

1.12 KB
Binary file not shown.

src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ void setup() {
5151
server.serveStatic("/css/", SPIFFS, "/www/css/");
5252
server.serveStatic("/fonts/", SPIFFS, "/www/fonts/");
5353
server.serveStatic("/app/", SPIFFS, "/www/app/");
54+
server.serveStatic("/favicon.ico", SPIFFS, "/www/favicon.ico");
5455

5556
// Serving all other get requests with "/www/index.htm"
5657
// OPTIONS get a straight up 200 response

0 commit comments

Comments
 (0)