diff --git a/src/components/Header.vue b/src/components/Header.vue index 60407b3..6ac820e 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -34,6 +34,14 @@ async function fetchVersions() { majorMinorSet.add(majorMinor); return true }); + // Opt-in: surface the latest v5 alpha (npm `alpha` dist-tag). It loads the + // dev browser bundle (dist/less-browser-dev.js, window.less) — see fetchLess. + // Alphas published before that file existed will 404 and show the load tip. + // Kept out of the default so stable (`latest`) stays the landing version. + const alpha = data.tags?.alpha; + if (alpha && !publishedVersions.includes(alpha)) { + publishedVersions.unshift(alpha); + } // Default to the npm `latest` dist-tag (stable, currently 4.x), never a prerelease. const latest = data.tags?.latest; const defaultVersion = (latest && publishedVersions.includes(latest)) @@ -49,7 +57,12 @@ async function fetchVersions() { function fetchLess() { emit("upLoadingLessJS"); - const url = baseVersionUrl + activeVersion; + // v5 alpha (any prerelease) ships only a Node/CJS default entry; a browser + //