-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
feat(ivy): support styleUrls in ngtsc #27357
Conversation
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
You can preview 709ff28 at https://pr27357-709ff28.ngbuilds.io/. |
You can preview 753ee10 at https://pr27357-753ee10.ngbuilds.io/. |
…souces When a single resource is preloaded twice in ngtsc, the second request would be recognized as in-flight in which case `undefined` would be returned, which signals to the compilation that is can resume synchronously. The compilation would then proceed immediately and call `load`, only to find out that the request is still in-flight which is not allowed. This commit caches the Promise of the in-flight fetch requests, such that subsequent preload requests can return the corresponding Promise instance.
This commit adds support for resolution of styleUrls to ngtsc. Previously this field was never read, and so components with styleUrls would appear unstyled after compilation.
Previously ngtsc assumed resource files (templateUrl, styleUrls) would be physically present in the file system relative to the .ts file which referenced them. However, ngc previously resolved such references in the context of ts.CompilerOptions.rootDirs. Material depends on this functionality in its build. This commit introduces resolution of resources by leveraging the TypeScript module resolver, ts.resolveModuleName(). This resolver is used in a way which will never succeed, but on failure will return a list of locations checked. This list is then filtered to obtain the correct potential locations of the resource.
753ee10
to
5c1a01e
Compare
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
You can preview 5c1a01e at https://pr27357-5c1a01e.ngbuilds.io/. |
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 too!
This commit adds support for resolution of styleUrls to ngtsc. Previously this field was never read, and so components with styleUrls would appear unstyled after compilation. PR Close #27357
) Previously ngtsc assumed resource files (templateUrl, styleUrls) would be physically present in the file system relative to the .ts file which referenced them. However, ngc previously resolved such references in the context of ts.CompilerOptions.rootDirs. Material depends on this functionality in its build. This commit introduces resolution of resources by leveraging the TypeScript module resolver, ts.resolveModuleName(). This resolver is used in a way which will never succeed, but on failure will return a list of locations checked. This list is then filtered to obtain the correct potential locations of the resource. PR Close #27357
…souces (angular#27357) When a single resource is preloaded twice in ngtsc, the second request would be recognized as in-flight in which case `undefined` would be returned, which signals to the compilation that is can resume synchronously. The compilation would then proceed immediately and call `load`, only to find out that the request is still in-flight which is not allowed. This commit caches the Promise of the in-flight fetch requests, such that subsequent preload requests can return the corresponding Promise instance. PR Close angular#27357
This commit adds support for resolution of styleUrls to ngtsc. Previously this field was never read, and so components with styleUrls would appear unstyled after compilation. PR Close angular#27357
…ular#27357) Previously ngtsc assumed resource files (templateUrl, styleUrls) would be physically present in the file system relative to the .ts file which referenced them. However, ngc previously resolved such references in the context of ts.CompilerOptions.rootDirs. Material depends on this functionality in its build. This commit introduces resolution of resources by leveraging the TypeScript module resolver, ts.resolveModuleName(). This resolver is used in a way which will never succeed, but on failure will return a list of locations checked. This list is then filtered to obtain the correct potential locations of the resource. PR Close angular#27357
…souces (angular#27357) When a single resource is preloaded twice in ngtsc, the second request would be recognized as in-flight in which case `undefined` would be returned, which signals to the compilation that is can resume synchronously. The compilation would then proceed immediately and call `load`, only to find out that the request is still in-flight which is not allowed. This commit caches the Promise of the in-flight fetch requests, such that subsequent preload requests can return the corresponding Promise instance. PR Close angular#27357
This commit adds support for resolution of styleUrls to ngtsc. Previously this field was never read, and so components with styleUrls would appear unstyled after compilation. PR Close angular#27357
…ular#27357) Previously ngtsc assumed resource files (templateUrl, styleUrls) would be physically present in the file system relative to the .ts file which referenced them. However, ngc previously resolved such references in the context of ts.CompilerOptions.rootDirs. Material depends on this functionality in its build. This commit introduces resolution of resources by leveraging the TypeScript module resolver, ts.resolveModuleName(). This resolver is used in a way which will never succeed, but on failure will return a list of locations checked. This list is then filtered to obtain the correct potential locations of the resource. PR Close angular#27357
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit adds support for resolution of styleUrls to ngtsc. Previously
this field was never read, and so components with styleUrls would appear
unstyled after compilation.