File tree 3 files changed +21
-12
lines changed
3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,8 @@ module.exports = {
330
330
} ,
331
331
332
332
/**
333
- * If enabled, the react preset is added to Babel:
333
+ * If enabled, the react preset is added to Babel.
334
+ *
334
335
* https://babeljs.io/docs/plugins/preset-react/
335
336
*
336
337
* @returns {exports }
@@ -342,14 +343,14 @@ module.exports = {
342
343
} ,
343
344
344
345
/**
345
- * If enabled, the vue-loader is added:
346
- * https://vue-loader.vuejs.org/en/
346
+ * If enabled, the Vue.js loader is enabled.
347
347
*
348
- * @param {object } options see https://vue-loader.vuejs.org/en/configurations/advanced.html
349
- * @return {exports }
348
+ * https://github.com/vuejs/vue-loader
349
+ *
350
+ * @returns {exports }
350
351
*/
351
- enableVueLoader ( options = { } ) {
352
- webpackConfig . enableVueLoader ( options ) ;
352
+ enableVueJsLoader ( ) {
353
+ webpackConfig . enableVueJsLoader ( ) ;
353
354
354
355
return this ;
355
356
} ,
Original file line number Diff line number Diff line change @@ -45,13 +45,12 @@ class WebpackConfig {
45
45
resolve_url_loader : true
46
46
} ;
47
47
this . useLessLoader = false ;
48
- this . useVueLoader = false ;
49
- this . vueOptions = { } ;
50
48
this . cleanupOutput = false ;
51
49
this . sharedCommonsEntryName = null ;
52
50
this . providedVariables = { } ;
53
51
this . babelConfigurationCallback = function ( ) { } ;
54
52
this . useReact = false ;
53
+ this . useVueJsLoader = false ;
55
54
this . loaders = [ ] ;
56
55
}
57
56
@@ -224,9 +223,8 @@ class WebpackConfig {
224
223
this . useReact = true ;
225
224
}
226
225
227
- enableVueLoader ( options ) {
228
- this . useVueLoader = true ;
229
- this . vueOptions = options ;
226
+ enableVueJsLoader ( ) {
227
+ this . useVueJsLoader = true ;
230
228
}
231
229
232
230
cleanupOutputBeforeBuild ( ) {
Original file line number Diff line number Diff line change @@ -168,6 +168,16 @@ class ConfigGenerator {
168
168
rules . push ( loader ) ;
169
169
} ) ;
170
170
171
+ if ( this . webpackConfig . useVueJsLoader ) {
172
+ rules . push ( {
173
+ test : / \. v u e $ / ,
174
+ loader : 'vue-loader' ,
175
+ options : {
176
+ loaders : [ ]
177
+ }
178
+ } ) ;
179
+ }
180
+
171
181
return rules ;
172
182
}
173
183
You can’t perform that action at this time.
0 commit comments