问题描述
当我尝试使用绝对outputPath构建我的应用程序时,所有内容都能正确编译并复制所有文件,但是缺少index.html文件。
ng build -c homo
如果我将outputDir属性更改为类似“ dist / homo”的相对路径,则将包含index.html文件,并且一切正常。
我做错什么了吗?
我的angular.json:
"projects": {
"my-project": {
"root": "","sourceRoot": "src","projectType": "application","architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser","options": {
"outputPath": "dist","index": "src/index.html","main": "src/main.ts","tsConfig": "src/tsconfig.app.json","polyfills": "src/polyfills.ts","assets": [ ... ],"styles": [ ... ],"scripts": [ ... ]
},"configurations": {
"homo": {
"assets": [ ... ],"outputPath": "\\\\10.10.10.135\\custfolder\\myProyect","optimization": false,"outputHashing": "all","sourceMap": false,"extractCss": true,"namedChunks": false,"aot": true,"extractLicenses": true,"vendorChunk": false,"buildOptimizer": true,"fileReplacements": [{
"replace": "src/config/config.ts","with": "src/config/config.homo.ts"
}],"serviceWorker": true,"ngswConfigPath": "ngsw-config.json"
},...
我的Angular CLI版本
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__,|\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 10.1.2
Node: 14.13.1
OS: win32 x64
Angular: 10.1.2
... animations,cli,common,compiler,compiler-cli,core,forms
... platform-browser,platform-browser-dynamic,platform-server
... router,service-worker,upgrade
Ivy Workspace: Yes
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.900.7
@angular-devkit/build-angular 0.1001.2
@angular-devkit/core 10.1.2
@angular-devkit/schematics 10.1.2
@angular/cdk 10.2.2
@angular/fire 5.4.2
@angular/pwa 0.900.7
@schematics/angular 9.0.7
@schematics/update 0.1001.2
rxjs 6.6.3
typescript 4.0.3
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)