aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 09:01:19 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 09:01:19 +0200
commit0c503f5c87ec0fbd764ece910a5b11809303cb79 (patch)
treef8068bec1a282bb744aad3c58516136949bb5033 /client/src/app/core/plugins
parentb5addd536fe3b42ee662a58020c1adf0278f74d0 (diff)
downloadPeerTube-0c503f5c87ec0fbd764ece910a5b11809303cb79.tar.gz
PeerTube-0c503f5c87ec0fbd764ece910a5b11809303cb79.tar.zst
PeerTube-0c503f5c87ec0fbd764ece910a5b11809303cb79.zip
Fix bad import on FF ESR
Diffstat (limited to 'client/src/app/core/plugins')
-rw-r--r--client/src/app/core/plugins/plugin.service.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index 3bb82e8a9..3af36765a 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -18,6 +18,7 @@ import { PublicServerSetting } from '@shared/models/plugins/public-server.settin
18import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' 18import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
19import { RegisterClientHelpers } from '../../../types/register-client-option.model' 19import { RegisterClientHelpers } from '../../../types/register-client-option.model'
20import { PluginTranslation } from '@shared/models/plugins/plugin-translation.model' 20import { PluginTranslation } from '@shared/models/plugins/plugin-translation.model'
21import { importModule } from '@app/shared/misc/utils'
21 22
22interface HookStructValue extends RegisterClientHookOptions { 23interface HookStructValue extends RegisterClientHookOptions {
23 plugin: ServerConfigPlugin 24 plugin: ServerConfigPlugin
@@ -222,7 +223,7 @@ export class PluginService implements ClientHook {
222 console.log('Loading script %s of plugin %s.', clientScript.script, plugin.name) 223 console.log('Loading script %s of plugin %s.', clientScript.script, plugin.name)
223 224
224 return this.zone.runOutsideAngular(() => { 225 return this.zone.runOutsideAngular(() => {
225 return import(/* webpackIgnore: true */ clientScript.script) 226 return importModule(clientScript.script)
226 .then((script: ClientScriptModule) => script.register({ registerHook, peertubeHelpers })) 227 .then((script: ClientScriptModule) => script.register({ registerHook, peertubeHelpers }))
227 .then(() => this.sortHooksByPriority()) 228 .then(() => this.sortHooksByPriority())
228 .catch(err => console.error('Cannot import or register plugin %s.', pluginInfo.plugin.name, err)) 229 .catch(err => console.error('Cannot import or register plugin %s.', pluginInfo.plugin.name, err))