Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
fix(utils): path normalization on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
zanona committed Nov 19, 2017
1 parent 80b619d commit 92c5b25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/resolve.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const url = require('url'),
path = require('path'),
platform = require('os').platform(),
filetype = require('./filetype');

/**
Expand Down Expand Up @@ -27,6 +28,9 @@ function main(src = '', parentSrc = '') {

src = path.normalize(src);

// normalize windows paths to unix-style
if (platform === 'win32') src = src.replace(/\\/g, '/');

const r = {
name: src,
type: filetype(src),
Expand Down

0 comments on commit 92c5b25

Please sign in to comment.