-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@angular/build): avoid rebasing URLs with function calls
Function calls can alter the URL path, leading to issues during URL parsing. Closes: #27688
- Loading branch information
1 parent
c7205ea
commit a82a741
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { writeMultipleFiles } from '../../../utils/fs'; | ||
import { installPackage } from '../../../utils/packages'; | ||
import { ng } from '../../../utils/process'; | ||
import { updateJsonFile } from '../../../utils/project'; | ||
|
||
export default async function () { | ||
// Install bootstrap | ||
await installPackage('bootstrap@5'); | ||
|
||
await writeMultipleFiles({ | ||
'src/styles.scss': ` | ||
@import 'bootstrap/scss/bootstrap'; | ||
`, | ||
}); | ||
|
||
await updateJsonFile('angular.json', (workspaceJson) => { | ||
const appArchitect = workspaceJson.projects['test-project'].architect; | ||
appArchitect.build.options.styles = [{ input: 'src/styles.scss' }]; | ||
}); | ||
|
||
await ng('build'); | ||
} |