Making an interactive spline scene work in hydrogen deploying on oxygen

Topic summary

A developer is encountering a critical deployment failure when trying to integrate an interactive Spline 3D scene into a Hydrogen website on Oxygen. The implementation works locally using @splinetool/react-spline and the local Oxygen environment, but fails during production deployment with an “EvalError: Code generation from strings disallowed” error.

Key Technical Details:

  • Error occurs at build time on Oxygen (production)
  • No issues in local development environment
  • Goal is programmatic interaction with Spline objects (e.g., click detection)

Current Status:

  • Developer questions Hydrogen’s claimed “runtime parity” between local and production environments
  • Considering rebuilding the entire application in a different framework
  • Seeking alternative approaches or workarounds from the community

The discussion remains open with no resolution yet.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

I have been struggling relentlessly to find a solution or workaround to the problem of implementing my spline scene into my hydrogen website in a way that lets me programmatically interact with the scene in hydrogen. For example, being able to see if a specific object in the scene has been clicked.

This is typically possible through a spline code export and use of splinetool/react-spline, which works with the local mini-oxygen environment. However, when deploying to oxygen, the build fails with:

│  Uncaught Error: EvalError: Code generation from strings disallowed for      │
│  this context                                                                │
│    at worker.mjs:10716:2892 in I                                             │
│    at worker.mjs:10716:3184                                                  │
│    at worker.mjs:10716:3567                                                  │
│    at worker.mjs:10702:29161                                                 │
│    at worker.mjs:10716:11348

This is my first time developing with hydrogen and I’m a bit let down by the claim of runtime parity. There were no issues in the local oxygen environment. Had I known that i’d hit this issue when I came to deployment, I would have used a different framework.

Sorry to moan, just been grinding against this issue for days. Curious if anyone has encountered something similar or has insight into alternative approaches before I end up rebuilding my whole application in a different framework.