diff --git a/lib/build/index.js b/lib/build/index.js index f1b7eddf24..8be96359b1 100644 --- a/lib/build/index.js +++ b/lib/build/index.js @@ -20,7 +20,12 @@ const r = function () { if (_.last(args).includes('~')) { return _.last(args) } - return resolve.apply(null, arguments) + + let filepath = resolve.apply(null, arguments) + if (/^win/.test(process.platform)) { + filepath = filepath.replace(/\\/g, '\\\\') + } + return filepath } const defaults = {