File tree 3 files changed +12
-1
lines changed
packages/vite-plugin-checker/src
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -57,5 +57,11 @@ Shared configuration to control the checker behaviors of the plugin.
57
57
* @defaultValue `true`
58
58
*/
59
59
enableBuild : boolean
60
+
61
+ /**
62
+ * Configure root directory of checkers
63
+ * @defaultValue no default value
64
+ */
65
+ root ?: boolean ;
60
66
}
61
67
```
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ export function checker(userConfig: UserPluginConfig): Plugin {
175
175
// Get the server instance and keep reference in a closure
176
176
checkers . forEach ( ( checker , index ) => {
177
177
const { worker, configureServer : workerConfigureServer } = checker . serve
178
- workerConfigureServer ( { root : server . config . root } )
178
+ workerConfigureServer ( { root : userConfig . root || server . config . root } )
179
179
worker . on ( 'message' , ( action : Action ) => {
180
180
if ( action . type === ACTION_TYPES . overlayError ) {
181
181
latestOverlayErrors [ index ] = action . payload as ClientDiagnosticPayload
Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ export interface SharedConfig {
160
160
* @defaultValue `true`
161
161
*/
162
162
enableBuild : boolean
163
+ /**
164
+ * Configure root directory of checkers
165
+ * @defaultValue no default value
166
+ */
167
+ root ?: string
163
168
}
164
169
165
170
export interface BuildInCheckers {
You can’t perform that action at this time.
0 commit comments