Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #563 from nolanlawson/patch-2
Browse files Browse the repository at this point in the history
Remove unnecessary index.html file serve
  • Loading branch information
Rich-Harris authored Feb 17, 2019
2 parents a476d21 + 1f1211b commit 9d2ce6d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions runtime/src/server/middleware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ export default function middleware(opts: {
next();
},

fs.existsSync(path.join(build_dir, 'index.html')) && serve({
pathname: '/index.html',
cache_control: dev ? 'no-cache' : 'max-age=600'
}),

fs.existsSync(path.join(build_dir, 'service-worker.js')) && serve({
pathname: '/service-worker.js',
cache_control: 'no-cache, no-store, must-revalidate'
Expand Down Expand Up @@ -143,4 +138,4 @@ export function serve({ prefix, pathname, cache_control }: {
};
}

function noop(){}
function noop(){}

0 comments on commit 9d2ce6d

Please sign in to comment.