
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
This is the optimization package. As any optimization, it should be take with care,with measuring results before and after applying.
If you have Single Page application, you, probably, don't' want to block loading your application with synchronous scripts. To help with this defer and async tags appeared. But what if you use cli for generating output? Right now, no @angular/cli, no react, doesn't support adding asynchronous attributes out of the box. This tiny CLI parse your index.html file and adds defer attribute to your scripts tag
Just check lighthouse reports. Left side - before, right - after. All comparisons were done on default applications produced by the corresponding cli without any additional optimization/changes.
(v. 7.3.8)
Check these two image from the lighthouse. Nothing was done except deferify. Looks better, yeah?
Lighthouse reports: before, after
(v. 16.8.6)
Lighthouse reports: before, after
All comparisons were done 21.04.2019 and may vary depending on your conditions.
Right now, adding defer attribute to the hello-world VUE application demonstrate a slightly negative impact or no impact. This shows that all performance tunings should be carefully measured before going to the prod.
Install deferify
npm i --save-dev deferify
Add it to your build process:
"build:prod" : "ng build --prod && deferify"
Deferify will scan your dist folder and all it's subfolders for all index.html files and tries to update them. Also you can pass path to another folder:
deferify build/
or just to the single file
deferify prod/index.html
Deferify will not touch scripts without src, with already added defer or async attributes.
The tool should do only one thing and do it well
FAQs
Adds defer attributes to script tags
We found that deferify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.