DevLog 250415 – The Long Road to gallery3d/

> Log Date: 2025-04-15

Today marks a breakthrough. My 3D gallery is live at arynwood.com/gallery3d — and it works. Finally.

The Original Plan

I started with a simple goal:
Render a 3D scene using Three.js and deploy it via Vite.

I built the scene, got npm run dev working. It looked perfect locally.

But the moment I ran npm run build and pushed it live?
White screen.
Uncaught TypeError: Failed to resolve module specifier "three".

The Problems

Problem 1: "three" module couldn't resolve

Problem 2: JS file 404

Problem 3: CSP blocked everything

Problem 4: CDN quirks

The Fix

I ditched the bundler.

Instead of fighting Vite, I:

  1. Created a simple index.html with <script type="module">
  2. Used main.js with ES module imports directly from CDN
import * as THREE from 'https://esm.sh/three@0.158.0';
import { OrbitControls } from 'https://esm.sh/three@0.158.0/examples/jsm/controls/OrbitControls.js';
  1. Ensured CSP rules allowed loading from https://esm.sh
  2. Moved everything into a single, deployable /gallery3d/ folder

What Worked

Lessons Learned

Next Steps


Built under moonlight, debugged through fire.

Here's a link to the live version: arynwood.com/gallery3d


Back to Arynwood Blog