Merge pull request #563 from nolanlawson/patch-2

Remove unnecessary index.html file serve
This commit is contained in:
Rich Harris
2019-02-17 09:46:55 -04:00
committed by GitHub

View File

@@ -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'
@@ -143,4 +138,4 @@ export function serve({ prefix, pathname, cache_control }: {
};
}
function noop(){}
function noop(){}