-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
Please support angular cli or publish a browser packed package #208
Comments
While I'm tempted to fix this just to silence the recurring complaints I get about this, I don't believe this is a |
It seems like I misunderstood the problem when opening the issue. From looking at the mime-wrapper code, it seems that the whole issue is solved by adding '.json' to the require calls? While I recognize that this is a fault in the angular tooling, would it not be simpler, and still standards-compliant to simply call require with the appropriate extension? The format of those required files will not change without a new version of your package, so what's the harm in explicitly requiring json? I will, in the meantime, do as you suggest and use the wrapper. |
Here is a wrapper ready for Angular CLI: https://github.com/marlon360/mime-wrapper |
It really can be solved simply by adding the |
@omarsourour See note I just added to description. |
If someone wants to fixup |
I made a PR #226 with the necessary changes according to this comment. |
Thanks for jumping on this, @marlon360. Fix is up on npm as v2.4.3. Let me know if you see any problems. |
This is actually a breaking change, because you changed the package layout. If I update to the new bugfix release it would break my build, because of the changed file extension. |
@viceice While I sympathize, since this is not a change to the public API it does not constitute a breaking change. From https://semver.org/ (emphasis mine):
|
Ok, i thought, the types json files were actually public api. |
Currently, Angular CLI doesn't let you customize the webpack config that it generates, making it effectively impossible (to my knowledge) to use it in a project which uses Angular CLI.
Please add support for this in whichever way you think would be best. It is possible that the simplest solution would be to publish a separate package with the wzrd.in version.
[2019-01-01] A note from broofa (the project maintainer)
This is an issue with Angular, not with this project. I'm only leaving this comment open to make it more visible for people struggling with the same issue.
Want to help? Go read angular/angular-cli#5043 (comment) , and then add your thoughts there. Unless/until someone from the Angular projects makes a compelling argument for why this isn't actually their issue, I won't be acting on this.
Until then, consider using https://github.com/marlon360/mime-wrapper to workaround this issue.
The text was updated successfully, but these errors were encountered: