Skip to content

Commit 694ef99

Browse files
lpssformspreeclaude
andcommitted
Shorten unpkg CDN URLs to use package-level resolution
The "unpkg" field in package.json already points to dist/global.js, so the explicit path is unnecessary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a835837 commit 694ef99

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Or via CDN (no bundler needed):
5555
};
5656
formspree('initForm', { formElement: '#my-form', formId: 'YOUR_FORM_ID' });
5757
</script>
58-
<script src="https://unpkg.com/@formspree/ajax@1/dist/global.js" defer></script>
58+
<script src="https://unpkg.com/@formspree/ajax@1" defer></script>
5959
```
6060

6161
See the [@formspree/ajax README](./packages/formspree-ajax/README.md) for full documentation.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file simulates loading dist/global.js in the Vite dev environment.
2-
// In production, you'd use: <script src="https://unpkg.com/@formspree/ajax@1/dist/global.js" defer></script>
2+
// In production, you'd use: <script src="https://unpkg.com/@formspree/ajax@1" defer></script>
33
import '@formspree/ajax/global';

examples/ajax-demo/public/index-cdn.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h1>Contact Form <span class="badge">CDN</span></h1>
7171
window.formspree=window.formspree||function(){(formspree.q=formspree.q||[]).push(arguments)};
7272
formspree('initForm', { formElement: '#contact-form', formId: 'YOUR_FORM_ID' });
7373
</script>
74-
<script src="https://unpkg.com/@formspree/ajax@1/dist/global.js" defer></script>
74+
<script src="https://unpkg.com/@formspree/ajax@1" defer></script>
7575
7676
In this Vite demo, global.js is loaded via a module entry that aliases to the source.
7777
-->

packages/formspree-ajax/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ No bundler needed. Add this snippet before the closing `</body>` tag:
2525
};
2626
formspree('initForm', { formElement: '#my-form', formId: 'YOUR_FORM_ID' });
2727
</script>
28-
<script src="https://unpkg.com/@formspree/ajax@1/dist/global.js" defer></script>
28+
<script src="https://unpkg.com/@formspree/ajax@1" defer></script>
2929
```
3030

3131
## Quick Start

0 commit comments

Comments
 (0)