core refactor for runtime support
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
export default class PluginRegistry {
|
||||
constructor(environment = 'web') {
|
||||
constructor() {
|
||||
this.plugins = new Map()
|
||||
this.environment = environment
|
||||
}
|
||||
|
||||
register(plugin) {
|
||||
@@ -9,11 +8,6 @@ export default class PluginRegistry {
|
||||
throw new Error('Plugin must have an id')
|
||||
}
|
||||
|
||||
const environments = plugin.environments || ['electron', 'web']
|
||||
if (!environments.includes(this.environment)) {
|
||||
return
|
||||
}
|
||||
|
||||
this.plugins.set(plugin.id, plugin)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user