Skip to content

chore: FIT-14: Fix webpack build for standalone apps #7596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025

Conversation

bmartel
Copy link
Contributor

@bmartel bmartel commented May 22, 2025

This pull request updates the webpack.config.js file to handle cases where the MODE environment variable might be undefined. The changes ensure safer access to process.env.MODE by using optional chaining (?.).

Improvements to environment variable handling:

  • Updated the condition in the optimizer function to use process.env.MODE?.startsWith("standalone"), preventing potential runtime errors if MODE is undefined. ([web/webpack.config.jsL68-R68](https://github.com/HumanSignal/label-studio/pull/7596/files#diff-1ace8d4ea714744aae05de2cab449346ded75cf8646e36fcd8eb5d1cd66f4d03L68-R68))
  • Modified the entry point configuration in the composePlugins section to safely check if process.env.MODE starts with "standalone" using optional chaining. ([web/webpack.config.jsL87-R87](https://github.com/HumanSignal/label-studio/pull/7596/files#diff-1ace8d4ea714744aae05de2cab449346ded75cf8646e36fcd8eb5d1cd66f4d03L87-R87))
  • Adjusted the devServer configuration to use optional chaining for the process.env.MODE.startsWith("standalone") condition, ensuring robust handling of undefined values. ([web/webpack.config.jsL273-R273](https://github.com/HumanSignal/label-studio/pull/7596/files#diff-1ace8d4ea714744aae05de2cab449346ded75cf8646e36fcd8eb5d1cd66f4d03L273-R273))

Copy link

netlify bot commented May 22, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 8254539
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/682f59be956f6f00083e36ec

Copy link

netlify bot commented May 22, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 8254539
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/682f59be85f59f00081a9bc0

Copy link

netlify bot commented May 22, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 8254539
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/682f59be29f7b700084c4083
😎 Deploy Preview https://deploy-preview-7596--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the chore label May 22, 2025
Copy link

netlify bot commented May 22, 2025

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit 8254539
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/682f59be3cdca100081f0d80
😎 Deploy Preview https://deploy-preview-7596--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bmartel bmartel merged commit 1a98a33 into develop May 22, 2025
32 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant