File tree 1 file changed +11
-11
lines changed
1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,18 @@ module.exports = function(content) {
14
14
if ( process . env . NODE_ENV === 'production' )
15
15
this . cacheable && this . cacheable ( )
16
16
17
- if ( ! this . emitFile )
18
- throw new Error ( 'emitFile is required from module system' )
17
+ var options = Object . assign (
18
+ { } ,
19
+ { transform : true } , // defaultOptions
20
+ loaderUtils . getOptions ( this ) // could be null
21
+ )
19
22
20
- var query = loaderUtils . parseQuery ( this . query )
21
- , transform = typeof query . transform === 'boolean' ? query . transform : true
22
- , url = loaderUtils . interpolateName ( this , query . name || '[hash].[ext]' , {
23
- context : query . context || this . options . context ,
24
- content : content ,
25
- regExp : query . regExp
26
- } )
27
- , result = nativeCss . convert ( content )
28
- , returnVal = transform ? transformToNestedDomStyleObjects ( result ) : result
23
+ // TBD: interpolateName()
24
+ // https://github.com/webpack/loader-utils#interpolatename
25
+
26
+ var result = nativeCss . convert ( content )
27
+ // TBD: use "humps" for transformation
28
+ , returnVal = options . transform ? transformToNestedDomStyleObjects ( result ) : result
29
29
30
30
return 'module.exports = ' + JSON . stringify ( returnVal )
31
31
}
You can’t perform that action at this time.
0 commit comments