Fix relative paths (#4594)
* Add tests for relativeRoot * Remove path.posix.join Since this is for file system paths it feels incorrect to use it on URL paths as they are different in many ways. * Rewrite cookie path logic Before we relied on the client to resolve the base given to it by the backend against the path. Instead have the client pass that information along so we can resolve it on the backend. This means the client has to do less work. * Do not remove out directory before watch This is re-used for incremental compilation. Also remove del since that was the only use (and we can use fs.rmdir in the future if we need something like this). * Remove unused function resolveBase
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import { spawn, fork, ChildProcess } from "child_process"
|
||||
import del from "del"
|
||||
import { promises as fs } from "fs"
|
||||
import * as path from "path"
|
||||
import { CompilationStats, onLine, OnLineCallback } from "../../src/node/util"
|
||||
@ -57,8 +56,6 @@ class Watcher {
|
||||
process.on(event, () => this.dispose(0))
|
||||
}
|
||||
|
||||
this.cleanFiles()
|
||||
|
||||
for (const [processName, devProcess] of Object.entries(this.compilers)) {
|
||||
if (!devProcess) continue
|
||||
|
||||
@ -121,15 +118,6 @@ class Watcher {
|
||||
|
||||
//#region Utilities
|
||||
|
||||
/**
|
||||
* Cleans files from previous builds.
|
||||
*/
|
||||
private cleanFiles(): Promise<string[]> {
|
||||
console.log("[Watcher]", "Cleaning files from previous builds...")
|
||||
|
||||
return del(["out/**/*"])
|
||||
}
|
||||
|
||||
/**
|
||||
* Emits a file containing compilation data.
|
||||
* This is especially useful when Express needs to determine if VS Code is still compiling.
|
||||
|
Reference in New Issue
Block a user