mirror of
https://github.com/aelve/guide.git
synced 2024-12-23 21:02:13 +03:00
got rid of useless constants
This commit is contained in:
parent
e61142c0b0
commit
053e9731ab
@ -8,21 +8,13 @@ import { createApp } from './app'
|
||||
const { app, router, store } = createApp()
|
||||
|
||||
const STATE_KEY = '__INITIAL_STATE__'
|
||||
const SSR_ENABLED = window['__SSR_IS_ON__']
|
||||
|
||||
if (window[STATE_KEY]) {
|
||||
store.replaceState(window[STATE_KEY])
|
||||
}
|
||||
|
||||
if (!SSR_ENABLED) {
|
||||
registerBeforeResolve()
|
||||
}
|
||||
|
||||
router.onReady(() => {
|
||||
// TODO get rid of SSR_ENABLED constant
|
||||
if (SSR_ENABLED) {
|
||||
registerBeforeResolve()
|
||||
}
|
||||
registerBeforeResolve()
|
||||
app.$mount('#app')
|
||||
})
|
||||
|
||||
|
@ -9,9 +9,6 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<script>
|
||||
window.__SSR_IS_ON__ = false
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -9,9 +9,6 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{title}}</title>
|
||||
<script>
|
||||
window.__SSR_IS_ON__ = true
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
Loading…
Reference in New Issue
Block a user