electrobun 1.7.0-beta.1 → 1.8.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -151,6 +151,21 @@ export interface ElectrobunConfig {
151
151
  */
152
152
  defaultRenderer?: "native" | "cef";
153
153
 
154
+ /**
155
+ * Custom Chromium command-line flags to pass to CEF during initialization.
156
+ * Keys are flag names without the "--" prefix.
157
+ * Use `true` for switch-only flags, or a string for flags that take a value.
158
+ *
159
+ * @example
160
+ * ```typescript
161
+ * chromiumFlags: {
162
+ * "disable-gpu": true, // --disable-gpu
163
+ * "remote-debugging-port": "9333", // --remote-debugging-port=9333
164
+ * }
165
+ * ```
166
+ */
167
+ chromiumFlags?: Record<string, string | true>;
168
+
154
169
  /**
155
170
  * macOS entitlements for code signing
156
171
  */
@@ -179,6 +194,21 @@ export interface ElectrobunConfig {
179
194
  */
180
195
  defaultRenderer?: "native" | "cef";
181
196
 
197
+ /**
198
+ * Custom Chromium command-line flags to pass to CEF during initialization.
199
+ * Keys are flag names without the "--" prefix.
200
+ * Use `true` for switch-only flags, or a string for flags that take a value.
201
+ *
202
+ * @example
203
+ * ```typescript
204
+ * chromiumFlags: {
205
+ * "disable-gpu": true, // --disable-gpu
206
+ * "remote-debugging-port": "9333", // --remote-debugging-port=9333
207
+ * }
208
+ * ```
209
+ */
210
+ chromiumFlags?: Record<string, string | true>;
211
+
182
212
  /**
183
213
  * Path to application icon (.ico format)
184
214
  * Used for the installer/extractor wrapper, desktop shortcuts, and taskbar
@@ -205,6 +235,21 @@ export interface ElectrobunConfig {
205
235
  */
206
236
  defaultRenderer?: "native" | "cef";
207
237
 
238
+ /**
239
+ * Custom Chromium command-line flags to pass to CEF during initialization.
240
+ * Keys are flag names without the "--" prefix.
241
+ * Use `true` for switch-only flags, or a string for flags that take a value.
242
+ *
243
+ * @example
244
+ * ```typescript
245
+ * chromiumFlags: {
246
+ * "disable-gpu": true, // --disable-gpu
247
+ * "remote-debugging-port": "9333", // --remote-debugging-port=9333
248
+ * }
249
+ * ```
250
+ */
251
+ chromiumFlags?: Record<string, string | true>;
252
+
208
253
  /**
209
254
  * Path to application icon (PNG format recommended)
210
255
  * Used for desktop entries, window icons, and taskbar
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "1.7.0-beta.1",
3
+ "version": "1.8.0-beta.0",
4
4
  "description": "Build ultra fast, tiny, and cross-platform desktop apps with Typescript.",
5
5
  "license": "MIT",
6
6
  "author": "Blackboard Technologies Inc.",
package/src/cli/index.ts CHANGED
@@ -2721,10 +2721,20 @@ ${schemesXml}
2721
2721
 
2722
2722
  const bundlesCEF = platformConfig?.bundleCEF ?? false;
2723
2723
 
2724
- const buildJsonContent = JSON.stringify({
2724
+ const buildJsonObj: Record<string, unknown> = {
2725
2725
  defaultRenderer: platformConfig?.defaultRenderer ?? "native",
2726
2726
  availableRenderers: bundlesCEF ? ["native", "cef"] : ["native"],
2727
- });
2727
+ };
2728
+
2729
+ // Include chromiumFlags only if the developer defined them
2730
+ if (
2731
+ platformConfig?.chromiumFlags &&
2732
+ Object.keys(platformConfig.chromiumFlags).length > 0
2733
+ ) {
2734
+ buildJsonObj.chromiumFlags = platformConfig.chromiumFlags;
2735
+ }
2736
+
2737
+ const buildJsonContent = JSON.stringify(buildJsonObj);
2728
2738
 
2729
2739
  await Bun.write(
2730
2740
  join(appBundleFolderResourcesPath, "build.json"),