-
Notifications
You must be signed in to change notification settings - Fork 12k
fix(@angular-devkit/build-angular): resolve assets in styles relative to importee #12437
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
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.
This works well for CSS files and is a good improvement. Unfortunately, preprocessors internally handle imports for their respective file types making this ineffective in those cases.
@@ -158,12 +160,16 @@ export default postcss.plugin('postcss-cli-resources', (options: PostcssCliResou | |||
let match; | |||
let lastIndex = 0; | |||
let modified = false; | |||
|
|||
// We want to load it relative to the file that imports | |||
const context = path.dirname(decl.source.input.file) || loader.context; |
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.
will decl.source.input.file
always return a string? If not then path.dirname
will throw.
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.
based on the typings and some tests it should
… to importee Closes #12430
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. |
Closes #12430