File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -423,27 +423,33 @@ class PowerBICustomVisualsWebpackPlugin {
423423 ) ;
424424
425425 if ( this . options . generateResources ) {
426- operations . push (
427- this . outputFile (
428- path . join ( resourcePath , "visual.js" ) ,
429- config . content . js ,
430- ) ,
431- this . outputFile (
426+ if ( config . content . js != null ) {
427+ operations . push (
428+ this . outputFile (
429+ path . join ( resourcePath , "visual.js" ) ,
430+ config . content . js
431+ )
432+ ) ;
433+ operations . push ( this . outputFile (
434+ path . join ( resourcePath , "visual.prod.js" ) ,
435+ config . content . js
436+ ) ) ;
437+ }
438+ if ( prodConfig != null ) {
439+ operations . push ( this . outputFile (
432440 path . join (
433441 resourcePath ,
434- `${ prodConfig . visual . guid } .pbiviz.json` ,
442+ `${ prodConfig . visual . guid } .pbiviz.json`
435443 ) ,
436- JSON . stringify ( prodConfig ) ,
437- ) ,
438- this . outputFile (
439- path . join ( resourcePath , "visual.prod.js" ) ,
440- config . content . js ,
441- ) ,
442- this . outputFile (
444+ JSON . stringify ( prodConfig )
445+ ) ) ;
446+ }
447+ if ( config . content . css != null ) {
448+ operations . push ( this . outputFile (
443449 path . join ( resourcePath , "visual.prod.css" ) ,
444- config . content . css ,
445- ) ,
446- ) ;
450+ config . content . css
451+ ) ) ;
452+ }
447453 }
448454
449455 if ( this . options . generatePbiviz ) {
You can’t perform that action at this time.
0 commit comments