Skip to content

Commit 7764aba

Browse files
committed
conditionally supply VueLoaderPlugin in tests (only for webpack 4)
1 parent ab530b4 commit 7764aba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/integration/vue.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ var webpack = require('webpack');
77
var process = require('process');
88
var ForkTsCheckerWebpackPlugin = require('../../lib/index');
99
var IncrementalChecker = require('../../lib/IncrementalChecker');
10-
var VueLoaderPlugin = require('vue-loader/lib/plugin')
1110

1211
var webpackMajorVersion = require('./webpackVersion')();
1312

13+
var VueLoaderPlugin = webpackMajorVersion >= 4 ? require('vue-loader/lib/plugin') : undefined;
14+
1415
describe('[INTEGRATION] vue', function () {
1516
this.timeout(60000);
1617
process.setMaxListeners(0);
@@ -57,7 +58,7 @@ describe('[INTEGRATION] vue', function () {
5758
]
5859
},
5960
plugins: [
60-
new VueLoaderPlugin(),
61+
...(webpackMajorVersion >= 4 ? [new VueLoaderPlugin()] : []),
6162
plugin
6263
]
6364
});

0 commit comments

Comments
 (0)