Opening non-default browser with lite-server in angular2 quick start guide

前端 未结 7 1281
庸人自扰
庸人自扰 2021-02-05 08:14

Having followed the TypeScript version of the Angular 2 Quick Start guide, I was wondering if it is possible, and if so how to configure the lite-server to launch a browser othe

7条回答
  •  醉梦人生
    2021-02-05 08:52

    For Windows (and Mac) newbies (and not so newbies :): Your first impulse may be to look for 'bs-config.json' within your project directory. You won't find it. You need to create a file under the root project directory and name it bs-config.json. Within it you specify the browser of your preference, per the above answer -i.e.,: {"browser": "chrome" }

    The reason being is that file lite-server.js looks for the above config file; if it doesn't find it, it uses lite-server defaults, defaulting Internet Explorer on Windows systems.

提交回复
热议问题