diff --git a/packages/core/src/generators/hyperframes.ts b/packages/core/src/generators/hyperframes.ts index 68307921b..f8da4e69c 100644 --- a/packages/core/src/generators/hyperframes.ts +++ b/packages/core/src/generators/hyperframes.ts @@ -7,7 +7,12 @@ import { } from "../core.types"; import type { GsapAnimation } from "../parsers/gsapParser"; import { serializeGsapAnimations, keyframesToGsapAnimations } from "../parsers/gsapParser"; -import { GSAP_CDN, BASE_STYLES, ZOOM_CONTAINER_STYLES } from "../templates/constants"; +import { + GSAP_CDN, + MOTIONPATH_CDN, + BASE_STYLES, + ZOOM_CONTAINER_STYLES, +} from "../templates/constants"; const GOOGLE_FONTS_BASE = "https://fonts.googleapis.com/css2"; const FONT_WEIGHTS: Record = { @@ -337,6 +342,10 @@ export function generateHyperframesHtml( : ""; const gsapCdnTag = includeScripts ? ` ` : ""; + const motionPathCdnTag = + includeScripts && gsapScript && /motionPath\s*[:{]/.test(gsapScript) + ? `\n ` + : ""; const gsapScriptTag = includeScripts ? `