如何让包裹在我选择的特定浏览器中打开?

How do you get parcel to open in a specific browser of my choice?

我的包裹打包器在默认的 MS edge 中打开,但我希望它在 firefox 中打开本地主机。

都适用于 Win10 和 Linux Ubuntu 20.04。如果您已 parcel 全局安装

在您的根项目文件夹中输入命令(终端)

 parcel --open firefox index.html

如果您在本地安装了 parcel,那么请更改您的 package.json

"scripts": {
    "dev": "parcel --open firefox index.html",
    "prod": "parcel build index.html"
  },

然后在终端中点击 npm run dev 你完成了! :-) 祝你好运,致以最诚挚的问候;-)