File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -258,13 +258,13 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
258
258
} ,
259
259
260
260
// @ts -ignore This hook only works in Vite 6
261
- async configEnvironment ( _ , config , opts ) {
261
+ async configEnvironment ( name , config , opts ) {
262
262
config . resolve ??= { } ;
263
263
// Emulate Vite default fallback for `resolve.conditions` if not set
264
264
if ( config . resolve . conditions == null ) {
265
265
// @ts -ignore These exports only exist in Vite 6
266
266
const { defaultClientConditions, defaultServerConditions } = await import ( 'vite' ) ;
267
- if ( config . consumer === 'client' || opts . isSsrTargetWebworker ) {
267
+ if ( config . consumer === 'client' || name === 'client' || opts . isSsrTargetWebworker ) {
268
268
config . resolve . conditions = [ ...defaultClientConditions ] ;
269
269
} else {
270
270
config . resolve . conditions = [ ...defaultServerConditions ] ;
You can’t perform that action at this time.
0 commit comments