npm run build:ssr does not work in angular 8

后端 未结 3 2116
旧时难觅i
旧时难觅i 2021-02-20 18:12

I use angular 8 and server-side-rendering but i got error when i run npm run build:ssr As you can see, src is repeated twice home/app/front/**src

3条回答
  •  失恋的感觉
    2021-02-20 18:29

    In file src/tsconfig.server.json (generated by ng add @nguniversal/express-engine --clientProject myProject ) I changed

    "files": [ "src/main.server.ts", "server.ts" ],

    into

    "files": [ "main.server.ts", "../server.ts" ],

    After that npm run build:ssr works fine.

提交回复
热议问题