fetch different file name in client build

pull/1/head
Evan You 4 years ago
parent 89545b5270
commit f526d76e5c

@ -109,8 +109,14 @@ function loadPage(route, scrollPosition = 0) {
pagePath += 'index'
}
// awlays force re-fetch content in dev
import(`${pagePath}.md?t=${Date.now()}`)
if (__DEV__) {
// awlays force re-fetch content in dev
pagePath += `.md?t=${Date.now()}`
} else {
pagePath += `.md.js`
}
import(pagePath)
.then(async (m) => {
if (route.path === pendingPath) {
route.contentComponent = m.default

Loading…
Cancel
Save