0

如何在 vs 代码中设置本地服务器设置路径。现在我变得像这样http://localhost:8080/但我想要http://localhost/myproject/index.html它有时看起来像http://localhost/myproject/)。现在它在 Chrome 中打开,但我想设置 Firefox。

包.json

{
 "name": "TS",
 "version": "1.0.0",
 "description": "demo project.",
 "scripts": {
 "lite": "lite-server --port 8080",
 "start": "npm run lite"
 },
 "author": "",
 "license": "ISC",
 "devDependencies": {
 "lite-server": "^1.3.1"
 } 
 }

任务.json

   {
   // See https://go.microsoft.com/fwlink/?LinkId=733558
   // for the documentation about the tasks.json format
   "version": "2.0.0",
   "tasks": [
    {
        "type": "npm",
        "script": "lite",
        "group": {
            "kind": "build",
            "isDefault": true
        }
    },
    {
        "type": "npm",
        "script": "start",
        "problemMatcher": []
    }
]
    }
4

1 回答 1

0

VSC 将打开您的默认浏览器。只需将 Firefox 设置为默认值

于 2017-12-25T16:31:56.283 回答