Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Vitest config is dropped when test.server.deps.external already lists solid-js

オープン 初心者向け
#454 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@RaphaelFakhri がすでに取り組んでいます。

2026年10月19日 から。

  • #455 @RaphaelFakhri による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript, vite
領域
testing

調査の方向性

src/index.ts から始めて、...(test.server ? { test } : {}) 周辺の設定マージを読み、issue に記載された next ブランチの動作と比較してください。既存の Vitest 設定テストを確認するか、solid-js がすでに列挙されている状態で test.server.deps.external を使った再現を追加してください。どちらの場合も、解決後の設定に environment: 'jsdom' と jest-dom のセットアップファイルが引き続き含まれていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

On the 2.x line (main), vite-plugin-solid returns its test config only when it also sets test.server. If the user config already has solid-js in test.server.deps.external, the plugin does not set test.server, so it also drops test.environment = 'jsdom' and the @testing-library/jest-dom setup file.

Reproduction

// vitest.config.ts
import { defineConfig } from 'vitest/config';
import solid from 'vite-plugin-solid';

export default defineConfig({
  plugins: [solid()],
  test: { server: { deps: { external: [/solid-js/] } } },
});

The resolved Vitest config has no environment and no jest-dom setup file, so tests run in the default node environment, where DOM APIs such as document are not defined. Without the server.deps.external entry, the plugin sets both.

Expected behavior

The plugin sets the jsdom environment and the jest-dom setup file whether or not solid-js is already external. The next branch already does this (Object.keys(test).length ? { test } : {}).

Cause

Introduced in #183: ...(test.server ? { test } : {}) in src/index.ts.

主要言語
TypeScript
スター
522
フォーク
73
平均マージ
1日 8時間
マージ済み PR(30日)
31

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

solidjs/solid-vite-plugin のほかの issue

solidjs/solid-vite-plugin の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。