Skip to content

Commit cd9b4fa

Browse files
committed
fix
1 parent 74c75d0 commit cd9b4fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,13 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
258258
},
259259

260260
// @ts-ignore This hook only works in Vite 6
261-
async configEnvironment(_, config, opts) {
261+
async configEnvironment(name, config, opts) {
262262
config.resolve ??= {};
263263
// Emulate Vite default fallback for `resolve.conditions` if not set
264264
if (config.resolve.conditions == null) {
265265
// @ts-ignore These exports only exist in Vite 6
266266
const { defaultClientConditions, defaultServerConditions } = await import('vite');
267-
if (config.consumer === 'client' || opts.isSsrTargetWebworker) {
267+
if (config.consumer === 'client' || name === 'client' || opts.isSsrTargetWebworker) {
268268
config.resolve.conditions = [...defaultClientConditions];
269269
} else {
270270
config.resolve.conditions = [...defaultServerConditions];

0 commit comments

Comments
 (0)