| 12345678910111213141516171819 |
- // Packaged-app launcher: point the backend at the bundled VS Code plugins,
- // then boot the real Electron main. In dev (`yarn start`) this file is not
- // used: resourcesPath has no `plugins` sibling and the start script already
- // passes `--plugins` explicitly, so behaviour there is unchanged.
- const path = require('path');
- if (!process.env.THEIA_PLUGINS) {
- try {
- const fs = require('fs');
- const dir = path.join(process.resourcesPath, 'plugins');
- if (fs.existsSync(dir)) {
- process.env.THEIA_PLUGINS = `local-dir:${dir}`;
- }
- } catch {
- // Unexpected layout: fall through to default plugin discovery.
- }
- }
- module.exports = require('./lib/backend/electron-main.js');
|