[英]How to remove Angular Universal on angular project
I enabled angular universal on my project.我在我的项目中启用了 angular 通用。 I would like to remove it completely now.
我现在想完全删除它。 I tried to remove the following files
我试图删除以下文件
/server.ts
/webpack.server.config.js
/src/tsconfig.server.json
/src/main.server.ts
/src/app/app.server.module.ts
and remove server section in angular.json
but, It has not removed completely.但是,它还没有完全删除。
Is there any command to remove it completely?有什么命令可以完全删除它吗?
This worked for me (from "@nguniversal/express-engine": "^13.1.0",
):这对我有用(来自
"@nguniversal/express-engine": "^13.1.0",
):
npm
to remove these dependences:npm
去除这些依赖:npm uninstall @nguniversal/express-engine
npm uninstall @nguniversal/builders
npm uninstall express
npm uninstall @types/express
./server.ts
./tsconfig.server.json
./src/main.server.ts
./src/app/app.server.module.ts
// Delete `*webpack.server` config file if exists!
"dev:ssr": "ng run info-rincon:serve-ssr",
"serve:ssr": "node dist/functions/server/main.js",
"build:ssr": "ng build && ng run info-rincon:server:production",
"prerender": "ng run info-rincon:prerender",
* From _app-routing.module.ts_, this is not needed:
Based on Angular documentation on the following link https://angular.io/guide/universal基于以下链接上的 Angular 文档https://angular.io/guide/universal
looking up at the second section of the page (Universal tutorial) it will show you the files that are created using angular universal which are :-查看页面的第二部分(通用教程),它将向您展示使用 angular Universal 创建的文件,它们是:-
src/index.html
src/main.ts
src/main.server.ts
src/style.css
app/... app.server.module.ts
server.ts
tsconfig.json
tsconfig.app.json
tsconfig.server.json
tsconfig.spec.json
package.json
webpack.server.config.js
i would delete these files completely and/or delete the sections in these files that are angular-universal related我会完全删除这些文件和/或删除这些文件中与角度通用相关的部分
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.