@@ -36,15 +36,13 @@ var defaultLang = {
3636
3737// When extracting parts from the source vue file, we want to apply the
3838// loaders chained before vue-loader, but exclude some loaders that simply
39- // produces side effects such as linting. This is a hard-coded list and
40- // hopefully eslint-loader is the only one.
41- var excludedPreLoadersRE = / e s l i n t - l o a d e r /
42-
43- function getRawRequest ( context ) {
39+ // produces side effects such as linting.
40+ function getRawRequest ( context , excludedPreLoaders ) {
41+ excludedPreLoaders = excludedPreLoaders || / e s l i n t - l o a d e r /
4442 return loaderUtils . getRemainingRequest ( {
4543 resource : context . resource ,
4644 loaderIndex : context . loaderIndex ,
47- loaders : context . loaders . filter ( loader => ! excludedPreLoadersRE . test ( loader . path ) )
45+ loaders : context . loaders . filter ( loader => ! excludedPreLoaders . test ( loader . path ) )
4846 } )
4947}
5048
@@ -55,8 +53,8 @@ module.exports = function (content) {
5553
5654 var loaderContext = this
5755 var query = loaderUtils . getOptions ( this ) || { }
58- var rawRequest = getRawRequest ( this )
5956 var options = this . options . __vueOptions__ = Object . assign ( { } , this . options . vue , this . vue , query )
57+ var rawRequest = getRawRequest ( this , options . excludedPreLoaders )
6058
6159 var filePath = this . resourcePath
6260 var fileName = path . basename ( filePath )
0 commit comments