Skip to content

chore: FIT-14: Ensure production deployment of playground is resolvable as a subpath redirect #7595

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 introduces updates to the playground application to adjust its output structure, enhance environment-specific configurations, and improve the Webpack build process. The key changes include modifying the output paths and base hrefs, updating environment variables for standalone modes, and refining Webpack's configuration logic to support the new setup.

Changes to output structure and base hrefs:

  • Updated the outputPath in web/apps/playground/project.json to include a playground-assets subdirectory, and added specific baseHref values for development ("/") and production ("/playground-assets/") environments. [1] [2] [3]

Updates to environment variables and scripts:

  • Changed the MODE environment variable in web/package.json scripts from "standalone" to "standalone-playground", and added a post-build step to move the index.html file to the correct directory.

Refinements to Webpack configuration:

  • Modified Webpack's optimizer and entry logic to use process.env.MODE.startsWith("standalone") instead of strict equality checks, ensuring compatibility with the new standalone-playground mode. [1] [2]
  • Adjusted the publicPath in Webpack's output configuration to dynamically set the path based on whether the mode is standalone-playground.
  • Updated the devServer configuration in Webpack to handle standalone modes using a more flexible condition.

@bmartel bmartel requested a review from a team as a code owner May 22, 2025 16:14
Copy link

netlify bot commented May 22, 2025

Deploy Preview for label-studio-docs-new-theme ready!

Name Link
🔨 Latest commit ade5bd0
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/682f4d73e229d60008128478
😎 Deploy Preview https://deploy-preview-7595--label-studio-docs-new-theme.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.

Copy link

netlify bot commented May 22, 2025

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit ade5bd0
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/682f4d73ab95f100083dd47a
😎 Deploy Preview https://deploy-preview-7595--heartex-docs.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.

Copy link

netlify bot commented May 22, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit ade5bd0
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/682f4d731c26940008601d0e
😎 Deploy Preview https://deploy-preview-7595--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 ade5bd0
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/682f4d7386f05c0008b0bf71
😎 Deploy Preview https://deploy-preview-7595--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 443d65c into develop May 22, 2025
43 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.

2 participants