Skip to content

Please support angular cli or publish a browser packed package #208

Closed
@kbirger

Description

@kbirger

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.

Activity

broofa

broofa commented on Jul 2, 2018

@broofa
Owner

While I'm tempted to fix this just to silence the recurring complaints I get about this, I don't believe this is a mime-specific issue. It's an Angular problem (see above reference). Feel free to chime in on that issue. In the mean time, use the mime-wrapper module?

kbirger

kbirger commented on Jul 2, 2018

@kbirger
Author

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.

marlon360

marlon360 commented on Jul 12, 2018

@marlon360
Contributor

Here is a wrapper ready for Angular CLI: https://github.com/marlon360/mime-wrapper

omarsourour

omarsourour commented on Feb 1, 2019

@omarsourour

It really can be solved simply by adding the .json extension. I am currently having to use the mime-wrapper library, but that just means I am hoping you don't change any of your innards file organization.

broofa

broofa commented on Feb 1, 2019

@broofa
Owner

@omarsourour See note I just added to description.

broofa

broofa commented on May 14, 2019

@broofa
Owner

If someone wants to fixup src/build.js per this comment, I'd take a PR.

marlon360

marlon360 commented on May 14, 2019

@marlon360
Contributor

I made a PR #226 with the necessary changes according to this comment.

broofa

broofa commented on May 15, 2019

@broofa
Owner

Thanks for jumping on this, @marlon360. Fix is up on npm as v2.4.3. Let me know if you see any problems.

viceice

viceice commented on May 16, 2019

@viceice

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.

broofa

broofa commented on May 16, 2019

@broofa
Owner

@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):

Once you identify your public API, you communicate changes to it with specific increments to your version number

viceice

viceice commented on May 16, 2019

@viceice

Ok, i thought, the types json files were actually public api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @broofa@kbirger@viceice@omarsourour@marlon360

        Issue actions

          Please support angular cli or publish a browser packed package · Issue #208 · broofa/mime