Skip to content

Commit

Permalink
docs: Add defineConfig import in features.md (#5318)
Browse files Browse the repository at this point in the history
Show that `defineConfig` needs to be imported from `vite` in order for the examples shown to work.
  • Loading branch information
MananTank committed Oct 16, 2021
1 parent 8ce2ea1 commit 9dbf20b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/guide/features.md
Expand Up @@ -108,6 +108,8 @@ If not using JSX with React or Vue, custom `jsxFactory` and `jsxFragment` can be

```js
// vite.config.js
import { defineConfig } from 'vite'

export default defineConfig({
esbuild: {
jsxFactory: 'h',
Expand All @@ -122,6 +124,8 @@ You can inject the JSX helpers using `jsxInject` (which is a Vite-only option) t

```js
// vite.config.js
import { defineConfig } from 'vite'

export default defineConfig({
esbuild: {
jsxInject: `import React from 'react'`
Expand Down

0 comments on commit 9dbf20b

Please sign in to comment.