You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then add it as the *FIRST* plugin in your Vite config:
18
18
19
-
```javascript
19
+
```ts
20
20
import { devtools } from'@tanstack/devtools-vite'
21
21
22
22
exportdefault {
@@ -33,7 +33,7 @@ And you're done!
33
33
34
34
You can configure the devtools plugin by passing options to the `devtools` function:
35
35
36
-
```javascript
36
+
```ts
37
37
import { devtools } from'@tanstack/devtools-vite'
38
38
39
39
exportdefault {
@@ -46,63 +46,95 @@ export default {
46
46
}
47
47
```
48
48
49
-
-`eventBusConfig` - Configuration for the event bus that the devtools use to communicate with the client
49
+
### eventBusConfig
50
50
51
-
```ts
52
-
{
53
-
eventBusConfig: {
54
-
// port to run the event bus on
55
-
port: 1234,
56
-
// console log debug logs or not
57
-
debug: false
58
-
},
59
-
}
60
-
```
51
+
Configuration for the event bus that the devtools use to communicate with the client
61
52
62
-
-`appDir` - The directory where the react router app is located. Defaults to the "./src" relative to where vite.config is being defined.
53
+
```ts
54
+
import { devtools } from'@tanstack/devtools-vite'
63
55
64
-
```javascript
65
-
{
66
-
appDir:'./src',
56
+
exportdefault {
57
+
plugins: [
58
+
devtools({
59
+
eventBusConfig: {
60
+
// port to run the event bus on
61
+
port: 1234,
62
+
// console log debug logs or not
63
+
debug: false
64
+
},
65
+
}),
66
+
// ... rest of your plugins here
67
+
],
67
68
}
69
+
68
70
```
69
71
70
-
-`editor` - The open in editor configuration which has two fields, `name` and `open`,
71
-
`name` is the name of your editor, and `open` is a function that opens the editor with the given file and line number. You can implement your version for your editor as follows:
72
+
### editor
72
73
73
-
> [!IMPORTANT]`editor` is only needed for editors that are NOT VS Code, by default this works OOTB with VS Code.
74
+
The open in editor configuration which has two fields, `name` and `open`,
75
+
`name` is the name of your editor, and `open` is a function that opens the editor with the given file and line number. You can implement your version for your editor as follows:
0 commit comments