Skip to content

Commit

Permalink
add configuration for vite react-wsc (#2320)
Browse files Browse the repository at this point in the history
* add configuration for vite react-wsc

* Update website/src/pages/index.js

Co-authored-by: Stephen Zhou <[email protected]>

* cleanup

---------

Co-authored-by: Stephen Zhou <[email protected]>
Co-authored-by: Sophia Michelle Andren <[email protected]>
  • Loading branch information
3 people authored Jan 23, 2024
1 parent b5c3808 commit e6b3e88
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,22 @@ experimental: {
"presets": ["next/babel"],
"plugins": ["jotai/babel/plugin-react-refresh"]
}
`}</Code>
<h3>Vite (SWC)</h3>
<Code language="bash">{`# npm
npm install --save-dev @swc-jotai/react-refresh
# vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
export default defineConfig({
plugins: [
react({
plugins: [['@swc-jotai/react-refresh', {}]],
}),
],
});
`}</Code>
<h3>Gatsby (Babel)</h3>
<Code language="bash">{`# npm
Expand Down

1 comment on commit e6b3e88

@vercel
Copy link

@vercel vercel bot commented on e6b3e88 Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.