build-deploy

Build and deploy the three-ui 3D viewer with Vite TARGET and Vercel routing.

5|Updated May 2, 2026
One-click install
npx skills add https://github.com/nirholas/three-ui --skill build-deploy-nirholas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-deploy
Source: https://github.com/nirholas/three-ui/tree/main/.github/skills/build-deploy
Command: npx skills add https://github.com/nirholas/three-ui --skill build-deploy-nirholas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you build, deploy, and troubleshoot the 3D viewer app so you can reliably publish changes to production and ensure assets, routes, and CORS behave correctly.

Core Features & Use Cases

  • Build for the right target: Switch between the multi-page app and the self-contained agent-3d web component using the TARGET environment variable.
  • Deploy to Vercel with correct routing: Use vercel.json route configuration and environment-aware deployment to keep pages and static files working after release.
  • Fix common production blockers: Diagnose issues involving build failures, port conflicts, CORS errors, and missing assets after deploy.

Quick Start

Tell your AI to help you deploy the viewer to Vercel and verify CORS and asset routes for the three.ws domain.

Frequently Asked Questions about build-deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Vite 3D viewer app to Vercel without breaking static asset routes?

To deploy a Vite 3D viewer to Vercel, use a configured vercel.json to map production routing and serve static assets from the public/ directory, ensuring route patterns match your environment setup.

Why does my WebGL model viewer show missing assets after a production build?

Missing WebGL model viewer assets in production often result from misconfigured route patterns or incorrect static asset serving from the public/ directory during the Vite compilation process.

Can I build a self-contained web component and a multi-page app from the same Vite project?

You can build both a multi-page app and a self-contained agent-3d web component from the same Vite project by switching the TARGET environment variable between TARGET=app and TARGET=lib.

How do I fix CORS errors when publishing a 3D viewer to production?

Fix CORS errors during 3D viewer production publishing by applying a matching cors.json configuration that keeps cross-origin resource sharing policies consistent across your deployment environment.

What is the best way to troubleshoot build failures for a Vite 3D viewer?

The best way to troubleshoot Vite 3D viewer build failures is to verify your TARGET environment variable setup and check for port conflicts or incorrect static asset paths in public/.