Attach CDN-hosted libraries to a script and load them before your code runs.
When a script needs a library (GSAP, Swiper, a date picker), add it as a dependency instead of pasting another embed into Webflow. Cairn loads dependencies before your script runs.
Adding a library
Open Dependencies from the script editor and paste either a full <script> tag or a bare CDN URL. Cairn pulls out the URL and asks for:
Name: a label, just for you (e.g. GSAP).
Global (optional): the global variable the library exposes (e.g. gsap). Recording it documents what your script can rely on once the dependency has loaded.
The CDN allowlist
A dependency can point at any https link. Cairn recognizes the common package CDNs and loads them without comment (including subdomains):
Host
Typical use
jsdelivr.net
npm & GitHub packages
unpkg.com
npm packages
esm.sh
npm packages as ES modules
cdnjs.cloudflare.com
popular libraries
skypack.dev
npm packages as ES modules
jspm.io
npm packages as ES modules
code.jquery.com
jQuery
fonts.googleapis.com / fonts.gstatic.com
Google Fonts
ajax.googleapis.com
Google-hosted libraries
Loading from other sources
You are not limited to that list. Some libraries live on their own domain rather than a package CDN. Vimeo’s player is a good example: you load it from https://player.vimeo.com/api/player.js, which is perfectly safe but isn’t one of the hosts above.When you paste a source Cairn doesn’t recognize, you’ll see a small note rather than an error. It’s a nudge, not a block: the library still saves and loads. We show it because a dependency runs for every visitor on every matching page, so it’s worth a moment to confirm you trust where the file comes from. If it’s the library’s official site or a service you already use, you’re good to go.Cairn only asks that the link is https. A plain http link is refused, because it won’t load on a secure site anyway.
Pin dependency versions in the URL (/gsap@3.12.5/) rather than using
@latest or an unversioned path. Unpinned URLs can change behavior on your
live site without any publish from you.
Imports inside your code
Neither the dependency list nor import statements in your own code are blocked by this check. It’s your code on your site. The editor simply flags when a source is untrusted (a host Cairn doesn’t recognize) or unpinned (no version), so you can decide with eyes open. See ES modules.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cairn Script","description":"Cairn Script — Custom JS \u0026 CSS delivery for Webflow sites.","colors":{"primary":"#0C4A3D","light":"#1f8a72","dark":"#0C4A3D"},"logo":{"light":"https://mintcdn.com/goodcraft/sv0kEoYLauAJLKao/logo/light.svg?fit=max\u0026auto=format\u0026n=sv0kEoYLauAJLKao\u0026q=85\u0026s=5caa63c37c1a1f526887865ef59d5374","dark":"https://mintcdn.com/goodcraft/sv0kEoYLauAJLKao/logo/dark.svg?fit=max\u0026auto=format\u0026n=sv0kEoYLauAJLKao\u0026q=85\u0026s=3c251ec00a9bb3e2e715b670c9e68aee","href":"https://cairnscript.com"},"favicon":"https://mintcdn.com/goodcraft/sv0kEoYLauAJLKao/favicon.svg?fit=max\u0026auto=format\u0026n=sv0kEoYLauAJLKao\u0026q=85\u0026s=fb8c04c787c2386c274534576f00990d","background":{"color":{"light":"#FFFFFF","dark":"#1A1612"}},"navbar":{"links":[{"href":"https://cairnscript.com","label":"Marketing site"}],"primary":{"type":"button","label":"Open Cairn","href":"https://app.cairnscript.com"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Open the app","icon":"arrow-up-right-from-square","href":"https://app.cairnscript.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"goodcraft","hasAudioNarration":false,"actualSubdomain":"goodcraft","customDomains":["docs.cairnscript.com"],"gitSource":{"type":"github","owner":"goodcraft-io","repo":"cairn","deployBranch":"production","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"edits":false,"thumbs":true,"issues":false},"entitlements":{},"buildId":"6ae944b8de475e071fc63a8c:success","clientVersion":"0.0.4138","searchFilterCounts":[{"language":"default","tag":"Guides","count":14},{"language":"default","tag":"Essentials","count":4},{"language":"default","tag":"Delivery","count":3},{"language":"default","tag":"Library","count":3},{"language":"default","tag":"Getting started","count":2},{"language":"default","tag":"Workspaces","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"essentials/dependencies","slug":"/essentials/dependencies","pageMetadata":{"title":"Dependencies","description":"Attach CDN-hosted libraries to a script and load them before your code runs.","href":"/essentials/dependencies"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Attach CDN-hosted libraries to a script and load them before your code runs.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Table,Tip}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`When a script needs a library (GSAP, Swiper, a date picker), add it as a `,_jsx(_components.strong,{children:`dependency`}),` instead of pasting another embed into Webflow. Cairn loads dependencies before your script runs.`]}),`\n`,_jsx(Heading,{level:`2`,id:`adding-a-library`,children:`Adding a library`}),`\n`,_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`Dependencies`}),` from the script editor and paste either a full `,_jsx(_components.code,{children:`\u003cscript>`}),` tag or a bare CDN URL. Cairn pulls out the URL and asks for:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: a label, just for you (e.g. `,_jsx(_components.code,{children:`GSAP`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Global`}),` (optional): the global variable the library exposes (e.g. `,_jsx(_components.code,{children:`gsap`}),`). Recording it documents what your script can rely on once the dependency has loaded.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-cdn-allowlist`,children:`The CDN allowlist`}),`\n`,_jsxs(_components.p,{children:[`A dependency can point at any `,_jsx(_components.code,{children:`https`}),` link. Cairn recognizes the common package CDNs and loads them without comment (including subdomains):`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Host`}),_jsx(_components.th,{children:`Typical use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`jsdelivr.net`})}),_jsx(_components.td,{children:`npm \u0026 GitHub packages`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unpkg.com`})}),_jsx(_components.td,{children:`npm packages`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`esm.sh`})}),_jsx(_components.td,{children:`npm packages as ES modules`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cdnjs.cloudflare.com`})}),_jsx(_components.td,{children:`popular libraries`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`skypack.dev`})}),_jsx(_components.td,{children:`npm packages as ES modules`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`jspm.io`})}),_jsx(_components.td,{children:`npm packages as ES modules`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`code.jquery.com`})}),_jsx(_components.td,{children:`jQuery`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fonts.googleapis.com`}),` / `,_jsx(_components.code,{children:`fonts.gstatic.com`})]}),_jsx(_components.td,{children:`Google Fonts`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ajax.googleapis.com`})}),_jsx(_components.td,{children:`Google-hosted libraries`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`loading-from-other-sources`,children:`Loading from other sources`}),`\n`,_jsxs(_components.p,{children:[`You are not limited to that list. Some libraries live on their own domain rather than a package CDN. Vimeo’s player is a good example: you load it from `,_jsx(_components.code,{children:`https://player.vimeo.com/api/player.js`}),`, which is perfectly safe but isn’t one of the hosts above.`]}),`\n`,_jsx(_components.p,{children:`When you paste a source Cairn doesn’t recognize, you’ll see a small note rather than an error. It’s a nudge, not a block: the library still saves and loads. We show it because a dependency runs for every visitor on every matching page, so it’s worth a moment to confirm you trust where the file comes from. If it’s the library’s official site or a service you already use, you’re good to go.`}),`\n`,_jsxs(_components.p,{children:[`Cairn only asks that the link is `,_jsx(_components.code,{children:`https`}),`. A plain `,_jsx(_components.code,{children:`http`}),` link is refused, because it won’t load on a secure site anyway.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Pin dependency versions in the URL (`,_jsx(_components.code,{children:`/gsap@3.12.5/`}),`) rather than using\n`,_jsx(_components.code,{children:`@latest`}),` or an unversioned path. Unpinned URLs can change behavior on your\nlive site without any publish from you.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`imports-inside-your-code`,children:`Imports inside your code`}),`\n`,_jsxs(_components.p,{children:[`Neither the dependency list nor `,_jsx(_components.code,{children:`import`}),` statements in your own code are blocked by this check. It’s your code on your site. The editor simply flags when a source is `,_jsx(_components.strong,{children:`untrusted`}),` (a host Cairn doesn’t recognize) or `,_jsx(_components.strong,{children:`unpinned`}),` (no version), so you can decide with eyes open. See `,_jsx(_components.a,{href:`/essentials/modules#runtime-import-warnings`,children:`ES modules`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Dependencies","description":"Attach CDN-hosted libraries to a script and load them before your code runs.","href":"/essentials/dependencies"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Adding a library","slug":"adding-a-library","depth":2,"children":[]},{"title":"The CDN allowlist","slug":"the-cdn-allowlist","depth":2,"children":[{"title":"Loading from other sources","slug":"loading-from-other-sources","depth":3,"children":[]}]},{"title":"Imports inside your code","slug":"imports-inside-your-code","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"goodcraft","siteName":"Cairn Script","title":"Dependencies - Cairn Script","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-02T04:24:58.792Z","originalFileLocation":"essentials/dependencies.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Attach CDN-hosted libraries to a script and load them before your code runs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cairn Script\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Dependencies - Cairn Script\">\u003cmeta data-mint-head property=\"og:description\" content=\"Attach CDN-hosted libraries to a script and load them before your code runs.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cairn Script\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cairnscript.com/essentials/dependencies\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://goodcraft.mintlify.site/_mintlify/api/og/v2?division=Delivery\u0026amp;title=Dependencies\u0026amp;description=Attach+CDN-hosted+libraries+to+a+script+and+load+them+before+your+code+runs.\u0026amp;theme=20da72d3d9c0acbe053087c3\u0026amp;signature=0582d22f5f00c3d1a84d30c187805f5584d1bb34505f32272034c2e3488aae5f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Dependencies - Cairn Script\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Attach CDN-hosted libraries to a script and load them before your code runs.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://goodcraft.mintlify.site/_mintlify/api/og/v2?division=Delivery\u0026amp;title=Dependencies\u0026amp;description=Attach+CDN-hosted+libraries+to+a+script+and+load+them+before+your+code+runs.\u0026amp;theme=20da72d3d9c0acbe053087c3\u0026amp;signature=0582d22f5f00c3d1a84d30c187805f5584d1bb34505f32272034c2e3488aae5f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/goodcraft/QJc1_5HiqkFhPRcY/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cairn Script\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0C4A3D\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cairnscript.com/essentials/dependencies\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/essentials/dependencies.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cairnscript.com/#organization\",\"name\":\"Cairn Script\",\"url\":\"https://docs.cairnscript.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/goodcraft/sv0kEoYLauAJLKao/logo/light.svg?fit=max\u0026auto=format\u0026n=sv0kEoYLauAJLKao\u0026q=85\u0026s=5caa63c37c1a1f526887865ef59d5374\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cairnscript.com#website\",\"name\":\"Cairn Script\",\"url\":\"https://docs.cairnscript.com\",\"publisher\":{\"@id\":\"https://docs.cairnscript.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cairnscript.com/essentials/dependencies#webpage\",\"url\":\"https://docs.cairnscript.com/essentials/dependencies\",\"name\":\"Dependencies\",\"description\":\"Attach CDN-hosted libraries to a script and load them before your code runs.\",\"dateModified\":\"2026-07-02T04:24:58.792Z\",\"isPartOf\":{\"@id\":\"https://docs.cairnscript.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cairnscript.com/essentials/dependencies#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cairnscript.com/essentials/dependencies#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Cairn Script\",\"item\":\"https://docs.cairnscript.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dependencies\",\"item\":\"https://docs.cairnscript.com/essentials/dependencies\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cairnscript.com/essentials/dependencies#article\",\"headline\":\"Dependencies\",\"name\":\"Dependencies\",\"description\":\"Attach CDN-hosted libraries to a script and load them before your code runs.\",\"url\":\"https://docs.cairnscript.com/essentials/dependencies\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cairnscript.com/essentials/dependencies#webpage\"},\"dateModified\":\"2026-07-02T04:24:58.792Z\",\"publisher\":{\"@id\":\"https://docs.cairnscript.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cairnscript.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cairn Script\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cairn Script\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/essentials/dependencies.md","siteName":"Cairn Script","nav":{"global":{"anchors":[{"anchor":"Open the app","icon":"arrow-up-right-from-square","href":"https://app.cairnscript.com"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Essentials","pages":[{"title":"Install the loader","href":"/essentials/install-loader"},{"title":"Scripts","href":"/essentials/scripts"},{"title":"Scope \u0026 loading","href":"/essentials/scope"},{"title":"Versions","description":"Every save is a version. Diff, restore, audit.","href":"/essentials/versions"}]},{"group":"Delivery","pages":[{"title":"Dependencies","href":"/essentials/dependencies"},{"title":"ES modules","description":"How Cairn decides between classic scripts and ES modules, and what changes when a script is a module.","href":"/essentials/modules"},{"title":"Staging \u0026 production","href":"/essentials/staging"}]},{"group":"Library","pages":[{"title":"Snippets","href":"/library/snippets"},{"title":"Blocks","href":"/library/blocks"},{"title":"Kits","href":"/library/kits"}]},{"group":"Workspaces","pages":[{"title":"Teams","href":"/workspaces/teams"},{"title":"Billing","href":"/workspaces/billing"}]}]}]},"basePath":"","title":"Dependencies - Cairn Script","buildId":"dpl_715YoAgvjTGBDdo8RtXmHKM22b5p","deploymentId":"dpl_715YoAgvjTGBDdo8RtXmHKM22b5p","dynamics":[],"chunks":[]}