1.The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15.
Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
时。
使用
npx ng build --prod
ng build 常规的压缩操作 代码体积最大
ng build --aot angular预编译 代码体积较小
ng build --prod angular预编译 代码体积最小,访问速度最快
npx ng build --prod --watch
//实时监控改动后自动编译
作者:嘶吼
链接:https://www.zhihu.com/question/327989736/answer/787995048
来源:知乎
npm的思路大概是这样的:
- 买个服务器作为代码仓库(repository),在里面放所有需要被共享的代码
- 发邮件通知 jQuery 、Bootstrap 、Underscore 的作者使用 npm publish 把代码提交到 repository 上,分别取名 jquery、bootstrap 和 underscore(注意大小写)。
- 社区里的其他人如果想使用这些代码,就把 jquery、bootstrap 和 underscore 写到 package.json 里,然后运行 npm install ,npm 就会帮他们下载代码。
- 下载完的代码出现在