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

Commit 7a9c05d

Browse files
author
Doug Beney
authored
Fix for #138 and #162
This fixes the error that throws "sourceMap: options._flags.debug TypeError: Cannot read property 'debug' of undefined"
1 parent 8d3159f commit 7a9c05d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
var through = require('through')
22
var compiler = require('./lib/compiler')
3+
var debug = true
34

45
module.exports = function vueify (file, options) {
56
if (!/.vue$/.test(file)) {
67
return through()
78
}
9+
10+
if (options.hasOwnProperty('_flags')) {
11+
if (options._flags.hasOwnProperty('debug')) {
12+
debug = options._flags.debug
13+
}
14+
}
815

916
compiler.loadConfig()
1017
compiler.applyConfig(options)
1118
compiler.applyConfig({
12-
sourceMap: options._flags.debug
19+
sourceMap: debug
1320
})
1421

1522
var data = ''

0 commit comments

Comments
 (0)