Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/@vue/cli-plugin-babel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function getDepPathRegex (dependencies) {
? depPath.replace(/\\/g, '\\\\') // double escape for windows style path
: depPath
} else if (dep instanceof RegExp) {
return dep.source
return isWindows
? dep.source.replace(/\\\//g, '\\\\') // /@scope\/external-(dep1|dep2)/ >>> /@scope\\external-(dep1|dep2)/
: dep.source
}

throw new Error('transpileDependencies only accepts an array of string or regular expressions')
Expand Down