Skip to content

Commit

Permalink
use basename of entry file
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist authored Jan 31, 2017
1 parent a662bea commit 29f3178
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/vue-build
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,10 @@ function merge (obj) {
return obj
}

function replaceExtension (str, ext) {
return str.replace(/\.(vue|js)$/, ext)
function replaceExtension (entry, ext) {
return path.basename(entry).replace(/\.(vue|js)$/, ext)
}

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

0 comments on commit 29f3178

Please sign in to comment.