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?

More than 5 years have passed since last update.

VSCode:LiveServer:Multi-root Workspacesでのrootの設定

Last updated at Posted at 2020-06-23

0. 前提

  • Multi-root Workspaceで、1つのWorkspace内に複数のプロジェクトフォルダを格納している。

  • 例えば、以下のように、フロントとバックのプロジェクトフォルダをworkspaceフォルダに格納。(以下では、ビルドフォルダは非表示設定にしている。)

image.png

  • [ワークスペース名].code-workspaceファイルには以下のようにプロジェクトフォルダを記述。

image.png

1.Muti Root Workspac内の対象となるプロジェクトフォルダ名設定

  • 「File > Preference > workspace > settings」を開く。
  • Muti-root Workspace内で、LiveServerで表示したいソースがあるプロジェクトディレクトリ名を記入。

image.png

2.プロジェクト内のrootディレクトリを設定

  • settingsの「Root」セクションの「Edit in settings.json」をクリック。

image.png

  • 「liveServer.settings.root」にプロジェクトディレクトリをトップとして、サーバのRootディレクトリを設定する。

image.png

image.png

  • 上記で設定したフォルダをルートとしてサーバが起動する。

以上

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?