aurelia / new

The Aurelia 2 scaffolding repo used by our tools to setup new projects.
MIT License
35 stars 18 forks source link

Add source maps for Typescript projects #62

Closed nenadvicentic closed 3 years ago

nenadvicentic commented 3 years ago

It would be good to add "sourceMap": true to the "compilerOptions" section of tsconfig.json file, so that it's possible to debug the project out of the box.

{
  "compilerOptions": {
    ...
    "sourceMap": true
  },
}
3cp commented 3 years ago

The trouble is much deeper than tsconfig setting. You can follow this issue: aurelia/aurelia#1052

It was webpack's ts-loader. It assumes it's the first loader in the chain, and refused to be a good citizen of webpack loaders.

FYI, we don't have this issue for Aurelia 1 because Aurelia 1 doesn't do anything at compile time, it does in runtime. But Aurelia 2 transpiles your source code at compile time, in order to reduce runtime complexity (smaller lib size at runtime).

3cp commented 3 years ago

If the added line does make the situation better. Yes, pls raise a PR, you can edit online for that file.