Expected behavior:
when using the latest version of gulp 4.0.0 alpha 3 typescript compilation should work.
Actual behavior:
In it's latest alpha gulp have upgraded the usage of vinyl to 2.0 or 2.1 (or in your case it seems that upgrading to vinyl-fs to ^3.0.0), somehow (I don't know why) this breaks building typescripts with gulp-typescript. See gulpjs/gulp#2065 for more information.
Your gulpfile:
Include your gulpfile, or only the related task (with ts.createProject).
var gulp = require("gulp");
var typescript = require("gulp-typescript");
var sourcemaps = require("gulp-sourcemaps");
var typescriptCompile = function (file, done) {
const tsProject = typescript.createProject("tsconfig.json");
if (file === null) {
file = srcPaths.typescript + "**/*.ts";
} else {
console.log(`Compiling ${ file }`);
}
gulp.src(file)
.pipe(sourcemaps.init())
.pipe(tsProject())
.js
.pipe(sourcemaps.write(".", {
includeContent: true, mapSources: function (sourcePath) {
while (sourcePath.startsWith("../")) {
sourcePath = sourcePath.replace("../", "");
}
return `/${sourcePath}`;
} }))
.pipe(gulp.dest(destPaths.app))
.on("end", done);
};
gulp.task("compile.typescript", function (done) {
typescriptCompile(null, done);
});
Expected behavior: when using the latest version of gulp 4.0.0 alpha 3 typescript compilation should work.
Actual behavior:
In it's latest alpha gulp have upgraded the usage of vinyl to 2.0 or 2.1 (or in your case it seems that upgrading to vinyl-fs to ^3.0.0), somehow (I don't know why) this breaks building typescripts with gulp-typescript. See gulpjs/gulp#2065 for more information.
Your gulpfile:
Include your gulpfile, or only the related task (with
ts.createProject
).