-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript enum + namespace declaration merging causes error #680
Comments
I use the following workaround:
|
Workaround does not work for me with
|
Any updates on this ? I am facing the same issue with following versions
Will be really a help if anybody cofirms what the issue is. |
ok it actually doesnt work with @willemsendennis solution |
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent version. |
This issue has been automatically locked due to inactivity. |
Type of Issue
Description
When trying to package a library that has an exported enum that is merged with a namespace, the build throws the error
Identifier '{enumName}' has already been declared
. I use this format in several different Angular projects and there are no issues when running something like this through the ngc compiler (both JIT and AOT work correctly). Seems to be something possibly related to how the packaging works with rollup. From what I can tell, rollup doesn't deal with typescript so I figured I'd start here and hopefully find a solution.How To Reproduce
https://plnkr.co/edit/ofKm8uDao8IxQlFb0rj4
Using the files provided in the plunker (standard ng-packagr setup with a single enum file):
npm i
npm run build
Expected Behaviour
Build should complete successfully.
Version Information
The text was updated successfully, but these errors were encountered: