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 <175728472+Copilot@users.noreply.github.com> * revert copilot suggestion * revert package-lock.json * remove unknown --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
d11bd15d60
commit
fb94d8d3d4
3 files changed
+7
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Fix issues where platform-based content was not displayed correctly.
|
||||
@@ -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),
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in new issue
Block a user