File tree 2 files changed +24
-1
lines changed
packages/angular-cli/models
tests/e2e/tests/build/styles
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ export function makeCssLoaders(stylePaths: string[] = []) {
80
80
include : stylePaths , test, loaders : ExtractTextPlugin . extract ( {
81
81
remove : false ,
82
82
loader : [ 'css-loader' , ...commonLoaders , ...loaders ] ,
83
- fallbackLoader : 'style-loader'
83
+ fallbackLoader : 'style-loader' ,
84
+ // publicPath needed as a workaround https://github.com/angular/angular-cli/issues/4035
85
+ publicPath : ''
84
86
} )
85
87
} ) ) ) ;
86
88
}
Original file line number Diff line number Diff line change
1
+ import { writeMultipleFiles , expectFileToMatch } from '../../../utils/fs' ;
2
+ import { ng } from '../../../utils/process' ;
3
+ import { stripIndents } from 'common-tags' ;
4
+
5
+ export default function ( ) {
6
+ return writeMultipleFiles ( {
7
+ 'src/styles.css' : stripIndents `
8
+ div { background: url("./assets/more.svg"); }
9
+ ` ,
10
+ 'src/assets/more.svg' : stripIndents `
11
+ <svg width="100" height="100">
12
+ <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
13
+ </svg>
14
+ ` } )
15
+ . then ( ( ) => ng ( 'build' , '--extract-css' ) )
16
+ . then ( ( ) => expectFileToMatch ( 'dist/styles.bundle.css' ,
17
+ / d i v \s * { \s * b a c k g r o u n d : \s * u r l \( m o r e .s v g \) ; \s * } / ) )
18
+ . then ( ( ) => ng ( 'build' , '--extract-css' , '--deploy-url=client/' ) )
19
+ . then ( ( ) => expectFileToMatch ( 'dist/styles.bundle.css' ,
20
+ / d i v \s * { \s * b a c k g r o u n d : \s * u r l \( m o r e .s v g \) ; \s * } / ) ) ;
21
+ }
You can’t perform that action at this time.
0 commit comments