With the above two fixes, it can fix https://travis-ci.org/dumberjs/gulp-vue-file/builds/477568946Update: I managed to fix the gulp-vue-file bug within gulp-vue-file by rewriting sourcemaps (normalize sources and file path). But the incoming sourcemaps should also be fixed in vue compiler.
Let me know what you think, I can make some PRs for this.
First, mozilla/source-map doesn't support
\
as separator at all, because it's designed to be consumed in browser.https://github.com/mozilla/source-map/issues/91
file
andsourceRoot
has to be normalized. https://github.com/vuejs/component-compiler-utils/blob/8de35e69abc1d7ac9dc879237f0f2743c70b0327/lib/parse.ts#L91-L93There is one more to be fixed in
@vue/component-compiler
. https://github.com/vuejs/vue-component-compiler/blob/afa1cd440123e2e0c195908c1e15935273ac64a9/src/assembler.ts#L77sourceRoot
doesn't make much sense, because when serving the source-map to browser,process.cwd()
is irrelevant. https://github.com/vuejs/component-compiler-utils/blob/8de35e69abc1d7ac9dc879237f0f2743c70b0327/lib/parse.ts#L52Change to
With the above two fixes, it can fix https://travis-ci.org/dumberjs/gulp-vue-file/builds/477568946Update: I managed to fix the gulp-vue-file bug within gulp-vue-file by rewriting sourcemaps (normalize sources and file path). But the incoming sourcemaps should also be fixed in vue compiler.Let me know what you think, I can make some PRs for this.