File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
packages/angular/build/src/tools/sass
tests/legacy-cli/e2e/tests/build/styles Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ abstract class UrlRebasingImporter implements Importer<'sync'> {
9393 continue ;
9494 }
9595
96+ // Skip if value is value contains a function call
97+ if ( / # \{ .+ \( .+ \) \} / . test ( value ) ) {
98+ continue ;
99+ }
100+
96101 // Sass variable usage either starts with a `$` or contains a namespace and a `.$`
97102 const valueNormalized = value [ 0 ] === '$' || / ^ \w + \. \$ / . test ( value ) ? `#{${ value } }` : value ;
98103 const rebasedPath =
Original file line number Diff line number Diff line change 1+ import { writeMultipleFiles } from '../../../utils/fs' ;
2+ import { installPackage } from '../../../utils/packages' ;
3+ import { ng } from '../../../utils/process' ;
4+ import { updateJsonFile } from '../../../utils/project' ;
5+
6+ export default async function ( ) {
7+ // Install bootstrap
8+ await installPackage ( 'bootstrap@5' ) ;
9+
10+ await writeMultipleFiles ( {
11+ 'src/styles.scss' : `
12+ @import 'bootstrap/scss/bootstrap';
13+ ` ,
14+ } ) ;
15+
16+ await updateJsonFile ( 'angular.json' , ( workspaceJson ) => {
17+ const appArchitect = workspaceJson . projects [ 'test-project' ] . architect ;
18+ appArchitect . build . options . styles = [ { input : 'src/styles.scss' } ] ;
19+ } ) ;
20+
21+ await ng ( 'build' ) ;
22+ }
You can’t perform that action at this time.
0 commit comments