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) })
66// Based on https://stackoverflow.com/questions/27367261/check-if-file-exists-case-sensitive
77// Case checking is required, to avoid errors raised by case-sensitive-paths-webpack-plugin
88function fileExistsWithCaseSync ( filepath ) {
9- const dir = path . dirname ( filepath )
9+ const { base , dir, root } = path . parse ( filepath )
1010
11- if ( dir === '/' || dir === '.' ) {
11+ if ( dir === root || dir === '.' ) {
1212 return true
1313 }
1414
1515 try {
1616 const filenames = fs . readdirSync ( dir )
17- if ( ! filenames . includes ( path . basename ( filepath ) ) ) {
17+ if ( ! filenames . includes ( base ) ) {
1818 return false
1919 }
2020 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments