-
Notifications
You must be signed in to change notification settings - Fork 8
/
browser.js
54 lines (48 loc) · 959 Bytes
/
browser.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import updater from './updater'
import epic from './epic'
import { addLocaleData } from 'react-intl'
import en from 'react-intl/locale-data/en'
import routes from './routes'
import style from './style'
import Layout from './app/containers/Layout'
const createBrowserEntry = require('dogstack/browser')
const authentication = require('dogstack-agents/client')
const Config = require('dogstack/config')
const config = Config()()
window.config = config
const store = {
updater,
epic
}
const client = {
services: [
authentication
],
config
}
// root
const appNode = document.createElement('div')
appNode.id = 'app'
document.body.appendChild(appNode)
const root = {
appNode: '#app',
styleNode: '#app-styles',
}
// intl
addLocaleData([...en])
const messagesByLocale = {
'en': require('./app/locales/en')
}
const intl = {
messagesByLocale
}
createBrowserEntry({
config,
store,
style,
client,
root,
intl,
routes,
Layout
})