Selaa lähdekoodia

fix: expose process.platform in webview build configuration (#8201)

* fix(webview): expose process.platform in build configuration

Add process.platform to Vite and Storybook define configs to make
platform detection available in the webview UI code.

* Add changeset

* Update webview-ui/vite.config.ts

Co-authored-by: Copilot <[email protected]>

* revert copilot suggestion

* revert package-lock.json

* remove unknown

---------

Co-authored-by: Copilot <[email protected]>
Bee 2 viikkoa sitten
vanhempi
sitoutus
fb94d8d3d4

+ 5 - 0
.changeset/fair-islands-throw.md

@@ -0,0 +1,5 @@
+---
+"claude-dev": patch
+---
+
+Fix issues where platform-based content was not displayed correctly.

+ 1 - 0
webview-ui/.storybook/main.ts

@@ -8,6 +8,7 @@ const config: StorybookConfig = {
 		// Define environment variables for Storybook
 		config.define = {
 			...config.define,
+			"process.platform": JSON.stringify(process?.platform),
 			"process.env": {
 				...process.env,
 				IS_DEV: JSON.stringify(true),

+ 1 - 0
webview-ui/vite.config.ts

@@ -113,6 +113,7 @@ export default defineConfig({
 	define: {
 		__PLATFORM__: JSON.stringify(platform),
 		process: JSON.stringify({
+			platform: JSON.stringify(process?.platform),
 			env: {
 				NODE_ENV: JSON.stringify(process?.env?.IS_DEV ? "development" : "production"),
 				CLINE_ENVIRONMENT: JSON.stringify(process?.env?.CLINE_ENVIRONMENT ?? "production"),