如何在没有浏览器同步的情况下提供angular2应用 [英] How to serve angular2 app without browsersync

查看:97
本文介绍了如何在没有浏览器同步的情况下提供angular2应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 package.json 中,我具有以下内容:

In my package.json I have the following:

...
"scripts": {
        "tsc": "tsc",
        "tsc:w": "tsc -w --outDir build",
        "lite": "lite-server",
        "start": "concurrent \"npm run tsc:w\" \"npm run lite\" "
    },
...

,我想知道如何使用" npm production "或类似的东西启动应用程序?

and I was wondering how could I start the app using "npm production" or something similar?

我想阻止浏览器同步运行:我只是尝试了多个用户,很高兴看到他们正在滚动一个".跨不同的浏览器也会发生这种情况(但不能使用不同的标签).

I'd want to prevent browsersync from running: I just tried with multiple users and it was hilarious to see that they were scrolling "as one". This also happens accross different browsers (but not using different tabs).

推荐答案

您可以使用服务而不是lite-server.

You could use serve instead of lite-server.

这篇关于如何在没有浏览器同步的情况下提供angular2应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆