Skip to content

Commit a8a110a

Browse files
committed
Support Turbopack
1 parent 0b7d5b2 commit a8a110a

File tree

42 files changed

+444
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+444
-26
lines changed

.changeset/tired-berries-wonder.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@devup-ui/webpack-plugin': patch
3+
'@devup-ui/next-plugin': patch
4+
---
5+
6+
Support Turbopack

.github/workflows/publish.yml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,43 @@ on:
99
- main
1010
permissions: write-all
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: false
15+
1216
jobs:
17+
benchmark:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- uses: actions-rust-lang/setup-rust-toolchain@v1
24+
- name: Cargo tarpaulin and fmt
25+
run: |
26+
cargo install cargo-tarpaulin
27+
rustup component add rustfmt clippy
28+
- uses: pnpm/action-setup@v4
29+
name: Install pnpm
30+
with:
31+
run_install: false
32+
33+
- uses: jetli/[email protected]
34+
with:
35+
version: 'latest'
36+
- name: Install Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
registry-url: "https://registry.npmjs.org"
40+
node-version: 22
41+
cache: 'pnpm'
42+
- run: pnpm i
43+
- run: pnpm build
44+
- name: Benchmark
45+
run: pnpm benchmark
46+
1347
publish:
1448
runs-on: ubuntu-latest
15-
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref }}
17-
cancel-in-progress: false
1849
steps:
1950
- name: Checkout
2051
uses: actions/checkout@v4
@@ -54,8 +85,6 @@ jobs:
5485
cargo fmt
5586
pnpm test
5687
rm -rf .rustfmt.toml
57-
- name: Benchmark
58-
run: pnpm benchmark
5988
- name: Build Landing
6089
run: |
6190
pnpm -F components build-storybook

benchmark.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ function clearBuildFile() {
5959
recursive: true,
6060
force: true,
6161
})
62+
if (existsSync('./benchmark/next-tailwind-turbo/.next'))
63+
rmSync('./benchmark/next-tailwind-turbo/.next', {
64+
recursive: true,
65+
force: true,
66+
})
67+
68+
if (existsSync('./benchmark/next-devup-ui-single-turbo/.next'))
69+
rmSync('./benchmark/next-devup-ui-single-turbo/.next', {
70+
recursive: true,
71+
force: true,
72+
})
73+
if (existsSync('./benchmark/next-devup-ui-single-turbo/df'))
74+
rmSync('./benchmark/next-devup-ui-single-turbo/df', {
75+
recursive: true,
76+
force: true,
77+
})
6278
}
6379

6480
function checkDirSize(path) {
@@ -106,5 +122,7 @@ result.push(benchmark('chakra-ui'))
106122
result.push(benchmark('mui'))
107123
result.push(benchmark('devup-ui'))
108124
result.push(benchmark('devup-ui-single'))
125+
result.push(benchmark('tailwind-turbo'))
126+
result.push(benchmark('devup-ui-single-turbo'))
109127

110128
console.info(result.join('\n'))

benchmark/next-chakra-ui/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"moduleResolution": "bundler",
1212
"resolveJsonModule": true,
1313
"isolatedModules": true,
14-
"jsx": "preserve",
14+
"jsx": "react-jsx",
1515
"incremental": true,
1616
"plugins": [
1717
{
@@ -27,7 +27,8 @@
2727
"**/*.ts",
2828
"**/*.tsx",
2929
".next/types/**/*.ts",
30-
"df/*.d.ts"
30+
"df/*.d.ts",
31+
".next/dev/types/**/*.ts"
3132
],
3233
"exclude": ["node_modules"]
3334
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## Nextjs App
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { DevupUI } from '@devup-ui/next-plugin'
2+
3+
const nextConfig = {
4+
/* config options here */
5+
}
6+
7+
export default DevupUI(nextConfig, { singleCss: true })
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "next-devup-ui-single-turbo-benchmark",
3+
"version": "0.1.0",
4+
"type": "module",
5+
"private": true,
6+
"scripts": {
7+
"dev": "next dev",
8+
"build": "next build --experimental-debug-memory-usage",
9+
"start": "next start",
10+
"lint": "eslint"
11+
},
12+
"dependencies": {
13+
"react": "^19.2",
14+
"react-dom": "^19.2",
15+
"next": "^16.0",
16+
"@devup-ui/react": "workspace:*"
17+
},
18+
"devDependencies": {
19+
"@devup-ui/next-plugin": "workspace:*",
20+
"typescript": "^5",
21+
"@types/node": "^24",
22+
"@types/react": "^19",
23+
"@types/react-dom": "^19"
24+
}
25+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)