Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make tsconfig-paths work with comments in tsconfig.json #588

Merged
merged 1 commit into from
Sep 14, 2020
Merged

fix: make tsconfig-paths work with comments in tsconfig.json #588

merged 1 commit into from
Sep 14, 2020

Commits on Sep 12, 2020

  1. fix: make tsconfig-paths work with comments in tsconfig.json

    When you run `tsc --init` it creates a tsconfig.json which includes two types of comments:
    1. // single line
    2. /* multiline */
    
    When using `require()` to load this tsconfig.json with comments it throws an error:
    `SyntaxError: /path/to/tsconfig.json: Unexpected token / in JSON at position 29`
    
    This is why tsconfig-paths uses it's own `loadTsconfig` function to parse that JSON file.
    So we can simply use that instead of `require()`
    RafaelKr committed Sep 12, 2020
    Configuration menu
    Copy the full SHA
    0998aa5 View commit details
    Browse the repository at this point in the history