We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a570ba0 commit 6b825deCopy full SHA for 6b825de
packages/@vue/cli-service-global/lib/util.js
@@ -6,15 +6,15 @@ exports.toPlugin = id => ({ id, apply: require(id) })
6
// Based on https://stackoverflow.com/questions/27367261/check-if-file-exists-case-sensitive
7
// Case checking is required, to avoid errors raised by case-sensitive-paths-webpack-plugin
8
function fileExistsWithCaseSync (filepath) {
9
- const dir = path.dirname(filepath)
+ const { base, dir, root } = path.parse(filepath)
10
11
- if (dir === '/' || dir === '.') {
+ if (dir === root || dir === '.') {
12
return true
13
}
14
15
try {
16
const filenames = fs.readdirSync(dir)
17
- if (!filenames.includes(path.basename(filepath))) {
+ if (!filenames.includes(base)) {
18
return false
19
20
} catch (e) {
0 commit comments