@@ -8,17 +8,22 @@ var expect = require('chai').expect
88describe ( 'vue-auto-import-loader' , function ( ) {
99
1010 var outputDir = path . resolve ( __dirname , './output' )
11- var loaderPath = 'raw!' + path . resolve ( __dirname , '../ ' )
11+ var loaderPath = path . resolve ( __dirname , '..' )
1212 var globalConfig = {
1313 output : {
1414 path : outputDir ,
1515 filename : 'test.build.vue'
1616 } ,
17+ resolveLoader : {
18+ alias : {
19+ 'vue-auto-import-loader' : loaderPath
20+ }
21+ } ,
1722 module : {
18- loaders : [
23+ rules : [
1924 {
2025 test : / \. v u e $ / ,
21- loader : loaderPath
26+ use : [ 'raw-loader' , 'vue-auto-import-loader' ]
2227 }
2328 ]
2429 }
@@ -98,12 +103,25 @@ describe('vue-auto-import-loader', function () {
98103 it ( 'blank-specific-name' , function ( done ) {
99104 test ( {
100105 entry : './test/fixtures/blank-specific-name/blank.vue' ,
101- vueAutoImport : {
102- files : {
103- template : 'template.html' ,
104- style : 'style.css' ,
105- script : 'script.js'
106- }
106+ module : {
107+ rules : [
108+ {
109+ test : / \. v u e $ / ,
110+ use : [
111+ 'raw-loader' ,
112+ {
113+ loader : 'vue-auto-import-loader' ,
114+ options : {
115+ files : {
116+ template : 'template.html' ,
117+ style : 'style.css' ,
118+ script : 'script.js'
119+ }
120+ }
121+ }
122+ ]
123+ }
124+ ]
107125 }
108126 } , function ( fragment ) {
109127 var typeList = [ ]
@@ -166,8 +184,21 @@ describe('vue-auto-import-loader', function () {
166184 it ( 'scoped' , function ( done ) {
167185 test ( {
168186 entry : './test/fixtures/scoped/scoped.vue' ,
169- vueAutoImport : {
170- scoped : true
187+ module : {
188+ rules : [
189+ {
190+ test : / \. v u e $ / ,
191+ use : [
192+ 'raw-loader' ,
193+ {
194+ loader : 'vue-auto-import-loader' ,
195+ options : {
196+ scoped : true
197+ }
198+ }
199+ ]
200+ }
201+ ]
171202 }
172203 } , function ( fragment ) {
173204 var node = fragment . childNodes [ 0 ]
0 commit comments