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')
1515var styleLoaderPath = normalize . dep ( 'vue-style-loader' )
1616var hotReloadAPIPath = normalize . dep ( 'vue-hot-reload-api' )
1717
18- var hasBabel = true
18+ var hasBabel = false
1919try {
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 ) { }
2427
2528var rewriterInjectRE = / \b ( c s s (?: - l o a d e r ) ? (?: \? [ ^ ! ] + ) ? ) (?: ! | $ ) /
2629
@@ -55,7 +58,7 @@ module.exports = function (content) {
5558 var defaultLoaders = {
5659 html : templateCompilerPath + '?id=' + moduleId ,
5760 css : styleLoaderPath + '!css-loader' + ( needCssSourceMap ? '?sourceMap' : '' ) ,
58- js : hasBabel ? 'babel-loader' : ''
61+ js : hasBuble ? 'buble-loader' : hasBabel ? 'babel-loader' : ''
5962 }
6063
6164 // check if there are custom loaders specified via
You can’t perform that action at this time.
0 commit comments