File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -407,27 +407,33 @@ class PowerBICustomVisualsWebpackPlugin {
407407 ) ;
408408
409409 if ( this . options . generateResources ) {
410- operations . push (
411- this . outputFile (
412- path . join ( resourcePath , "visual.js" ) ,
410+ if ( config . content . js != null ) {
411+ operations . push (
412+ this . outputFile (
413+ path . join ( resourcePath , "visual.js" ) ,
414+ config . content . js
415+ )
416+ ) ;
417+ operations . push ( this . outputFile (
418+ path . join ( resourcePath , "visual.prod.js" ) ,
413419 config . content . js
414- ) ,
415- this . outputFile (
420+ ) ) ;
421+ }
422+ if ( prodConfig != null ) {
423+ operations . push ( this . outputFile (
416424 path . join (
417425 resourcePath ,
418426 `${ prodConfig . visual . guid } .pbiviz.json`
419427 ) ,
420428 JSON . stringify ( prodConfig )
421- ) ,
422- this . outputFile (
423- path . join ( resourcePath , "visual.prod.js" ) ,
424- config . content . js
425- ) ,
426- this . outputFile (
429+ ) ) ;
430+ }
431+ if ( config . content . css != null ) {
432+ operations . push ( this . outputFile (
427433 path . join ( resourcePath , "visual.prod.css" ) ,
428434 config . content . css
429- )
430- ) ;
435+ ) ) ;
436+ }
431437 }
432438
433439 if ( this . options . generatePbiviz ) {
You can’t perform that action at this time.
0 commit comments