From 105867c8b316d947a9f1371d670d80adb527a1b9 Mon Sep 17 00:00:00 2001 From: Felipe Moyano Date: Tue, 23 Aug 2016 10:28:15 -0500 Subject: [PATCH 1/2] added support for webp images --- README.md | 1 + index.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a8d18ad..ac8fba9 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Defaults all routes to ` index.html ` in the directory set by ` setDirectory() ` * png * svg * eot +* webp * otf * ttf * woff diff --git a/index.js b/index.js index 132d180..1a4cc43 100644 --- a/index.js +++ b/index.js @@ -32,8 +32,8 @@ module.exports = { app.use(modRewrite([ '!\\.html|\\.js|\\.json|\\.ico|\\.csv|\\.css|\\.less|\\.png|\\.svg' + - '|\\.eot|\\.otf|\\.ttf|\\.woff|\\.woff2|\\.appcache|\\.jpg|\\.jpeg' + - '|\\.gif|\\.mp4|\\.webm ' + file + ' [L]' + '|\\.eot|\\.otf|\\.webp|\\.ttf|\\.woff|\\.woff2|\\.appcache|\\.jpg' + + '|\\.jpeg|\\.gif|\\.mp4|\\.webm ' + file + ' [L]' ])); app.use(compression()); From c602ef5c2ed03c99f8cfc6e294a32cf8e7490efc Mon Sep 17 00:00:00 2001 From: Felipe Moyano Date: Tue, 23 Aug 2016 10:33:18 -0500 Subject: [PATCH 2/2] add support for webp images --- README.md | 2 +- index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ac8fba9..ac04b7b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ Defaults all routes to ` index.html ` in the directory set by ` setDirectory() ` * png * svg * eot -* webp * otf * ttf * woff @@ -22,6 +21,7 @@ Defaults all routes to ` index.html ` in the directory set by ` setDirectory() ` * jpg * jpeg * gif +* webp * ico * mp4 * webm diff --git a/index.js b/index.js index 1a4cc43..5d05eaf 100644 --- a/index.js +++ b/index.js @@ -32,8 +32,8 @@ module.exports = { app.use(modRewrite([ '!\\.html|\\.js|\\.json|\\.ico|\\.csv|\\.css|\\.less|\\.png|\\.svg' + - '|\\.eot|\\.otf|\\.webp|\\.ttf|\\.woff|\\.woff2|\\.appcache|\\.jpg' + - '|\\.jpeg|\\.gif|\\.mp4|\\.webm ' + file + ' [L]' + '|\\.eot|\\.otf|\\.ttf|\\.woff|\\.woff2|\\.appcache|\\.jpg|\\.jpeg' + + '|\\.gif|\\.webp|\\.mp4|\\.webm ' + file + ' [L]' ])); app.use(compression());