Skip to content

Commit 8e854db

Browse files
committed
docs: vite & rollup
1 parent b196396 commit 8e854db

File tree

4 files changed

+70
-1
lines changed

4 files changed

+70
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## v2.6.0
22

3-
Adds plugins for [vite](vitejs.dev) and [rollup](rollupjs.org)!
3+
Adds plugins for [vite](https://vitejs.dev) and [rollup](https://rollupjs.org)!
44

55
Adds `ac` as an npx alias for `app-config`.
66

docs/.vuepress/config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ module.exports = {
4747
path: '/guide/react-native/',
4848
children: ['/guide/react-native/', '/guide/react-native/example'],
4949
},
50+
{
51+
title: 'Vite',
52+
path: '/guide/vite',
53+
},
54+
{
55+
title: 'Rollup',
56+
path: '/guide/rollup',
57+
},
5058
{
5159
title: 'Deployment',
5260
path: '/guide/deployment/',

docs/guide/rollup.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Rollup Bundler Plugin
3+
---
4+
5+
::: tip Before Reading
6+
Head on over to the [Introduction](../intro/) or [Quick Start](../intro/quick-start) if you haven't already.
7+
:::
8+
9+
The rollup plugin is a separate package, which you'll need to install:
10+
11+
```sh
12+
yarn add -D @app-config/rollup@2
13+
```
14+
15+
Then add it to your `rollup.config.js`:
16+
17+
```javascript
18+
import appConfig from '@app-config/rollup';
19+
20+
export default {
21+
plugins: [appConfig()]
22+
}
23+
```
24+
25+
This will allow you to import `@app-config/main` from your application, with all
26+
filesystem and other Node.js code stripped out.
27+
28+
```javascript
29+
import config from '@app-config/main';
30+
```

docs/guide/vite.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Vite Bundler Plugin
3+
---
4+
5+
::: tip Before Reading
6+
Head on over to the [Introduction](../intro/) or [Quick Start](../intro/quick-start) if you haven't already.
7+
:::
8+
9+
The vite plugin is a separate package, which you'll need to install:
10+
11+
```sh
12+
yarn add -D @app-config/vite@2
13+
```
14+
15+
Then add it to your `vite.config.js`:
16+
17+
```javascript
18+
import appConfig from '@app-config/vite';
19+
20+
// https://vitejs.dev/config/
21+
export default {
22+
plugins: [appConfig()]
23+
}
24+
```
25+
26+
This will allow you to import `@app-config/main` from your application, with all
27+
filesystem and other Node.js code stripped out.
28+
29+
```javascript
30+
import config from '@app-config/main';
31+
```

0 commit comments

Comments
 (0)