Closed
Description
Here is my understand of how rollup_bundle
works:
- copy files into
bundles.es6
directory - Rollup the files in
bundles.es6
directory intobundle.es6.js
file - Downlevel the file from ES6 -> ES5 into
bundle.js
usingtsc
- Run uglify to generate
bundle.min.js
The pipeline above works fine for the source code, but it brakes source map. There are 2 issues:
- Many of the actions do not declare
*.js.map
as output of the action. This can be easily fixed as shown here - The source map pipeline is broken. The reason for this is that when
tsc
is used to downlevel the code from ES2015->ES5tsc
assumes thatbundle.es6.js
is the source file. This is incorrect assumption. Insteadtsc
should transform the source maps inbundel.es6.js
to the next step. I am not even sure iftsc
supports such mode. In any case the issue is that at this point the source map have been destroyed and so the subsequent source maps are of no value.