Skip to content

Commit 3be3007

Browse files
author
Elevista
committed
fix vuejs#943, regex should consider path or file name includes dot
1 parent 4949f9e commit 3be3007

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/selector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function (content) {
1010
this.cacheable()
1111
var query = loaderUtils.getOptions(this) || {}
1212
var context = (this._compiler && this._compiler.context) || this.options.context || process.cwd()
13-
var filename = path.relative(context, this.resourcePath).replace(/\..+$/, '.vue')
13+
var filename = path.relative(context, this.resourcePath).replace(/\.(?:.(?!\.))+$/, '.vue')
1414
var parts = parse(content, filename, this.sourceMap)
1515
var part = parts[query.type]
1616
if (Array.isArray(part)) {

0 commit comments

Comments
 (0)