Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.

Commit

Permalink
Fix for #138 and #162
Browse files Browse the repository at this point in the history
This fixes the error that throws "sourceMap: options._flags.debug TypeError: Cannot read property 'debug' of undefined"
  • Loading branch information
Doug Beney authored Apr 11, 2018
1 parent 8d3159f commit 7a9c05d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
var through = require('through')
var compiler = require('./lib/compiler')
var debug = true

module.exports = function vueify (file, options) {
if (!/.vue$/.test(file)) {
return through()
}

if (options.hasOwnProperty('_flags')) {
if (options._flags.hasOwnProperty('debug')) {
debug = options._flags.debug
}
}

compiler.loadConfig()
compiler.applyConfig(options)
compiler.applyConfig({
sourceMap: options._flags.debug
sourceMap: debug
})

var data = ''
Expand Down

1 comment on commit 7a9c05d

@mtx-z
Copy link

@mtx-z mtx-z commented on 7a9c05d May 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it merged to a release ? #162
thanks

Please sign in to comment.