CLIENT_TYPE env var to select client type

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-08-09 21:07:12 +02:00
parent 2c60e39bae
commit f91cead9f1
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
2 changed files with 4 additions and 4 deletions

View File

@ -40,10 +40,10 @@ export function configurePlatform() {
setMetadata(login.metadata.OverrideLoginToken, process.env.LOGIN_TOKEN)
setMetadata(login.metadata.OverrideEndpoint, process.env.LOGIN_ENDPOINT)
if (process.env.NODE_ENV === 'production') {
addLocation(clientId, () => import(/* webpackChunkName: "client" */ '@anticrm/client-resources'))
} else {
if (process.env.CLIENT_TYPE === 'dev') {
addLocation(clientId, () => import(/* webpackChunkName: "client-dev" */ '@anticrm/dev-client-resources'))
} else {
addLocation(clientId, () => import(/* webpackChunkName: "client" */ '@anticrm/client-resources'))
}
addLocation(loginId, () => import(/* webpackChunkName: "login" */ '@anticrm/login-resources'))

View File

@ -44,5 +44,5 @@ async function connect(): Promise<Client | undefined> {
{:then client}
<Workbench {client}/>
{:catch error}
<div>{error}</div>
<div>{error} -- {error.stack}</div>
{/await}