Skip to content

Commit 8b3ebd6

Browse files
committed
fix test
1 parent 2f66ef4 commit 8b3ebd6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/generate-code.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,20 @@ module.exports = function generateCode(
2828

2929
var tempOutput = node.toString()
3030

31+
console.log(tempOutput)
32+
33+
if (
34+
tempOutput.match(/\}\(.*.?Vue\);/) &&
35+
tempOutput.includes('vue-class-component')
36+
) {
37+
node.add(';exports.default = {...exports.default.__vccBase};')
38+
}
39+
3140
if (tempOutput.includes('exports.render = render;')) {
3241
node.add(';exports.default = {...exports.default, render};')
3342
} else {
3443
node.add(';exports.default = {...exports.default};')
3544
}
45+
3646
return node.toStringWithSourceMap({ file: filename })
3747
}

0 commit comments

Comments
 (0)