本地运行:
npm run electron:start
运行后项目请求地址为:
- const {
- protocol
- } = require('electron');
- app.commandLine.appendSwitch('--ignore-certificate-errors', 'true');
- // Scheme must be registered before the app is ready
- protocol.registerSchemesAsPrivileged([
- { scheme: 'app', privileges: { secure: true, standard: true } },
- ]);