mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-14 17:43:52 +08:00
build: remove generation of inline sourcemaps
This commit is contained in:
parent
78889f03ac
commit
3d313aede8
13
lib/bootstrap-local.js
vendored
13
lib/bootstrap-local.js
vendored
@ -23,9 +23,12 @@ const tmpRoot = temp.mkdirSync('angular-devkit-');
|
||||
|
||||
debugLocal('starting bootstrap local');
|
||||
|
||||
const compilerOptions = ts.readConfigFile(path.join(__dirname, '../tsconfig.json'), p => {
|
||||
return fs.readFileSync(p, 'utf-8');
|
||||
}).config;
|
||||
// This processes any extended configs
|
||||
const compilerOptions = ts.getParsedCommandLineOfConfigFile(
|
||||
path.join(__dirname, '../tsconfig-test.json'),
|
||||
{ },
|
||||
ts.sys,
|
||||
).options;
|
||||
|
||||
let _istanbulRequireHook = null;
|
||||
if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !== -1) {
|
||||
@ -33,7 +36,7 @@ if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !==
|
||||
_istanbulRequireHook = require('./istanbul-local').istanbulRequireHook;
|
||||
// async keyword isn't supported by the Esprima version used by Istanbul version used by us.
|
||||
// TODO: update istanbul to istanbul-lib-* (see http://istanbul.js.org/) and remove this hack.
|
||||
compilerOptions.compilerOptions.target = 'es2016';
|
||||
compilerOptions.target = 'es2016';
|
||||
}
|
||||
|
||||
|
||||
@ -98,7 +101,7 @@ require.extensions['.ts'] = function (m, filename) {
|
||||
const source = fs.readFileSync(filename).toString();
|
||||
|
||||
try {
|
||||
let result = ts.transpile(source, compilerOptions['compilerOptions'], filename);
|
||||
let result = ts.transpile(source, compilerOptions, filename);
|
||||
|
||||
if (_istanbulRequireHook) {
|
||||
result = _istanbulRequireHook(result, filename);
|
||||
|
@ -1,6 +1,12 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"inlineSourceMap": true,
|
||||
"sourceRoot": ".",
|
||||
// Inline sources are necessary for our tests to show the proper sources, since we are using
|
||||
// Istanbul (not Constantinople) as well, and applying both source maps to get the original
|
||||
// source in devtools.
|
||||
"inlineSources": true,
|
||||
"types": [
|
||||
"node",
|
||||
"jasmine"
|
||||
|
@ -15,12 +15,6 @@
|
||||
"rootDir": ".",
|
||||
"skipDefaultLibCheck": true,
|
||||
"skipLibCheck": true,
|
||||
"inlineSourceMap": true,
|
||||
"sourceRoot": ".",
|
||||
// Inline sources are necessary for our tests to show the proper sources, since we are using
|
||||
// Istanbul (not Constantinople) as well, and applying both source maps to get the original
|
||||
// source in devtools.
|
||||
"inlineSources": true,
|
||||
"strictNullChecks": true,
|
||||
"target": "es2017",
|
||||
"lib": [
|
||||
|
Loading…
x
Reference in New Issue
Block a user