You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/UPGRADE_V1_TO_V2.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,3 +2,51 @@
2
2
3
3
Upgrading your vue-stripe-js from v1 to v2.
4
4
5
+
Vue Stripe.js v2.0.0 is a major update that makes changes in default choices due to Stripe.js evolution. It was designed with stability in mind. Your upgrade should be smooth and simple.
6
+
7
+
## Breaking changes
8
+
9
+
ES module is the de-facto standard. Vite is expected to drop commonjs support in 2025. Don't upgrade if you use "require" instead of "import".
10
+
11
+
- added npm type module
12
+
- removed commonjs export
13
+
14
+
## Features
15
+
- Backward-compatible, old implementations should work seamlessly
16
+
- Payment Element is the new default
17
+
- Better TypeScript support
18
+
- Added new examples for Payment, Card, and Express Checkout
19
+
20
+
## Upgrade
21
+
22
+
### Install new version
23
+
```bash
24
+
npm install vue-stripe-js@latest
25
+
```
26
+
27
+
Test your integration. Major upgrade is finished 🎉
28
+
29
+
## Optional changes
30
+
31
+
### Provide explicit type to StripeElement
32
+
33
+
```diff
34
+
<StripeElements>
35
+
- <StripeElement />
36
+
+ <StripeElement type="card" />
37
+
</StripeElements>
38
+
```
39
+
40
+
### Remove slot props
41
+
Not needed thanks to provide/inject behind the hood
0 commit comments