Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

TypeScript source maps are containing JavaScript code #856

Closed
@DimitarTachev

Description

@DimitarTachev

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.3.0
  • Cross-platform modules:5.3.0
  • Android Runtime:5.3.0
  • iOS Runtime:5.3.0

Describe the bug
Since we've migrated to ts-loader, the Source Maps are containing JavaScript code instead of the TypeScript one. We've missed part of it's source map configuration and we have to pass sourceMap: true in the compiler options when the env.sourceMap property is set.

To Reproduce

  1. tns create newTsApp --ts && cd newTsApp
  2. tns debug ios --bundle
  3. Open Chrome Dev Tools and try to debug main-view-model.ts.
  4. The file content will be JavaScript, instead of TypeScript.

Expected behavior
You should be able to debug the initial TypeScript files.

Additional context
The issue is even bigger in our Visual Studio Code Extension. You are almost not able to debug TypeScript project at all because the Source Map is not matching the TypeScript files.

Notes
We had a similar issue with Angular projects.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions