New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin in same package as app #245
Comments
@cohenstyle Thank you for posting this issue. @cohenstyle Have you found a solution or workaround for this issue? |
Hi @cohenstyle, After investigating further in my import { registerPlugin } from '@capacitor/core';
import type { SerialPortPlugin } from './definitions';
const SerialPort = registerPlugin<SerialPortPlugin>('SerialPort', {
web: () => import('./web').then(m => new m.SerialPortWeb()),
// electron: () => (window as any).CapacitorCustomPlatform.plugins.SerialPort, => my error SerialPort instead of SerialPortElectron
electron: () => (window as any).CapacitorCustomPlatform.plugins.SerialPortElectron,
});
export * from './definitions';
export { SerialPort }; We may not have the same issue, but sometimes, it's these small details that cause our problems. Perhaps you are facing the same issue, and if so, I hope I could help you. Best regards. |
Thanks @dimer47. I've been focused on Android lately and am having trouble getting electron running in my project altogether at the moment. I'll likely give this a shot when I get it running. |
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):
The text was updated successfully, but these errors were encountered: