Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the app to centralize CDN/module loading and introduces a build pipeline that can generate a production import map (via JSPM) or run in direct-CDN mode.
Changes:
- Added
src/cdn.js+src/bootstrap.jsto manage CDN providers, fallbacks, and modulepreload behavior. - Updated
src/app.jsto import runtime modules via the new CDN loader with fallback support (including optional style compiler loading). - Added build scripts (
scripts/build-prepare.js,scripts/build-importmap.js) and updated CI/deploy workflows to builddist.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles.css | Quote/style normalization for consistency. |
| src/index.html | Removes inline import map, switches entrypoint to bootstrap.js. |
| src/cdn.js | New CDN provider registry + import candidate resolution + fallback importing. |
| src/bootstrap.js | Adds modulepreload injection and bootstraps app.js. |
| src/app.js | Migrates runtime imports to CDN loader + improves error surfacing for missing exports. |
| scripts/build-prepare.js | Creates dist, injects runtime CDN selection, generates prod-imports.js. |
| scripts/build-importmap.js | Runs jspm link to inject an import map (importMap mode only). |
| package.json / package-lock.json | Adds build scripts + jspm; updates lint target and Prettier config. |
| docs/build-and-deploy.md | Documents build modes and deployment approach. |
| .oxlintrc.json | Enables import plugin and import rules; updates ignore patterns. |
| .gitignore | Ignores dist/. |
| .github/workflows/ci.yml | Adds npm run build to CI. |
| .github/workflows/deploy.yml | Switches Pages artifact to dist and builds via build:esm. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a centralized CDN resolution layer and a build pipeline that produces a dist/ output (optionally with a JSPM-generated import map), replacing the previous inline import map + direct CDN imports approach.
Changes:
- Added a CDN provider abstraction (
src/cdn.js) with primary/fallback resolution and runtime import helpers. - Added
bootstrap.js+ refactoredapp.jsto load runtime modules via CDN fallback instead of hardcoded URLs / inline import maps. - Added build scripts/workflows to generate
dist/and (in import-map mode) runjspm linkto inject an import map intodist/index.html.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles.css | Quote/style normalization in CSS strings/selectors. |
| src/index.html | Removes inline import map; switches entrypoint to bootstrap.js. |
| src/cdn.js | New CDN provider/spec registry + URL/candidate resolution + fallback importing. |
| src/bootstrap.js | Adds modulepreload generation (non-importMap mode) then loads app.js. |
| src/app.js | Refactors runtime/compiler loading to use cdnImports + fallback importing. |
| scripts/build-prepare.js | Creates dist/, generates prod-imports.js, injects primary CDN selection into HTML. |
| scripts/build-importmap.js | Runs jspm link to inject an import map into dist/index.html (importMap mode only). |
| package.json / package-lock.json | Adds build scripts and jspm devDependency; updates lint script scope. |
| docs/build-and-deploy.md | New build/deploy documentation for the new pipeline/modes. |
| .oxlintrc.json | Enables import plugin + rules; expands ignore patterns. |
| .gitignore | Ignores dist/. |
| .github/workflows/deploy.yml | Switches GitHub Pages deploy artifact to dist/ and adds build step. |
| .github/workflows/ci.yml | Adds build step after lint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.