File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -340,3 +340,40 @@ test('postLoaders support', done => {
340
340
done ( )
341
341
} )
342
342
} )
343
+
344
+ // https://github.com/vuejs/vue/issues/12828
345
+ test ( 'should skip thread-loader in the template compilation pipeline' , done => {
346
+ mockBundleAndRun ( {
347
+ entry : 'custom-directive.vue' ,
348
+ vue : {
349
+ compilerOptions : {
350
+ directives : {
351
+ i18n ( el , dir ) {
352
+ if ( dir . name === 'i18n' && dir . value ) {
353
+ el . i18n = dir . value
354
+ if ( ! el . props ) {
355
+ el . props = [ ]
356
+ }
357
+ el . props . push ( { name : 'textContent' , value : `_s(${ JSON . stringify ( dir . value ) } )` } )
358
+ }
359
+ }
360
+ }
361
+ }
362
+ } ,
363
+ module : {
364
+ rules : [ {
365
+ test : / \. j s $ / ,
366
+ use : [ {
367
+ loader : 'thread-loader' ,
368
+ options : {
369
+ workers : 2
370
+ }
371
+ } ]
372
+ } ]
373
+ }
374
+ } , ( { window, module } ) => {
375
+ const vnode = mockRender ( module )
376
+ expect ( vnode . data . domProps . textContent ) . toBe ( 'keypath' )
377
+ done ( )
378
+ } )
379
+ } )
You can’t perform that action at this time.
0 commit comments