capacitor-community / capacitor-community/electron
Building app with electron:pack - resulting app shows blank page and error in console
- Dominant language
- TypeScript
- Stars
- 398
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
I have created a project with ionic start, template sidemenu.
Then I added electron following the get started steps.
npm i @capacitor-community/electron
npx cap add @capacitor-community/electron
When running the app with the npx cap open command the starts and the app works.
If I then build a mac application with the command electron:pack and execute the resulting file then the app start but with a blank page.
In the console log following error is displayed:
Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src capacitor-electron://* 'unsafe-inline' data:".
Platform: Mac Studio M1, Monterey 12.4
ps if I use the git repository "angular-electron" by Maxine Griss and build the app it works. But in that case I have big troubles adding the Ionic framework :-( I really would like to use Ionic in a electron app.
Contributor guide
Assessment
This issue has not been assessed yet.