Skip to content

Commit b223196

Browse files
committed
enable caching on static assets (close vuejs#150)
1 parent 040e0d3 commit b223196

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ const serve = (path, cache) => express.static(resolve(path), {
4747

4848
app.use(compression({ threshold: 0 }))
4949
app.use(favicon('./public/logo-48.png'))
50-
app.use('/dist', serve('./dist'))
51-
app.use('/public', serve('./public'))
52-
app.use('/manifest.json', serve('./manifest.json'))
50+
app.use('/dist', serve('./dist', true))
51+
app.use('/public', serve('./public', true))
52+
app.use('/manifest.json', serve('./manifest.json', true))
5353
app.use('/service-worker.js', serve('./dist/service-worker.js'))
5454

5555
app.get('*', (req, res) => {

0 commit comments

Comments
 (0)