Skip to content

Fix blank website: migrate from dead CDN deps to bundled React 19 + Firebase 12 + Bootstrap 3#33

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-blank-website-issue
Draft

Fix blank website: migrate from dead CDN deps to bundled React 19 + Firebase 12 + Bootstrap 3#33
Copilot wants to merge 3 commits intomainfrom
copilot/fix-blank-website-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 16, 2026

The site rendered blank because script.js was never built, the Firebase 1.1.3 CDN (cdn.firebase.com) is dead, and script.jsx used React 0.12 APIs (React.createClass, ReactFireMixin, getDOMNode()) that are incompatible with the modern versions already declared in package.json.

Changes

  • script.jsx — Now a thin entry point; all logic split into src/:

    • src/constants.jstypes, nextTypes
    • src/utils.jscursorPos, placeCaretAtEnd
    • src/firebase.js — Firebase app + db initialization
    • src/components/ContentEditable.jsx — cursor-stable rich text input using useLayoutEffect
    • src/components/Line.jsx — single screenplay line with Firebase sync
    • src/components/Nav.jsx — top navigation bar
    • src/components/Home.jsx — landing page
    • src/components/ScriptPage.jsx — script editor (Firebase sync, keyboard handling)
    • src/App.jsx — hash router root
    • All components use React 19 function components with useState, useEffect, useLayoutEffect, useRef, forwardRef, useImperativeHandle, useCallback; Firebase v12 modular SDK; react-router v7
  • index.html — Removed all CDN <script> and <link> tags; JS and CSS are now fully self-hosted bundles (script.js, script.css)

  • package.json — Fixed Bootstrap version from ^5.3.8 to ^3.4.1 to match Bootstrap 3 class names used throughout (glyphicons, navbar-inverse, etc.); added esbuild-sass-plugin devDependency; unified build via node scripts/build.js

  • scripts/build.js — New unified build script using esbuild + esbuild-sass-plugin: bundles JS/JSX, compiles SCSS, and inlines Bootstrap 3 CSS (including glyphicon fonts) into a single script.css output — no CDN dependency

  • .gitignore — Updated to reflect new build artifact names (script.css, fonts/)

Result

Original prompt

website is blank


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

… 7 with esbuild bundler

Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue causing website to appear blank Fix blank website: migrate from dead CDN deps to bundled React 19 + Firebase 12 Mar 16, 2026
Copilot AI requested a review from ProLoser March 16, 2026 02:12
@ProLoser
Copy link
Copy Markdown
Owner

@copilot split the script file up and double check the css

…trap 3 from npm

Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 16, 2026

@copilot split the script file up and double check the css

Done in 288a7d6.

Split: script.jsx is now a thin entry point; all logic lives in src/:

  • src/constants.js, src/utils.js, src/firebase.js
  • src/components/ContentEditable, Line, Nav, Home, ScriptPage
  • src/App.jsx — routing root

CSS fix: Bootstrap was in package.json as v5.3.8 but the app uses Bootstrap 3 class names (glyphicons, navbar-inverse, etc.) while loading v3.4.1 from a CDN. Now Bootstrap 3.4.1 is a proper npm dep bundled via esbuild-sass-plugin — no CDN dependency. script.css (Bootstrap + app SCSS) and glyphicon fonts are output by the build alongside script.js.

Styled home page

Copilot AI changed the title Fix blank website: migrate from dead CDN deps to bundled React 19 + Firebase 12 Fix blank website: migrate from dead CDN deps to bundled React 19 + Firebase 12 + Bootstrap 3 Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants