问题
I'm packaging an Angular 5 library with ng-packagr and I need to use my existing tsconfig.json. I've read the docs here https://github.com/ng-packagr/ng-packagr/blob/master/docs/override-tsconfig.md and it says I need to write a script (I was expecting an option in the config) and pass through the filepath to my tsconfig file.
I don't understand where I write this code? I guess this needs to be an NPM script? The documentation and example seems to be very minimal.
Help with this would be appreciated.
回答1:
I did this by creating a build-package.ts
file with the contents (but require not import) then did:
node build-package.ts
.
来源:https://stackoverflow.com/questions/52273916/how-do-i-use-my-tsconfig-file-with-ng-packagr