capacitor-community / capacitor-community/electron

Plugin in same package as app

Open
#245 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
398
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I'm developing a plugin in the same package as my app to make it easy to iterate.
I'm able to get it into the window by adding it in electron-plugins.js
But even though I've added an electron platform to the registerPlugin call, whenever I try to use it I get a not implemented error.
I may be missing another place I have to hook it up?
When I call the echo function (only implemented function) on the CapacitorCustomPlugin.plugins.name object it seems to work.

**To Reproduce**
Steps to reproduce the behavior:

Create a plugin in a project and manually add it in electron-plugins.js

**Expected behavior**
Be able to use it.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: Mac
- Browser Chrome I suspect
- Version ?

Contributor guide

Open the contributing guide

Research direction

Start with electron-plugins.js and the registerPlugin call described in the report. Trace how the plugin is exposed through CapacitorCustomPlugin.plugins.name and compare that path with the platform-specific implementation that produces the not implemented error. Done means the plugin's echo function works when the plugin is in the same package as the app.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.