File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ struct CliArgs {
2929 custom_media : bool ,
3030 /// Enable CSS modules in output.
3131 /// If no filename is provided, <output_file>.json will be used.
32- #[ clap( long, group = "css_modules" , requires = "output_file" ) ]
32+ #[ clap( long, group = "css_modules" ) ]
3333 css_modules : Option < Option < String > > ,
3434 /// Enable sourcemap, at <output_file>.map
3535 #[ clap( long, requires = "output_file" ) ]
@@ -142,7 +142,17 @@ pub fn main() -> Result<(), std::io::Error> {
142142 }
143143 }
144144 } else {
145- println ! ( "{}" , res. code) ;
145+ if let Some ( exports) = res. exports {
146+ println ! (
147+ "{}" ,
148+ serde_json:: json!( {
149+ "code" : res. code,
150+ "modules" : exports
151+ } )
152+ ) ;
153+ } else {
154+ println ! ( "{}" , res. code) ;
155+ }
146156 }
147157
148158 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments