mirror of
https://github.com/rubickCenter/rubick
synced 2025-10-26 22:51:25 +08:00
🐛 #215,#237
This commit is contained in:
@@ -9,17 +9,23 @@ export default () => {
|
||||
let systemPlugins = totalPlugins.filter(
|
||||
(plugin) => plugin.pluginType === 'system'
|
||||
);
|
||||
systemPlugins = systemPlugins.map((plugin) => {
|
||||
const pluginPath = path.resolve(
|
||||
PLUGIN_INSTALL_DIR,
|
||||
'node_modules',
|
||||
plugin.name
|
||||
);
|
||||
return {
|
||||
...plugin,
|
||||
indexPath: path.join(pluginPath, './', plugin.entry),
|
||||
};
|
||||
});
|
||||
systemPlugins = systemPlugins
|
||||
.map((plugin) => {
|
||||
try {
|
||||
const pluginPath = path.resolve(
|
||||
PLUGIN_INSTALL_DIR,
|
||||
'node_modules',
|
||||
plugin.name
|
||||
);
|
||||
return {
|
||||
...plugin,
|
||||
indexPath: path.join(pluginPath, './', plugin.entry),
|
||||
};
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
||||
const hooks = {
|
||||
onReady: [],
|
||||
|
||||
Reference in New Issue
Block a user