File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/@vue/cli-service-global/lib Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,15 @@ exports.toPlugin = id => ({ id, apply: require(id) })
6
6
// Based on https://stackoverflow.com/questions/27367261/check-if-file-exists-case-sensitive
7
7
// Case checking is required, to avoid errors raised by case-sensitive-paths-webpack-plugin
8
8
function fileExistsWithCaseSync ( filepath ) {
9
- const dir = path . dirname ( filepath )
9
+ const { base , dir, root } = path . parse ( filepath )
10
10
11
- if ( dir === '/' || dir === '.' ) {
11
+ if ( dir === root || dir === '.' ) {
12
12
return true
13
13
}
14
14
15
15
try {
16
16
const filenames = fs . readdirSync ( dir )
17
- if ( ! filenames . includes ( path . basename ( filepath ) ) ) {
17
+ if ( ! filenames . includes ( base ) ) {
18
18
return false
19
19
}
20
20
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments