We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff07e26 commit 48c85e4Copy full SHA for 48c85e4
packages/core/src/plugins/startUrl.ts
@@ -96,7 +96,12 @@ export function pluginStartUrl(): RsbuildPlugin {
96
const config = api.getNormalizedConfig();
97
const { startUrl, beforeStartUrl } = config.dev;
98
const { https } = api.context.devServer || {};
99
- const shouldOpen = Boolean(startUrl);
+
100
+ // Skip open in codesandbox. After being bundled, the `open` package will
101
+ // try to call system xdg-open, which will cause an error on codesandbox.
102
+ // https://github.com/codesandbox/codesandbox-client/issues/6642
103
+ const isCodesandbox = process.env.CSB === 'true';
104
+ const shouldOpen = Boolean(startUrl) && !isCodesandbox;
105
106
if (!shouldOpen) {
107
return;
0 commit comments