Skip to content

Commit 700201b

Browse files
committed
docs: update
1 parent 4e144e6 commit 700201b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ That's it! You can now use Electron in your Vite app ✨
102102

103103
## Flat API
104104

105-
In most cases, it is recommended that you use the simpler `vite-plugin-electron/simple` API. If you know very well how this plugin works or you want to use `vite-plugin-electron` as a secondary encapsulation of low-level API, then the flat API is more suitable for you. It is also simple but more flexible. :)
105+
In most cases, the `vite-plugin-electron/simple` API is recommended. If you know very well how this plugin works or you want to use `vite-plugin-electron` API as a secondary encapsulation of low-level API, then the flat API is more suitable for you. It is also simple but more flexible. :)
106106

107107
The difference compared to the simple API is that it does not identify which entry represents `preload` and the adaptation to preload.
108108

@@ -118,6 +118,12 @@ export default {
118118
}
119119
```
120120

121+
## Flat API vs Simple API
122+
123+
- Simple API is based on the Flat API
124+
- Simple API incluess some Preload scripts preset configs.
125+
- Flat API provides some more general APIs, which you can use for secondary encapsulation, such as [nuxt-electron](https://github.com/caoxiemeihao/nuxt-electron).
126+
121127
## Flat API <sub><sup>(Define)</sup></sub>
122128

123129
`electron(options: ElectronOptions | ElectronOptions[])`

0 commit comments

Comments
 (0)