-
-
Notifications
You must be signed in to change notification settings - Fork 371
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Since the release of v8.0.4 (3 days ago), Altair fails to start when loaded via the jsdelivr CDN. The application only displays a white background with the Altair logo. The browser console shows the following errors:
main.js:3 Uncaught SyntaxError: Cannot use import statement outside a module
polyfills.js:3 Uncaught ReferenceError: AltairGraphQL is not defined
(anonymous) @ ui:68
invokeTask @ polyfills.js:3
runTask @ polyfills.js:3
invokeTask @ polyfills.js:3
W @ polyfills.js:3
Y @ polyfills.js:3
ee @ polyfills.js:3
Root Cause Analysis
A brief analysis of the compiled main.js reveals that ES module imports are now present in the build output (e.g., import {...} from '...';), which was not the case in previous versions. Example from current main.js:
// build from path: /altair-static/build/dist/main.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ea87f22c-f7c8-5768-a152-bc1dea1d49ab")}catch(e){}}();
import{a as Hie,b as jie,c as $ie,d as qie,e as Uie,f as Qie,g as Wie,h as Yie,j as Gie,k as Kie} from"./chunk-RU5GXIYR.js";
import{a as WP,b as Zie}from"./chunk-3MPON6KA.js";
import{a as lPe,b as cPe,c as uPe}from"./chunk-FWMULOCB.js";
// ... more imports
These ES module imports cannot be executed directly by browsers without proper module type declarations in the script tags, causing most likely the application to fail to initialize.
Expected Behavior
Altair should load and function correctly when served from the jsdelivr CDN, as it did in versions prior to v8.0.4.
Steps To Reproduce
- Integrate Altair using the dotnet-graphql integration (which uses the latest version from jsdelivr CDN)
- Load the application in a browser
- Observe that only the Altair logo appears on a white background
- Open browser console to see the module import errors
Environment
* OS: Debian Bookworm (12)
* Browsers tested: Chrome, Edge, Firefox (all affected)
* Platform: dotnet-graphql integration / jsdelivr CDN
* Version: v8.0.4
* CDN URL: (jsdelivr CDN - latest: https://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js)
Additional context
There is currently no rollback option available to temporarily use the previous working version. This is a breaking change that affects all users relying on the CDN distribution of Altair.