Polaris react design is broken in production

Topic summary

A developer is experiencing styling issues with Shopify Polaris React components when deploying to production, while the design renders correctly in development mode.

Technical Setup:

  • Using PHP Laravel with Polaris React
  • Build process involves running npm run build and composer build commands
  • Production deployment uses specific Shopify API key configuration

Current Status:

  • Visual comparison shows broken styling in production versus proper rendering in development
  • Another user is attempting to diagnose the scope of the issue by asking whether the problem affects only the Primary button component or extends to other Polaris components as well
  • The root cause has not yet been identified, and the discussion remains open for troubleshooting
Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

Polaris design is broken after build it to production.
Please see the second picture in our development.
Why is that ?
I am using Php laravel with polaris react . and for production I am using this below bash code.

cd web/frontend
SHOPIFY_API_KEY=REPLACE_ME npm run build
cd ..
composer build

This is in dev mode

moshiurse_0-1703659287462.png

This is in Production mode

Is this issue only happening for the Primary button, or for other components too?