Skip to content

Commit

Permalink
fix(webpack): enable sourcemaps by default
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenVinke committed Aug 23, 2017
1 parent 4880c19 commit 0525dca
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/commands/new/new-application.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"options": {
"server": "dev",
"extractCss": "prod",
"coverage": "dev"
"coverage": false
}
},
"unitTestRunner": [{
Expand Down
19 changes: 17 additions & 2 deletions lib/resources/content/tsconfig.template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compileOnSave": false,
"compilerOptions": {
// @if bundler.id='cli'
"sourceMap": true,
"target": "es5",
"module": "amd",
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions lib/resources/content/webpack.config.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0525dca

Please sign in to comment.