0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Viteを使ってReactの新規プロジェクトを作成する方法

Posted at

1. Viteのプロジェクト作成コマンドを実行

まず、Viteを使って新しいReactプロジェクトを作成します。
ターミナルを開いて、以下のコマンドを実行してください。

npm create vite@latest my-react-app --template react

my-react-app の部分はプロジェクトの名前で、自由に変更できます。


2. プロジェクトディレクトリに移動

プロジェクトが作成されたら、そのディレクトリに移動します。

cd my-react-app

3. 依存関係のインストール

プロジェクトのディレクトリに移動したら、依存関係をインストールします。

npm install

4. 開発サーバーを起動

依存関係のインストールが完了したら、開発サーバーを起動してプロジェクトを確認します。

npm run dev

ブラウザで http://localhost:5173 を開くと、Reactの新しいプロジェクトが表示されます。

これでViteを使ったReactのプロジェクト作成が完了です。必要に応じて、追加の設定や依存関係をインストールしてカスタマイズしてください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?