Closed andrejp88 closed 3 years ago
Yeah, I'm having this issue too. In my case, I configured electron manually to load the svelte devtools instead of using the svelte-electron-boilerplate
package. Would love some help with this!
Supporting electron for the browser package is non-trivial and is not planned. However the recently released Svelte DevTools Standalone should work fine.
The only caveat is that nativeWindowOpen
must be enabled.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
nativeWindowOpen: true
}
});
After that simply add the script tag to the top of your head.
<script src="https://cdn.jsdelivr.net/gh/redhatter/svelte-devtools-standalone@master/dist/standalone.js"></script>
I apologize for the late reply, I have been developing Svelte DevTools Standalone and wanted to make sure it was working and usable with electron before I responded. Let me know if you have any issue.
@RedHatter I'm trying it and so far it seems to be working great! The only issue I noticed is that if the electron app has frame disabled, the devtool window can't be dragged (nor closed, maximized or minimized of course). I'm not sure how difficult would be to fix this, but for the moment, the workaround is enabling the frame.
Thanks for the good work!
Describe the bug When running this extension in electron, the Svelte DevTool panel does not show any Svelte debug information (see screenshot below).
To Reproduce
electron-devtools-installer
yarn electron-dev
)At this point, a warning will print in the console:
ExtensionLoadWarning: Warnings loading extension at /home/...[snip]: Unrecognized manifest key 'update_url'. Permission 'tabs' is unknown or URL pattern is malformed. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.
I have double-checked the version of Svelte that yarn installs (3.24.1), and made sure it's running in dev mode (by changing
dev: !production
todev: true
in the rollup config).Expected behavior Svelte-devtools loads without issue and is usable from the devtools panel.
Environment
Additional Context Visiting
localhost:5000
in an actual Chromium browser with the extension installed works fine. The DevTools panel does show the "Not Working?" text at first, but after a refresh it works as expected.