@@ -4,6 +4,7 @@ import {buildConfig} from './build-config';
4
4
import { BuildPackage } from './build-package' ;
5
5
import { rollupRemoveLicensesPlugin } from './rollup-remove-licenses' ;
6
6
import { rollupGlobals , dashCaseToCamelCase } from './rollup-globals' ;
7
+ import { remapSourcemap } from './sourcemap-remap' ;
7
8
8
9
// There are no type definitions available for these imports.
9
10
const rollup = require ( 'rollup' ) ;
@@ -66,7 +67,6 @@ export class PackageBundler {
66
67
*/
67
68
private async bundleEntryPoint ( config : BundlesConfig ) {
68
69
// Build FESM-2015 bundle file.
69
- // TODO: re-add sorcery when we upgrade to Angular 5.x
70
70
await this . createRollupBundle ( {
71
71
moduleName : config . moduleName ,
72
72
entry : config . entryFile ,
@@ -75,7 +75,6 @@ export class PackageBundler {
75
75
} ) ;
76
76
77
77
// Build FESM-5 bundle file.
78
- // TODO: re-add sorcery when we upgrade to Angular 5.x
79
78
await this . createRollupBundle ( {
80
79
moduleName : config . moduleName ,
81
80
entry : config . esm5EntryFile ,
@@ -84,7 +83,6 @@ export class PackageBundler {
84
83
} ) ;
85
84
86
85
// Create UMD bundle of ES5 output.
87
- // TODO: re-add sorcery when we upgrade to Angular 5.x
88
86
await this . createRollupBundle ( {
89
87
moduleName : config . moduleName ,
90
88
entry : config . esm5Dest ,
@@ -93,8 +91,15 @@ export class PackageBundler {
93
91
} ) ;
94
92
95
93
// Create a minified UMD bundle using UglifyJS
96
- // TODO: re-add sorcery when we upgrade to Angular 5.x
97
94
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
+ ] ) ;
98
103
}
99
104
100
105
/** Creates a rollup bundle of a specified JavaScript file.*/
0 commit comments