Skip to content
Permalink
Browse files
keep path of source file in source map (#895)
  • Loading branch information
Elevista authored and yyx990803 committed Aug 3, 2017
1 parent c48b6c7 commit 1cff850793e8817c0cd9200d1d40f29ee365cdd8
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/selector.js
@@ -9,7 +9,8 @@ var loaderUtils = require('loader-utils')
module.exports = function (content) {
this.cacheable()
var query = loaderUtils.getOptions(this) || {}
var filename = path.basename(this.resourcePath)
var context = (this._compiler && this._compiler.context) || this.options.context || process.cwd()
var filename = path.relative(context, this.resourcePath).replace(/\..+$/, '.vue')
var parts = parse(content, filename, this.sourceMap)
var part = parts[query.type]
if (Array.isArray(part)) {

0 comments on commit 1cff850

Please sign in to comment.