mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-13 17:27:09 +00:00
Fixing windows build (#849)
Co-authored-by: Ingvar Stepanyan <rreverser@google.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { posix as pathUtils } from 'path';
|
||||
import { posix as pathUtils, isAbsolute } from 'path';
|
||||
|
||||
export default function resolveDirs(paths) {
|
||||
const pathBaseDir = paths.map((path) => [
|
||||
@@ -30,6 +30,7 @@ export default function resolveDirs(paths) {
|
||||
if (!resolveResult) {
|
||||
throw new Error(`Couldn't find ${'./' + id}`);
|
||||
}
|
||||
if (isAbsolute(resolveResult.id)) return resolveResult.id;
|
||||
return pathUtils.resolve(resolveResult.id);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user