Skip to content

Commit

Permalink
Merge pull request #21 from gaearon/patch-1
Browse files Browse the repository at this point in the history
Add support for woff2, mp4, and webm
  • Loading branch information
scottcorgan committed Jul 29, 2016
2 parents 9c1d3e8 + d793539 commit c247198
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit c247198

Please sign in to comment.