@@ -8,17 +8,22 @@ var expect = require('chai').expect
8
8
describe ( 'vue-auto-import-loader' , function ( ) {
9
9
10
10
var outputDir = path . resolve ( __dirname , './output' )
11
- var loaderPath = 'raw!' + path . resolve ( __dirname , '../ ' )
11
+ var loaderPath = path . resolve ( __dirname , '..' )
12
12
var globalConfig = {
13
13
output : {
14
14
path : outputDir ,
15
15
filename : 'test.build.vue'
16
16
} ,
17
+ resolveLoader : {
18
+ alias : {
19
+ 'vue-auto-import-loader' : loaderPath
20
+ }
21
+ } ,
17
22
module : {
18
- loaders : [
23
+ rules : [
19
24
{
20
25
test : / \. v u e $ / ,
21
- loader : loaderPath
26
+ use : [ 'raw-loader' , 'vue-auto-import-loader' ]
22
27
}
23
28
]
24
29
}
@@ -98,12 +103,25 @@ describe('vue-auto-import-loader', function () {
98
103
it ( 'blank-specific-name' , function ( done ) {
99
104
test ( {
100
105
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
+ ]
107
125
}
108
126
} , function ( fragment ) {
109
127
var typeList = [ ]
@@ -166,8 +184,21 @@ describe('vue-auto-import-loader', function () {
166
184
it ( 'scoped' , function ( done ) {
167
185
test ( {
168
186
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
+ ]
171
202
}
172
203
} , function ( fragment ) {
173
204
var node = fragment . childNodes [ 0 ]
0 commit comments