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 1 year has passed since last update.

Vue CLIプロジェクトの開発サーバのポート番号を変更する

Posted at

Vue CLIプロジェクトの開発サーバのポート番号はデフォルトでは"8080"になります。
このポート番号を変更するには、vue.config.jsに開発サーバのポート番号を設定します。

【変更前】

vue.config.js
const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true
})

【追記情報】8081に指定

  devServer: {
    port: 8081,
    host: 'localhost'
  }

【変更後】

vue.config.js
const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 8081,
    host: 'localhost'
  }
})

スクリーンショット 2022-08-29 13.25.10.png
スクリーンショット 2022-08-29 13.26.17.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?