我创建了一个 Angular 库。我正在使用 ng-packagr 来构建库。当我使用 ng-packagr 构建库时,它会在 public_api.ts 文件所在的目录中为 AOT 创建 .metada.json。
我们可以将 .metdata.json 生成的目录更改为“dist”文件夹内吗?
ng-package.json
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public_api.ts",
"languageLevel": [
"dom",
"es2017"
]
},
"whitelistedNonPeerDependencies": [
"@angular/*",
"core-js",
"rxjs",
"zone.js",
"moment",
"aws-sdk"
]
}
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": ".",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"rootDir": ".",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"inlineSources": true,
"skipLibCheck": true,
"noImplicitAny": false,
"declaration": false,
"target": "es5",
"lib": [
"es7",
"dom"
],
"typeRoots": [
"node_modules/@types"
],
"types": [
"node",
"jasmine"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true
},
"exclude": [
"node_modules"
]
}