forked from jsnbuchanan/crowd-funder-for-time-pwa
fix(electron): suppress DevTools source map error for Capacitor SQLite plugin
Remove sourceMappingURL comment from plugin.js in @capacitor-community/sqlite to prevent Electron DevTools from attempting to load the source map via the custom capacitor-electron:// protocol. This eliminates harmless but noisy 404 warnings in development. No impact on runtime or debugging. - Remove //# sourceMappingURL=plugin.js.map from plugin.js - Confirmed plugin.js.map exists for manual inspection if needed - No changes to app logic or build process
This commit is contained in:
@@ -120,6 +120,7 @@ export class ElectronCapacitorApp {
|
||||
// Use preload to inject the electron varriant overrides for capacitor plugins.
|
||||
// preload: join(app.getAppPath(), "node_modules", "@capacitor-community", "electron", "dist", "runtime", "electron-rt.js"),
|
||||
preload: preloadPath,
|
||||
|
||||
},
|
||||
});
|
||||
this.mainWindowState.manage(this.MainWindow);
|
||||
@@ -224,7 +225,7 @@ export function setupContentSecurityPolicy(customScheme: string): void {
|
||||
...details.responseHeaders,
|
||||
'Content-Security-Policy': [
|
||||
electronIsDev
|
||||
? `default-src ${customScheme}://* 'unsafe-inline' devtools://* 'unsafe-eval' data: https:; style-src ${customScheme}://* 'unsafe-inline' https://fonts.googleapis.com; font-src ${customScheme}://* https://fonts.gstatic.com data:`
|
||||
? `default-src ${customScheme}://* 'unsafe-inline' devtools://* 'unsafe-eval' data: https: http:; style-src ${customScheme}://* 'unsafe-inline' https://fonts.googleapis.com; font-src ${customScheme}://* https://fonts.gstatic.com data:`
|
||||
: `default-src ${customScheme}://* 'unsafe-inline' data: https:; style-src ${customScheme}://* 'unsafe-inline' https://fonts.googleapis.com; font-src ${customScheme}://* https://fonts.gstatic.com data:`,
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user