Skip to content

Commit e4d230c

Browse files
authored
Update swc_core to v38 (#411)
1 parent 0c9f995 commit e4d230c

File tree

10 files changed

+2371
-2097
lines changed

10 files changed

+2371
-2097
lines changed

.changeset/easy-lies-feel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"yak-swc": major
3+
---
4+
5+
Add support for next.js >= 15.4.4

packages/docs/content/docs/getting-started.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Next.js's built-in CSS configuration.
1414

1515
| next-yak | Next.js | react | swc_core |
1616
|------------------|-----------------|------------------|------------------|
17+
| 7.x | >= 15.4.4 | 19.x | 38.0.1 |
1718
| 6.x | >= 15.4.1 | 19.x | 27.0.6 |
1819
| 5.x | >= 15.2.1 | 19.x | 16.0.0 |
1920
| 4.x | >= 15.0.4 | 19.x | 5.0.1 |
@@ -32,37 +33,37 @@ Install next-yak dependency using your favorite package manager.
3233
<Tabs items={['npm', 'pnpm', 'yarn', 'bun']}>
3334
<Tab value="npm">
3435
```bash
35-
# For Next.js >= 15.2.1
36+
# For Next.js >= 15.4.4
3637
npm i next-yak@latest
3738

38-
# For Next.js 14.x
39+
# For other next.js versions use a specific version
3940
npm i next-yak@2
4041
```
4142
</Tab>
4243
<Tab value="pnpm">
4344
```bash
44-
# For Next.js >= 15.2.1
45+
# For Next.js >= 15.4.4
4546
pnpm i next-yak@latest
4647

47-
# For Next.js 14.x
48+
# For other next.js versions use a specific version
4849
pnpm i next-yak@2
4950
```
5051
</Tab>
5152
<Tab value="yarn">
5253
```bash
53-
# For Next.js >= 15.2.1
54+
# For Next.js >= 15.4.4
5455
yarn i next-yak@latest
5556

56-
# For Next.js 14.x
57+
# For other next.js versions use a specific version
5758
yarn i next-yak@2
5859
```
5960
</Tab>
6061
<Tab value="bun">
6162
```bash
62-
# For Next.js >= 15.2.1
63+
# For Next.js >= 15.4.4
6364
bun i next-yak@latest
6465

65-
# For Next.js 14.x
66+
# For other next.js versions use a specific version
6667
bun i next-yak@2
6768
```
6869
</Tab>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare module "@swc/helpers/_/_interop_require_wildcard";
2+
declare module "@swc/helpers/_/_interop_require_default";

packages/docs/lib/transformation/useTranspile.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { ReactNode, useCallback, useEffect, useRef, useState } from "react";
33
import { executeCode } from "./execute-code";
44
import * as React from "react";
55
import * as NextYakInternal from "next-yak/internal";
6+
import * as HelpersWildcard from "@swc/helpers/_/_interop_require_wildcard";
7+
import * as HelpersDefault from "@swc/helpers/_/_interop_require_default";
68

79
type File = {
810
name: string;
@@ -82,6 +84,8 @@ export const useTranspile = (
8284
}),
8385
{} as any,
8486
),
87+
"@swc/helpers/_/_interop_require_wildcard": HelpersWildcard,
88+
"@swc/helpers/_/_interop_require_default": HelpersDefault,
8589
});
8690

8791
if (!result) {

packages/docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"yak-swc": "workspace:*"
4242
},
4343
"devDependencies": {
44+
"@swc/helpers": "catalog:dev",
4445
"@tailwindcss/postcss": "catalog:dev",
4546
"@types/mdx": "catalog:dev",
4647
"@types/node": "catalog:dev",

0 commit comments

Comments
 (0)