0

我使用 angular-cli-ghpages 进行部署,按照以下步骤操作:https ://www.npmjs.com/package/angular-cli-ghpages

1.git远程添加origin https://github.com/username/epositoryname.git

2.ng 添加 angular-cli-ghpages

3.ng部署

当执行部署向我展示这个:

ng deploy --base-href= https://github.com/Azaria-CR/portafolio1.git 构建“dogapi”。配置:“生产”。你的基础href:“ https://github.com/Azaria-CR/portafolio1.git

块 {0} runtime-es2015.85f895af57b038f1e5b4.js (runtime) 2.82 kB [entry] [rendered] chunk {1} main-es2015.12ae7f54f3b8c7ac770e.js (main) 367 kB [initial] [rendered] chunk {2} polyfills- es2015.0fe6949bc5ff4b784062.js (polyfills) 64 kB [initial] [rendered] chunk {3} polyfills-es5-es2015.a83ac866abc867bfd530.js (polyfills-es5) 222 kB [initial] [rendered] chunk {4} styles.09e2c710755c88。 css (styles) 0 bytes [initial] [rendered] Date: 2019-09-18T01:53:17.038Z - Hash: 555aa990c3829b3b1bf6 - Time: 122860ms 为差异加载生成 ES5 包... ES5 包生成完成。通过 angular-cli-ghpages 成功发布!祝你今天过得愉快!

但它不起作用

当我完成给我看空白页

git 版本 2.23.0.windows.1 Angular CLI:8.3.4 节点:10.16.3 npm 6.11.3

4

1 回答 1

0

我遇到了同样的问题,这对我有用:

部署时:

ng deploy --base-ref=/YourRepositoryName/

将 YourRepositoryName 替换为您的项目名称,并注意最后的 /。我希望它可以帮助您解决问题。

于 2020-01-24T16:03:25.627 回答