@@ -4,6 +4,7 @@ import {buildConfig} from './build-config';
44import { BuildPackage } from './build-package' ;
55import { rollupRemoveLicensesPlugin } from './rollup-remove-licenses' ;
66import { rollupGlobals , dashCaseToCamelCase } from './rollup-globals' ;
7+ import { remapSourcemap } from './sourcemap-remap' ;
78
89// There are no type definitions available for these imports.
910const rollup = require ( 'rollup' ) ;
@@ -66,7 +67,6 @@ export class PackageBundler {
6667 */
6768 private async bundleEntryPoint ( config : BundlesConfig ) {
6869 // Build FESM-2015 bundle file.
69- // TODO: re-add sorcery when we upgrade to Angular 5.x
7070 await this . createRollupBundle ( {
7171 moduleName : config . moduleName ,
7272 entry : config . entryFile ,
@@ -75,7 +75,6 @@ export class PackageBundler {
7575 } ) ;
7676
7777 // Build FESM-5 bundle file.
78- // TODO: re-add sorcery when we upgrade to Angular 5.x
7978 await this . createRollupBundle ( {
8079 moduleName : config . moduleName ,
8180 entry : config . esm5EntryFile ,
@@ -84,7 +83,6 @@ export class PackageBundler {
8483 } ) ;
8584
8685 // Create UMD bundle of ES5 output.
87- // TODO: re-add sorcery when we upgrade to Angular 5.x
8886 await this . createRollupBundle ( {
8987 moduleName : config . moduleName ,
9088 entry : config . esm5Dest ,
@@ -93,8 +91,15 @@ export class PackageBundler {
9391 } ) ;
9492
9593 // Create a minified UMD bundle using UglifyJS
96- // TODO: re-add sorcery when we upgrade to Angular 5.x
9794 uglifyJsFile ( config . umdDest , config . umdMinDest ) ;
95+
96+ // Remaps the sourcemaps to be based on top of the original TypeScript source files.
97+ await Promise . all ( [
98+ remapSourcemap ( config . esm2015Dest ) ,
99+ remapSourcemap ( config . esm5Dest ) ,
100+ remapSourcemap ( config . umdDest ) ,
101+ remapSourcemap ( config . umdMinDest ) ,
102+ ] ) ;
98103 }
99104
100105 /** Creates a rollup bundle of a specified JavaScript file.*/
0 commit comments