live-plugin-manager | Plugin manager and installer for NodeJS | Runtime Evironment library
kandi X-RAY | live-plugin-manager Summary
kandi X-RAY | live-plugin-manager Summary
Plugin manager and installer for Node.JS
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of live-plugin-manager
live-plugin-manager Key Features
live-plugin-manager Examples and Code Snippets
Community Discussions
Trending Discussions on live-plugin-manager
QUESTION
I am using vue with electron to build a desktop application. I am using vue plugins to extend the functionality of the application. These vue plugins are hosted as npm modules in npm directory which can be installed from the applications plugin store using the live-plugin-manager which can be used to dynamically install plugins into plugins directory.
I am using webpack to compile the vue front-end. When I directly use these plugins, they work perfectly. I need to know if there is any way I can load these plugins dynamically from the folder each time application launches.
I have built the functionalities to install and uninstall the plugins. But I am unable to require these modules into the vue app. I tried using electron's remote.require call to fetch the module and using a loop called Vue.use() with the loaded plugin. But I keep on getting error.
...ANSWER
Answered 2019-Jul-04 at 09:40I was able to solve the issue by dynamic bundling of the plugins using browserify. I cannot share the entire code, but I will share the method I used.
- First of all I included browserify into the dependency so that electron will include it in node_modules folder.
- Then I set asar as false while packaging so that we can write into the app js file after bundling.
- Each time the app starts it creates a js plugin loading script like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install live-plugin-manager
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page