我正在使用 Fuse 模板开始一个新项目。我以前没有问题地这样做过。这一次,当我从一个骨架应用程序开始时,我创建了一个新的组件和模块,它通过 ng serve 运行,没有任何问题。当我去构建和部署到 Firebase 托管时,我注意到虽然它在 /dist 中构建了一个 Fuse 文件夹,但在 /dist 中没有创建索引文件。关于为什么会发生这种情况的任何想法?
这是它的输出。
Warning: Entry point '@swimlane/ngx-dnd' contains deep imports into
'/Users/joshuafoxworth/Sites/CADWOLFv9/node_modules/@angular/compiler/src/core'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
10% building 4/4 modules 0 active(node:89554) ExperimentalWarning: The fs.promises API is experimental
<w> [webpack.Progress] 35955ms building
<i> [webpack.Progress] 110ms finish module graph
<i> [webpack.Progress] 32ms chunk graph
<i> [webpack.Progress] 25ms advanced chunk optimization
<i> [webpack.Progress] 23ms before module ids
<i> [webpack.Progress] 16ms module id optimization
<i> [webpack.Progress] 85ms hashing
<i> [webpack.Progress] 134ms chunk assets processing
<w> [webpack.Progress] 5589ms after chunk asset optimization
<i> [webpack.Progress] 535ms emitting
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.
chunk {polyfills} polyfills-es2015.js, polyfills-es2015.js.map (polyfills) 187 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 830 kB [initial] [rendered]
chunk {main} main-es2015.js, main-es2015.js.map (main) 3.65 MB [initial] [rendered]
chunk {main} main-es5.js, main-es5.js.map (main) 3.72 MB [initial] [rendered]
chunk {runtime} runtime-es2015.js, runtime-es2015.js.map (runtime) 6.16 kB [entry] [rendered]
chunk {runtime} runtime-es5.js, runtime-es5.js.map (runtime) 6.16 kB [entry] [rendered]
chunk {styles} styles-es2015.js, styles-es2015.js.map (styles) 3.95 MB [initial] [rendered]
chunk {styles} styles-es5.js, styles-es5.js.map (styles) 3.96 MB [initial] [rendered]
chunk {vendor} vendor-es2015.js, vendor-es2015.js.map (vendor) 6.68 MB [initial] [rendered]
chunk {vendor} vendor-es5.js, vendor-es5.js.map (vendor) 7.72 MB [initial] [rendered]
Date: 2020-07-11T21:32:17.597Z - Hash: 724efdf549e68fc2e039 - Time: 63604ms
WARNING in /Users/joshuafoxworth/Sites/CADWOLFv9/src/hmr.ts depends on '@angularclass/hmr'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in /Users/joshuafoxworth/Sites/CADWOLFv9/src/app/app.module.ts depends on 'hammerjs'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in /Users/joshuafoxworth/Sites/CADWOLFv9/src/@fuse/components/navigation/navigation.service.ts depends on 'lodash'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
角度 JSON 文件
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"fuse": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/fuse",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [],
"showCircularDependencies": false
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "4mb",
"maximumError": "6mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
},
"ec": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"sourceMap": true,
"extractCss": true
},
"hmr": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "fuse:build"
},
"configurations": {
"production": {
"browserTarget": "fuse:build:production"
},
"hmr": {
"hmr": true,
"browserTarget": "fuse:build:hmr"
},
"ec": {
"browserTarget": "fuse:build:ec"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "fuse:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "fuse:serve"
},
"configurations": {
"production": {
"devServerTarget": "fuse:serve:production"
}
}
}
}
}
},
"defaultProject": "fuse"
}