Skip to content

Commit 30019ef

Browse files
authored
Merge pull request #613 from snoopuppy582/docs/add-webpack-bun-install
docs: add Webpack and Bun setup guides
2 parents 9d8762e + 42db3ae commit 30019ef

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

apps/landing/src/app/(detail)/docs/installation/page.mdx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,47 @@ export default defineConfig({
9494
})
9595
```
9696

97+
### Using Devup UI with Webpack
98+
99+
If you are using Webpack directly, you can install the Webpack plugin.
100+
101+
```bash
102+
npm install @devup-ui/webpack-plugin
103+
```
104+
105+
Add the plugin to your Webpack configuration.
106+
107+
```js
108+
// webpack.config.js
109+
110+
import { DevupUIWebpackPlugin } from '@devup-ui/webpack-plugin'
111+
112+
export default {
113+
plugins: [new DevupUIWebpackPlugin()],
114+
}
115+
```
116+
117+
### Using Devup UI with Bun
118+
119+
If you are using Bun as the bundler, install the Bun plugin with Devup UI.
120+
121+
```bash
122+
bun add @devup-ui/react @devup-ui/bun-plugin
123+
```
124+
125+
Import the plugin before running your Bun build so it can register itself with Bun.
126+
127+
```ts
128+
// build.ts
129+
130+
import '@devup-ui/bun-plugin'
131+
132+
await Bun.build({
133+
entrypoints: ['./src/index.tsx'],
134+
outdir: './dist',
135+
})
136+
```
137+
97138
## Project Examples
98139

99140
- [Next.js Example](https://github.com/dev-five-git/devup-ui/tree/main/apps/next)

apps/landing/src/app/(detail)/docs/quick-start/page.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ npm install @devup-ui/react
1919
npm install @devup-ui/vite-plugin # for Vite
2020
npm install @devup-ui/next-plugin # for Next.js
2121
npm install @devup-ui/rsbuild-plugin # for Rsbuild
22+
npm install @devup-ui/webpack-plugin # for Webpack
23+
24+
# Or use the Bun plugin in Bun projects
25+
bun add @devup-ui/react @devup-ui/bun-plugin
2226
```
2327

2428
## 2. Configure Your Build Tool
@@ -60,6 +64,29 @@ export default defineConfig({
6064
})
6165
```
6266

67+
### Webpack
68+
69+
```js
70+
// webpack.config.js
71+
import { DevupUIWebpackPlugin } from '@devup-ui/webpack-plugin'
72+
73+
export default {
74+
plugins: [new DevupUIWebpackPlugin()],
75+
}
76+
```
77+
78+
### Bun
79+
80+
```ts
81+
// build.ts
82+
import '@devup-ui/bun-plugin'
83+
84+
await Bun.build({
85+
entrypoints: ['./src/index.tsx'],
86+
outdir: './dist',
87+
})
88+
```
89+
6390
## 3. Create Your First Component
6491

6592
```tsx

0 commit comments

Comments
 (0)