diff options
Diffstat (limited to 'server/lib/plugins')
-rw-r--r-- | server/lib/plugins/plugin-manager.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts index c19b40135..0086a0e2e 100644 --- a/server/lib/plugins/plugin-manager.ts +++ b/server/lib/plugins/plugin-manager.ts | |||
@@ -23,6 +23,8 @@ import { ClientHtml } from '../client-html' | |||
23 | import { RegisterHelpers } from './register-helpers' | 23 | import { RegisterHelpers } from './register-helpers' |
24 | import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn' | 24 | import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn' |
25 | 25 | ||
26 | const decache = require('decache') | ||
27 | |||
26 | export interface RegisteredPlugin { | 28 | export interface RegisteredPlugin { |
27 | npmName: string | 29 | npmName: string |
28 | name: string | 30 | name: string |
@@ -411,7 +413,7 @@ export class PluginManager implements ServerHook { | |||
411 | 413 | ||
412 | // Delete cache if needed | 414 | // Delete cache if needed |
413 | const modulePath = join(pluginPath, packageJSON.library) | 415 | const modulePath = join(pluginPath, packageJSON.library) |
414 | delete require.cache[modulePath] | 416 | decache(modulePath) |
415 | const library: PluginLibrary = require(modulePath) | 417 | const library: PluginLibrary = require(modulePath) |
416 | 418 | ||
417 | if (!isLibraryCodeValid(library)) { | 419 | if (!isLibraryCodeValid(library)) { |