Skip to content

Commit 8c2b974

Browse files
Ashna AryaAshna Arya
authored andcommitted
Instruct users to create a project with Vite not CRA
1 parent 2d08ac6 commit 8c2b974

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,42 +67,54 @@ While you are not required to use React for your plugin, it must be written in
6767
Javascript and React is recommended. We support both a standard Javascript API
6868
and a React Hooks API.
6969

70-
#### Create a Project with React
70+
#### Create a Project with Vite
71+
72+
NOTE: Facebook's [create-react-app](https://github.com/facebook/create-react-app) breaks with React 19 (see https://github.com/facebook/create-react-app/issues/17004).
73+
74+
You should use [vite](https://github.com/vitejs/vite) instead to create custom plugins.
7175

7276
1. Open your terminal and navigate to the directory you want to create your
7377
project in.
74-
2. Create your new project. We recommend using Facebook’s
75-
[`create-react-app`](https://create-react-app.dev/).
78+
2. Create your new project. We recommend using
79+
[`create-vite`](https://www.npmjs.com/package/create-vite).
7680

7781
```sh
78-
npx create-react-app <my-cool-plugin>
82+
yarn create vite <my-cool-plugin>
83+
# or
84+
npm create vite@latest <my-cool-plugin>
7985
```
8086

81-
3. Navigate to the project's main directory.
87+
3. Then follow the prompts! You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite + Vue project, run:
88+
89+
```sh
90+
yarn create vite my-vue-app --template vue
91+
```
92+
93+
4. Navigate to the project's main directory.
8294

8395
```sh
8496
cd <my-cool-plugin>
8597
```
8698

87-
4. Use your package manager to install Sigma’s plugin library. We recommend
99+
5. Use your package manager to install Sigma’s plugin library. We recommend
88100
using `yarn`.
89101

90102
```sh
91103
yarn add @sigmacomputing/plugin
92104
```
93105

94-
5. Spin up your local development server.
106+
6. Spin up your local development server.
95107

96108
```sh
97-
yarn && yarn start
109+
yarn && yarn dev
98110
```
99111

100-
6. Start developing:
112+
7. Start developing:
101113

102114
- Get started with Sigma’s Plugin APIs.
103115
- Test your plugin directly in a Sigma workbook using the Sigma Plugin Dev
104116
Playground.
105-
- By default, Create React App dev servers run on http://localhost:3000.
117+
- By default, Vite dev servers run on http://localhost:5173.
106118

107119
## Testing your Plugin
108120

0 commit comments

Comments
 (0)