Repository navigation
fix(@angular/build): support quotes in styles and polyfills paths - #34391
Conversation
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where file paths containing single quotes (such as src/dev's polyfills/polyfills.js) caused build failures when generating polyfill and global style imports. The fix replaces single-quoted string interpolation with JSON.stringify to safely escape paths in the generated import statements. Additionally, corresponding unit tests have been added to verify this behavior for both polyfills and global styles. There are no review comments to address, and the changes look solid.
The application builder generated the global styles and polyfills entry modules by wrapping each configured path in single quotes without escaping. A path containing a single quote, such as `src/dev's theme/theme.css`, produced an invalid import and the build failed with "Could not resolve" or a syntax error. Generate the import specifiers with `JSON.stringify` so that such paths are quoted correctly.
4754d8f to
87464b4
Compare
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The application builder generated the global styles and polyfills entry modules by wrapping each configured path in single quotes without escaping. A path containing a single quote, such as
src/dev's theme/theme.css, produced an invalid import and the build failed with "Could not resolve" or a syntax error.Generate the import specifiers with
JSON.stringifyso that such paths are quoted correctly.