File tree Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -83,21 +83,14 @@ class PreloadPlugin {
83
83
rel : options . rel
84
84
}
85
85
86
- // If we're preloading this resource (as opposed to prefetching),
87
- // then we need to set the 'as' attribute correctly.
88
- if ( options . rel === 'preload' ) {
89
- attributes . as = determineAsValue ( {
90
- href,
91
- file,
92
- optionsAs : options . as
93
- } )
94
-
95
- // On the off chance that we have a cross-origin 'href' attribute,
96
- // set crossOrigin on the <link> to trigger CORS mode. Non-CORS
97
- // fonts can't be used.
98
- if ( attributes . as === 'font' ) {
99
- attributes . crossorigin = ''
100
- }
86
+ attributes . as = determineAsValue ( {
87
+ href,
88
+ file,
89
+ optionsAs : options . as
90
+ } )
91
+
92
+ if ( attributes . as === 'font' ) {
93
+ attributes . crossorigin = ''
101
94
}
102
95
103
96
links . push ( {
You can’t perform that action at this time.
0 commit comments