作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
背景
为了加快我的 angular 7 应用程序的感知性能,我正在尝试向我的应用程序添加一个应用程序外壳,并使用 angular universal 预渲染该外壳。为此,我正在关注这些 steps .
问题
当我从上面的链接(ng run my-app:app-shell
)执行步骤 3 的命令时,该过程失败,因为看起来 angular universal 正在尝试构建我的整个应用程序使用节点环境,并且我的应用程序的某些部分与 Angular 通用不兼容。我不需要渲染整个应用程序或与 angular universal 兼容,只需要应用程序外壳组件。
问题
ng run my-app:app-shell
命令期间只包含要预呈现的应用程序外壳?最佳答案
回答你的第二个问题。我在这里找到了答案: https://github.com/angular/angular-cli/issues/11478#issuecomment-423825620
ng run my-app:app-shell -c production
关于 Angular 通用 : How to create an app shell and only pre-render the shell?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54069219/
我是一名优秀的程序员,十分优秀!