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: fix sourceMap path separator on Windows, default sourceRoot to "" #51

Merged
merged 1 commit into from
Jan 14, 2019
Merged

fix: fix sourceMap path separator on Windows, default sourceRoot to "" #51

merged 1 commit into from
Jan 14, 2019

Conversation

3cp
Copy link
Contributor

@3cp 3cp commented Jan 14, 2019

This enforces separator '/' is used for any OS. It also changed sourceRoot default value from process.cwd() to empty string, because local directory is irrelevant in browser where sourceMap is consumed.

closes #47

This enforces separator '/' is used for any OS. It also changed sourceRoot default value from process.cwd() to empty string, because
local directory is irrelevant in browser where sourceMap is consumed.

closes #47
@3cp
Copy link
Contributor Author

3cp commented Jan 14, 2019

I will wait for this fix to be released before doing a follow up PR for vue-component-compiler, because the cleaned sourceRoot should have a nice side effect on the vue-component-compiler /test/__snapshots__/compile.spec.ts.snap.

@znck znck merged commit df32cd9 into vuejs:master Jan 14, 2019
@3cp 3cp deleted the fix-source-map-path-separator branch January 14, 2019 22:27
znck pushed a commit to vuejs/vue-component-compiler that referenced this pull request Feb 1, 2019
* chore: upgrade packages, cleanup type errors

Took the opportunity to update TS to latest version, cleanup all type errors.

* fix: normalize source map file path on windows

Updated test snapshot file.
1. Sources paths was cleaned up by upgrading component-compiler-utils.
2. Styles mapping changes are due to newer version of postcss (from component-compiler-utils).
3. postcss rawResult is removed.
 * The rawResult contains ast tree which postcss always prepends current working directory to referencing file name.
 * This is a main pain point of maintaining this snapshot test.
 * The correctness of rawResult is responsibility of postcss, not vue compiler. So it's irrelevant to test it here.

This is a companion PR for vuejs/component-compiler-utils#51
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.

Source-map issue on windows
2 participants