This repository was archived by the owner on May 1, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -89,15 +89,18 @@ export function rollupWorker(context: BuildContext, configFile: string): Promise
8989 }
9090
9191 const bundleOutput = bundle . generate ( {
92- format : rollupConfig . format
92+ format : rollupConfig . format ,
93+ sourceMap : rollupConfig . sourceMap
9394 } ) ;
9495
9596 // write the bundle
96- const jsFileToWrite = join ( context . buildDir , rollupConfig . dest ) ;
9797 const promises : Promise < any > [ ] = [ ] ;
98- promises . push ( writeFileAsync ( jsFileToWrite , bundleOutput . code ) ) ;
98+ promises . push ( writeFileAsync ( rollupConfig . dest , bundleOutput . code ) ) ;
99+ context . fileCache . set ( rollupConfig . dest , { path : rollupConfig . dest , content : bundleOutput . code } ) ;
99100 if ( bundleOutput . map ) {
100- promises . push ( writeFileAsync ( jsFileToWrite + '.map' , bundleOutput . map ) ) ;
101+ const sourceMapContent = bundleOutput . map . toString ( ) ;
102+ promises . push ( writeFileAsync ( rollupConfig . dest + '.map' , sourceMapContent ) ) ;
103+ context . fileCache . set ( rollupConfig . dest + '.map' , { path : rollupConfig . dest + '.map' , content : sourceMapContent } ) ;
101104 }
102105 return Promise . all ( promises ) ;
103106 } )
You can’t perform that action at this time.
0 commit comments