Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/tired-berries-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@devup-ui/webpack-plugin': patch
'@devup-ui/next-plugin': patch
---

Support Turbopack
39 changes: 34 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,43 @@ on:
- main
permissions: write-all

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cargo tarpaulin and fmt
run: |
cargo install cargo-tarpaulin
rustup component add rustfmt clippy
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version: 22
cache: 'pnpm'
- run: pnpm i
- run: pnpm build
- name: Benchmark
run: pnpm benchmark

publish:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -54,8 +85,6 @@ jobs:
cargo fmt
pnpm test
rm -rf .rustfmt.toml
- name: Benchmark
run: pnpm benchmark
- name: Build Landing
run: |
pnpm -F components build-storybook
Expand Down
4 changes: 1 addition & 3 deletions apps/landing/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import { DevupUI } from '@devup-ui/next-plugin'
import createMDX from '@next/mdx'

const withMDX = createMDX({
// options: {
// remarkPlugins: [remarkGfm],
// },
extension: /\.mdx?$/,
})

export default withMDX(
DevupUI({
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
output: 'export',
reactCompiler: true,
}),
)
9 changes: 5 additions & 4 deletions apps/landing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "node ./script.js && next dev",
"search": "node ./script.js",
"build": "node ./script.js && next build --webpack",
"build": "node ./script.js && next build",
"start": "npx serve ./out",
"lint": "eslint"
},
Expand All @@ -19,21 +19,22 @@
"@next/mdx": "^16.0",
"body-scroll-lock": "3.1",
"clsx": "^2.1",
"lenis": "1.3",
"next": "^16.0",
"react": "^19.2",
"react-dom": "^19.2",
"react-markdown": "^10.1",
"react-syntax-highlighter": "^15.6",
"lenis": "1.3"
"react-syntax-highlighter": "^15.6"
},
"devDependencies": {
"@types/mdx": "^2.0",
"@devup-ui/next-plugin": "workspace:*",
"@types/body-scroll-lock": "^3.1",
"@types/mdx": "^2.0",
"@types/node": "^24",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/react-syntax-highlighter": "^15.5",
"babel-plugin-react-compiler": "^1.0",
"typescript": "^5"
}
}
8 changes: 6 additions & 2 deletions apps/landing/src/app/(detail)/docs/RightIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ export function RightIndex() {
Contents
</Text>
</Flex>
{menus.map((menu) => (
<IndexMenu key={menu.text} onClick={menu.onClick} sub={menu.sub}>
{menus.map((menu, idx) => (
<IndexMenu
key={menu.text + idx}
onClick={menu.onClick}
sub={menu.sub}
>
{menu.text}
</IndexMenu>
))}
Expand Down
6 changes: 3 additions & 3 deletions apps/landing/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export const metadata: Metadata = {
resetCss()

globalCss({
pre: {
borderRadius: '10px',
},
fontFaces: [
{
fontFamily: 'Pretendard',
Expand Down Expand Up @@ -85,9 +88,6 @@ globalCss({
lineHeight: '1.5',
letterSpacing: '-0.03em',
},
pre: {
borderRadius: '10px',
},
})

export default function RootLayout({
Expand Down
18 changes: 18 additions & 0 deletions benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ function clearBuildFile() {
recursive: true,
force: true,
})
if (existsSync('./benchmark/next-tailwind-turbo/.next'))
rmSync('./benchmark/next-tailwind-turbo/.next', {
recursive: true,
force: true,
})

if (existsSync('./benchmark/next-devup-ui-single-turbo/.next'))
rmSync('./benchmark/next-devup-ui-single-turbo/.next', {
recursive: true,
force: true,
})
if (existsSync('./benchmark/next-devup-ui-single-turbo/df'))
rmSync('./benchmark/next-devup-ui-single-turbo/df', {
recursive: true,
force: true,
})
}

function checkDirSize(path) {
Expand Down Expand Up @@ -106,5 +122,7 @@ result.push(benchmark('chakra-ui'))
result.push(benchmark('mui'))
result.push(benchmark('devup-ui'))
result.push(benchmark('devup-ui-single'))
result.push(benchmark('tailwind-turbo'))
result.push(benchmark('devup-ui-single-turbo'))

console.info(result.join('\n'))
5 changes: 3 additions & 2 deletions benchmark/next-chakra-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react-jsx",
"incremental": true,
"plugins": [
{
Expand All @@ -27,7 +27,8 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"df/*.d.ts"
"df/*.d.ts",
".next/dev/types/**/*.ts"
],
"exclude": ["node_modules"]
}
41 changes: 41 additions & 0 deletions benchmark/next-devup-ui-single-turbo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
1 change: 1 addition & 0 deletions benchmark/next-devup-ui-single-turbo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Nextjs App
7 changes: 7 additions & 0 deletions benchmark/next-devup-ui-single-turbo/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { DevupUI } from '@devup-ui/next-plugin'

const nextConfig = {
/* config options here */
}

export default DevupUI(nextConfig, { singleCss: true })
25 changes: 25 additions & 0 deletions benchmark/next-devup-ui-single-turbo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "next-devup-ui-single-turbo-benchmark",
"version": "0.1.0",
"type": "module",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build --experimental-debug-memory-usage",
"start": "next start",
"lint": "eslint"
},
"dependencies": {
"react": "^19.2",
"react-dom": "^19.2",
"next": "^16.0",
"@devup-ui/react": "workspace:*"
},
"devDependencies": {
"@devup-ui/next-plugin": "workspace:*",
"typescript": "^5",
"@types/node": "^24",
"@types/react": "^19",
"@types/react-dom": "^19"
}
}
1 change: 1 addition & 0 deletions benchmark/next-devup-ui-single-turbo/public/file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions benchmark/next-devup-ui-single-turbo/public/globe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions benchmark/next-devup-ui-single-turbo/public/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions benchmark/next-devup-ui-single-turbo/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions benchmark/next-devup-ui-single-turbo/public/window.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
18 changes: 18 additions & 0 deletions benchmark/next-devup-ui-single-turbo/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Metadata } from 'next'

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
51 changes: 51 additions & 0 deletions benchmark/next-devup-ui-single-turbo/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
'use client'

import { Box, Text } from '@devup-ui/react'
import { useState } from 'react'

export default function HomePage() {
const [color, setColor] = useState('yellow')
const [enabled, setEnabled] = useState(false)

return (
<div>
<p
style={{
backgroundColor: 'blue',
}}
>
Track & field champions:
</p>
<Box
_hover={{
bg: 'yellow',
cursor: 'cell',
}}
as="section"
bg="$text"
color={color}
cursor="pointer"
data-testid="box"
fontSize={32}
position="relative"
py="28px"
>
<Box>hello</Box>
<Box>hello</Box>
</Box>
<Text color="$text">text</Text>
<Box color={enabled ? 'green' : 'blue'} fontSize={32} pr="20px">
hello
</Box>
<Box fontSize={[12, 32]}>hello</Box>
<button
onClick={() => {
setColor('blue')
setEnabled((prev) => !prev)
}}
>
Change
</button>
</div>
)
}
34 changes: 34 additions & 0 deletions benchmark/next-devup-ui-single-turbo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"df/*.d.ts",
".next/dev/types/**/*.ts"
],
"exclude": ["node_modules"]
}
Loading