Skip to content

Commit

Permalink
build: Turn off sourcemaps for TS-to-ES compilation
Browse files Browse the repository at this point in the history
We seem to use Babel to compile ES to AMD modules and that now includes ES modules there were originally written in TypeScript. The TypeScript compiler is apparently outputting sourcemaps by default, but it looks like Babel can't handle those properly. Instead Babel keeps the sourcemap comments inside of the AMD modules, which causes the final concatenated file to have *multiple* sourcemap comments, which is invalid. Future versions of Babel might fix this but for now we should turn off the TypeScript sourcemaps, so that the final build output is valid again.
  • Loading branch information
Turbo87 committed Oct 18, 2018
1 parent dd36e9a commit fcd862a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion broccoli/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ module.exports.getPackagesES = function getPackagesES() {
include: ['**/*.ts'],
});

let typescriptCompiled = typescript(debugTree(typescriptContents, `get-packages-es:ts:input`));
let typescriptCompiled = typescript(debugTree(typescriptContents, `get-packages-es:ts:input`), {
compilerOptions: {
sourceMap: false,
},
});

let debuggedCompiledTypescript = debugTree(typescriptCompiled, `get-packages-es:ts:output`);

Expand Down

0 comments on commit fcd862a

Please sign in to comment.