Skip to content

Commit 29f3178

Browse files
authored
use basename of entry file
1 parent a662bea commit 29f3178

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/vue-build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,10 @@ function merge (obj) {
362362
return obj
363363
}
364364

365-
function replaceExtension (str, ext) {
366-
return str.replace(/\.(vue|js)$/, ext)
365+
function replaceExtension (entry, ext) {
366+
return path.basename(entry).replace(/\.(vue|js)$/, ext)
367367
}
368368

369-
function getLibraryName (str) {
370-
return str.replace(/[-_.]([\w])/, (_, p1) => p1.toUpperCase())
369+
function getLibraryName (fileName) {
370+
return fileName.replace(/[-_.]([\w])/, (_, p1) => p1.toUpperCase())
371371
}

0 commit comments

Comments
 (0)