File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,15 @@ var styleRewriterPath = normalize.lib('style-rewriter')
15
15
var styleLoaderPath = normalize . dep ( 'vue-style-loader' )
16
16
var hotReloadAPIPath = normalize . dep ( 'vue-hot-reload-api' )
17
17
18
- var hasBabel = true
18
+ var hasBabel = false
19
19
try {
20
- require ( 'babel-loader' )
21
- } catch ( e ) {
22
- hasBabel = false
23
- }
20
+ hasBabel = ! ! require ( 'babel-loader' )
21
+ } catch ( e ) { }
22
+
23
+ var hasBuble = false
24
+ try {
25
+ hasBuble = ! ! require ( 'buble-loader' )
26
+ } catch ( e ) { }
24
27
25
28
var rewriterInjectRE = / \b ( c s s (?: - l o a d e r ) ? (?: \? [ ^ ! ] + ) ? ) (?: ! | $ ) /
26
29
@@ -55,7 +58,7 @@ module.exports = function (content) {
55
58
var defaultLoaders = {
56
59
html : templateCompilerPath + '?id=' + moduleId ,
57
60
css : styleLoaderPath + '!css-loader' + ( needCssSourceMap ? '?sourceMap' : '' ) ,
58
- js : hasBabel ? 'babel-loader' : ''
61
+ js : hasBuble ? 'buble-loader' : hasBabel ? 'babel-loader' : ''
59
62
}
60
63
61
64
// check if there are custom loaders specified via
You can’t perform that action at this time.
0 commit comments