Greg Bergé eb1cfe8e21 feat: improve SSR support
BREAKING CHANGE:

- SSR has been rewritten from scratch, if you use it, please follow the
new guide.
- Prefetch component and prefetch functions have been removed, please
use `webpackPrefetch` instead.
2018-11-10 18:05:23 +01:00

13 lines
378 B
JavaScript

export const clearModuleCache = key => delete require.cache[key]
export const smartRequire = modulePath => {
if (process.env.NODE_ENV !== 'production') {
clearModuleCache(modulePath)
}
// eslint-disable-next-line global-require, import/no-dynamic-require
return require(modulePath)
}
export const joinURLPath = (...paths) => paths.join('/').replace(/\/\//g, '/')