File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const hash = require('hash-sum')
10
10
*/
11
11
module . exports = function vueJsxPlugin ( options = { } ) {
12
12
let needHmr = false
13
+ let needSourceMap = true
13
14
14
15
return {
15
16
name : 'vue-jsx' ,
@@ -31,6 +32,7 @@ module.exports = function vueJsxPlugin(options = {}) {
31
32
32
33
configResolved ( config ) {
33
34
needHmr = config . command === 'serve' && ! config . isProduction
35
+ needSourceMap = config . command === 'serve' || ! ! config . build . sourcemap
34
36
} ,
35
37
36
38
transform ( code , id ) {
@@ -47,7 +49,7 @@ module.exports = function vueJsxPlugin(options = {}) {
47
49
const result = babel . transformSync ( code , {
48
50
ast : true ,
49
51
plugins,
50
- sourceMaps : true ,
52
+ sourceMaps : needSourceMap ,
51
53
sourceFileName : id
52
54
} )
53
55
You can’t perform that action at this time.
0 commit comments