Minify: Avoid path.relative()

Constructing a relative pathname on Windows is problematic because the
two absolute pathnames might be on different drives (or UNC paths).
Use `path.resolve()` instead of `path.join()` where appropriate to
avoid the need to construct a relative path.
This commit is contained in:
Richard Hansen 2021-03-01 17:00:05 -05:00 committed by John McLear
parent 8971166c58
commit 797ffa5600
2 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ const compressJS = (content) => Terser.minify(content);
const compressCSS = (filename, ROOT_DIR) => new Promise((res, rej) => {
try {
const absPath = path.join(ROOT_DIR, filename);
const absPath = path.resolve(ROOT_DIR, filename);
/*
* Changes done to migrate CleanCSS 3.x -> 4.x: