@@ -15,22 +15,22 @@ module.exports.pitch = function (request) {
15
15
var options = loaderUtils . getOptions ( this ) || { } ;
16
16
17
17
validateOptions ( require ( './options.json' ) , options , 'Style Loader' )
18
-
18
+
19
19
options . hmr = typeof options . hmr === 'undefined' ? true : options . hmr ;
20
20
21
- // The variable is needed, because the function should be inlined.
21
+ // The variable is needed, because the function should be inlined.
22
22
// If is just stored it in options, JSON.stringify will quote
23
23
// the function and it would be just a string at runtime
24
24
var insertInto ;
25
-
26
- if ( typeof options . insertInto === "function" ) {
27
- insertInto = options . insertInto . toString ( ) ;
25
+
26
+ if ( typeof options . insertInto === "function" ) {
27
+ insertInto = options . insertInto . toString ( ) ;
28
28
}
29
-
30
- // We need to check if it a string, or variable will be "undefined"
29
+
30
+ // We need to check if it a string, or variable will be "undefined"
31
31
// and the loader crashes
32
- if ( typeof options . insertInto === "string" ) {
33
- insertInto = '"' + options . insertInto + '"' ;
32
+ if ( typeof options . insertInto === "string" ) {
33
+ insertInto = '"' + options . insertInto + '"' ;
34
34
}
35
35
36
36
var hmr = [
@@ -79,11 +79,11 @@ module.exports.pitch = function (request) {
79
79
"var transform;" ,
80
80
"var insertInto;" ,
81
81
"" ,
82
- options . transform ? "transform = require(" + loaderUtils . stringifyRequest ( this , "!" + path . resolve ( options . transform ) ) + ");" : "" ,
83
- "" ,
82
+ options . transform ? "transform = require(" + loaderUtils . stringifyRequest ( this , "!" + path . resolve ( options . transform ) ) + ");" : "" ,
83
+ "" ,
84
84
"var options = " + JSON . stringify ( options ) ,
85
85
"" ,
86
- "options.transform = transform" ,
86
+ "options.transform = transform" ,
87
87
"options.insertInto = " + insertInto + ";" ,
88
88
"" ,
89
89
// Add styles to the DOM
0 commit comments