未加星标

Optimization Updates with Nx 7.2

字体大小 | |
[前端(javascript) 所属分类 前端(javascript) | 发布者 店小二03 | 时间 2019 | 作者 红领巾 ] 0人收藏点击收藏
Optimization Updates with Nx7.2

Jason Jean


Optimization Updates with Nx 7.2

This blog is brought to you by Nrwl.io. → Enter to win a ticket to ngAtlanta , with Nrwl’s random ticket draw! :four_leaf_clover::blush:

Nrwl Products : Built By Developers, For Developers. At Nrwl we set out to build tools to make our lives and our enterprise development team’s work easier when developing applications powered by Angular. Our products help you save time and build better software while getting your team on the same page using the same best practices. Learn more at www.nrwl.io/products .

Today, we are happy to announce the release of Nx 7.2 which improves IDE support, dep-graph recalculation, and bundle size!

Nrwl Extensions for Angular (aka Nrwl Nx) is an open source toolkit for enterprise applications, which we developed atNrwl based on our experience working at Google and helping Fortune 500 enterprises build ambitious Angular applications.

In case you are not familiar with it, Nx uses and extends the Angular CLI. You can read thisblog post about Nx 6 and explore our recommendations on leveling up with the Angular CLI and Nx.

Better IDESupport

Different projects within your Nx Workspace may require a different set of typescript configurations. Build tools are already configured separately via tsconfig.app.json , tsconfig.lib.json , and tsconfig.spec.json . However, IDEs do not support any files other than tsconfig.json .

Nx 7.2 adds a tsconfig.json to each project root for the IDE to provide proper intellisense on the project level. This will allow developers to catch more type errors while writing their code. You can still easily configure options throughout the entire workspace by modifying the tsconfig.json at the root of the workspace from which all the new configs inherit.

Incremental Dep Graph Calculation

With Nx 7.2, we have improved how we calculate the dependency graph. Before, when running Nx commands, the dependency graph was recalculated from scratch on any change. Even though this performs reasonably well in most situations, this is fundamentally flawed. With Nx 7.2, recalculation now depends on the number of files changed instead of the number of files in the repository.

Excluding Files from the Dependency Graph

Another optimization we are including into the new release of Nx is the ability to ignore files when recalculating dependency graph. Whereas before Nx would only ignore node_modules directories, Nx 7.2 ignores all files ignored by git.

Smaller BundleSizes!

With Nx 7.2, the bundle size for a brand new project drops significantly from 300KB to 178KB with advanced Typescript features! Existing projects will probably get smaller as well although your results may vary.

Getting started withNx

We encourage you to reviewour documentation to see how to get started with Nx, whether you have an existing Angular Application or are starting a new project. We hope you find it helpful.

How to UpdateNx

Updating Nx can be done with the following commands and will update your dependencies and code to the latest version:

yarn update # Or for NPM npm run update Explore More

A Recap of How Far We Have Come with Nx 7

Nrwl Nx 7.1: HTML Formatting and Improved Flexibility with Nx 7.1

As always, if you’re looking for Angular consulting, training and support, you can find out more about how we work with our clientshere.


Optimization Updates with Nx 7.2

If you liked this, click the :clap: below so other people will see this here on Medium. Follow Jason Jean and @nrwl_io to read more about Angular.

This blog is brought to you by Nrwl.io. → Enter to win a ticket to ngAtlanta , with Nrwl’s random ticket draw! :four_leaf_clover::blush:

本文前端(javascript)相关术语:javascript是什么意思 javascript下载 javascript权威指南 javascript基础教程 javascript 正则表达式 javascript设计模式 javascript高级程序设计 精通javascript javascript教程

代码区博客精选文章
分页:12
转载请注明
本文标题:Optimization Updates with Nx 7.2
本站链接:https://www.codesec.net/view/627917.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 前端(javascript) | 评论(0) | 阅读(31)