From 895072352352f1652a1c2b8a4ee503fa8c7f2865 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 29 Jul 2016 16:17:11 +0100 Subject: [PATCH 1/2] Add support for woff2, mp4, and webm --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index a67c0da..eaf4941 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,9 @@ module.exports = { var file = options.file || this._file; app.use(modRewrite([ - '!\\.html|\\.js|\\.json|\\.ico|\\.csv|\\.css|\\.less|\\.png|\\.svg|\\.eot|\\.ttf|\\.woff|\\.appcache|\\.jpg|\\.jpeg|\\.gif ' + file + ' [L]' + '!\\.html|\\.js|\\.json|\\.ico|\\.csv|\\.css|\\.less|\\.png|\\.svg' + + '|\\.eot|\\.ttf|\\.woff|\\.woff2|\\.appcache|\\.jpg|\\.jpeg|\\.gif' + + '|\\.mp4|\\.webm ' + file + ' [L]' ])); app.use(compression()); From d793539c224638cc4f464925d3ac917e3f54add0 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 29 Jul 2016 16:52:35 +0100 Subject: [PATCH 2/2] Document newly handled filetypes in README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index fd4bb0c..8dfeeb5 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,14 @@ Defaults all routes to ` index.html ` in the directory set by ` setDirectory() ` * eot * ttf * woff +* woff2 * appcache * jpg * jpeg * gif * ico +* mp4 +* webm For example, the route ` /some/pushstate/route ` will return the ` index.html ` file. But, ` /some/static/path/logo.png ` will return the ` logo.png ` static file.