From 6152e15e10d34b98d6ce64ff5b33a0e775e68fad Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 13 Oct 2021 17:30:13 -0400 Subject: [PATCH] fix esm links --- docs/assets/plugins/code-block/code-block.js | 2 +- docs/assets/plugins/metadata/metadata.js | 2 +- docs/getting-started/installation.md | 2 +- docs/resources/changelog.md | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/assets/plugins/code-block/code-block.js b/docs/assets/plugins/code-block/code-block.js index 2f757742e..b9143df3d 100644 --- a/docs/assets/plugins/code-block/code-block.js +++ b/docs/assets/plugins/code-block/code-block.js @@ -165,7 +165,7 @@ js_module: true, html: `\n` + - `\n` + + `\n` + `\n` + html, css: `body {\n font: 16px sans-serif;\n}`, diff --git a/docs/assets/plugins/metadata/metadata.js b/docs/assets/plugins/metadata/metadata.js index c693281c6..04f2d1989 100644 --- a/docs/assets/plugins/metadata/metadata.js +++ b/docs/assets/plugins/metadata/metadata.js @@ -467,7 +467,7 @@ To import this component from [the CDN](https://www.jsdelivr.com/package/npm/@shoelace-style/shoelace): \`\`\`js - import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@${metadata.package.version}/${component.path}'; + import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@${metadata.package.version}/${component.path}/+esm'; \`\`\` diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 8f1b6ac9c..913ab0904 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -79,7 +79,7 @@ However, if you're [cherry picking](#cherry-picking) or [bundling](#bundling) Sh The previous approach is the _easiest_ way to load Shoelace, but easy isn't always efficient. You'll incur the full size of the library even if you only use a handful of components. This is convenient for prototyping, but may result in longer load times in production. To improve this, you can cherry pick the components you need. -Cherry picking can be done from your local install or [directly from the CDN](https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/). This will limit the number of files the browser has to download and reduce the amount of bytes being transferred. The disadvantage is that you need to load and register each component manually. +Cherry picking can be done from your local install or [directly from the CDN](https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/). This will limit the number of files the browser has to download and reduce the amount of bytes being transferred. The disadvantage is that you need to load component manually. Here's an example that loads only the button component. Again, if you're not using a module resolver, you'll need to adjust the path to point to the folder Shoelace is in. diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index b3b16c793..c6b792497 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -6,6 +6,10 @@ Components with the Experimental badge _During the beta period, these restrictions may be relaxed in the event of a mission-critical bug._ 🐛 +## 2.0.0-beta.57 + +- Fix CodePen links and CDN links + ## 2.0.0-beta.56 This release is the second attempt at unbundling dependencies. This will be a breaking change only if your configuration _does not_ support bare module specifiers. CDN users and bundler users will be unaffected, but note the URLs for modules on the CDN must have the `/+esm` now.