-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Angular: Fix angular2-template-loader / raw-loader version conflicts #8269
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/2j2w5a1at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 😭
Added |
I found this test file in the angular internals https://github.com/angular/angular-cli/blob/0aae1476218c95a38527877e15ae55ba68913400/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts and thought we can maybe just use what angular uses This worked locally and I even could get rid of two webpack plugins but this is all still just WIP. I need to figure out a couple of things
Benefits of this approach
|
81d78be
to
9d5439d
Compare
9d5439d
to
19e8024
Compare
I reverted my new approach. It's unsafe and I couldn't make it compatible for all my test projects. This implementation is a safe fix and solves peoples problems |
Angular: Fix angular2-template-loader / raw-loader version conflicts
Issue: #7877
What I did
As suggested in #7877 (comment) I fixed this issue by modifying the code of
angular2-template-loader
Though, instead of using
patch-package
I just copied the loader function from theangular2-template-loader
repository. This package hasn't received any updates in the past 3 years and I contacted the owner to talk about the future of this package.Also, copying the loader also means we don't have to install another dependency that also needs to be executed as a postinstall script.
How to test
prepare
script inapp/angular
examples/angular-cli
AppComponent
storyWhat else
We should make sure this works in Angular 7 and 8 before merging it