Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hannoeru committed May 4, 2021
1 parent 3a11def commit b7eb57c
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,34 @@ $ npm install -D vite-plugin-pages

Add to your `vite.config.js`:

Vue:

```js
import Vue from '@vitejs/plugin-vue';
import Pages from 'vite-plugin-pages';

export default {
plugins: [Vue(), Pages()],
plugins: [
Vue(),
Pages()
]
};
```

React(experimental):

```js
import Vue from '@vitejs/plugin-vue';
import Pages from 'vite-plugin-pages';

export default {
plugins: [
Vue(),
Pages({
extensions: ['tsx', 'jsx'],
react: true
})
]
};
```

Expand Down Expand Up @@ -142,7 +164,8 @@ export default {
- **Type:** `'sync' | 'async' | (filepath: string) => 'sync' | 'async')`
- **Default:**
- Top level index file: `'sync'`, can turn off by option `syncIndex`.
- Others: `'async'`
- Others(Vue): `'async'`
- Others(React): `'sync'`

Import mode can be set to either `async`, `sync`, or a function which returns one of those values.

Expand Down

0 comments on commit b7eb57c

Please sign in to comment.