diff --git a/lib/commands/new/new-application.json b/lib/commands/new/new-application.json index 10878f97a..c463754a2 100644 --- a/lib/commands/new/new-application.json +++ b/lib/commands/new/new-application.json @@ -201,7 +201,7 @@ "options": { "server": "dev", "extractCss": "prod", - "coverage": "dev" + "coverage": false } }, "unitTestRunner": [{ diff --git a/lib/resources/content/tsconfig.template.json b/lib/resources/content/tsconfig.template.json index c97525536..6e191c7d5 100644 --- a/lib/resources/content/tsconfig.template.json +++ b/lib/resources/content/tsconfig.template.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + // @if bundler.id='cli' "sourceMap": true, "target": "es5", "module": "amd", @@ -11,8 +12,22 @@ "experimentalDecorators": true, "allowJs": true, "moduleResolution": "node", - "lib": ["es2017", "dom"], - "skipLibCheck": true + "lib": ["es2017", "dom"] + // @endif + // @if bundler.id='webpack' + "target": "es5", + "module": "esnext", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "sourceRoot": "src", + "allowJs": true, + "baseUrl": "src", + "skipLibCheck": true, + "lib": [ + "es2017", "dom" + ] + // @endif }, "exclude": [ "node_modules", diff --git a/lib/resources/content/webpack.config.template.js b/lib/resources/content/webpack.config.template.js index 3c249431b..c213c6f1d 100644 --- a/lib/resources/content/webpack.config.template.js +++ b/lib/resources/content/webpack.config.template.js @@ -57,6 +57,7 @@ module.exports = ({production, server, extractCss, coverage} = {}) => ({ // serve index.html for all 404 (required for push-state) historyApiFallback: true }, + devtool: production ? 'nosources-source-map' : 'cheap-module-eval-source-map', module: { rules: [ // CSS required in JS/TS files should use the style-loader that auto-injects it into the website