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 missing source maps for ts files in subdirectories on Windows #472

Merged
merged 1 commit into from
Dec 24, 2016
Merged

Fix missing source maps for ts files in subdirectories on Windows #472

merged 1 commit into from
Dec 24, 2016

Conversation

nenadvicentic
Copy link
Contributor

Due to the fact that gulp-sourcemaps library always creates new SourceMap using unix style paths (tHis can be clearly seen at the line 199 of init.js):

    if (!sourceMap) {
      // Make an empty source map
      sourceMap = {
        version: 3,
        names: [],
        mappings: '',
        sources: [unixStylePath(file.relative)], // line 199, unix style path
        sourcesContent: [fileContent]
      };
    }

gulp-typescript should also use unix style path when using SourceMapGenerator.setSourceContent method directly. Otherwise source maps for ts files in project subdirectories on Windows system are missing due to backslash/forwardslash missmatch in the SourceMapGenerator (mozzilla/source-map).

@ivogabe ivogabe merged commit 6c9a944 into ivogabe:master Dec 24, 2016
@ivogabe
Copy link
Owner

ivogabe commented Dec 24, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants