Skip to content

Commit 405d3ab

Browse files
committed
Add vanilla extract
1 parent 649c9c1 commit 405d3ab

File tree

19 files changed

+389
-11
lines changed

19 files changed

+389
-11
lines changed

benchmark.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ function clearBuildFile() {
99
recursive: true,
1010
force: true,
1111
})
12+
if (existsSync('./benchmark/next-vanilla-extract/.next'))
13+
rmSync('./benchmark/next-vanilla-extract/.next', {
14+
recursive: true,
15+
force: true,
16+
})
1217
if (existsSync('./benchmark/next-tailwind/.next'))
1318
rmSync('./benchmark/next-tailwind/.next', {
1419
recursive: true,
@@ -94,6 +99,7 @@ let result = []
9499

95100
result.push(benchmark('tailwind'))
96101
result.push(benchmark('stylex'))
102+
result.push(benchmark('vanilla-extract'))
97103
result.push(benchmark('kuma-ui'))
98104
result.push(benchmark('panda-css'))
99105
result.push(benchmark('chakra-ui'))

benchmark/next-mui/next.config.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
export default {
2-
experimental: {
3-
optimizePackageImports: ['@chakra-ui/react'],
4-
},
5-
}
1+
export default {}

benchmark/next-mui/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export default function HomePage() {
1818
</p>
1919
<Box
2020
component="section"
21+
data-testid="box"
2122
sx={{
2223
color,
2324
cursor: 'pointer',
24-
dataTestId: 'box',
2525
fontSize: 32,
2626
position: 'relative',
2727
py: '28px',
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
export default {
2-
experimental: {
3-
optimizePackageImports: ['@chakra-ui/react'],
4-
},
5-
}
1+
export default {}
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createVanillaExtractPlugin } from '@vanilla-extract/next-plugin'
2+
3+
const withVanillaExtract = createVanillaExtractPlugin()
4+
5+
export default withVanillaExtract({})
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "next-vanilla-extract-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": "next lint"
11+
},
12+
"dependencies": {
13+
"@vanilla-extract/css": "^1.17.4",
14+
"next": "^15.5.3",
15+
"react": "^19.1.1",
16+
"react-dom": "^19.1.1",
17+
"react-icons": "^5.5.0"
18+
},
19+
"devDependencies": {
20+
"@types/node": "^24",
21+
"@types/react": "^19",
22+
"@types/react-dom": "^19",
23+
"typescript": "^5",
24+
"@vanilla-extract/next-plugin": "^2.4.14"
25+
}
26+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)