You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
427 B
17 lines
427 B
const { testWebpack5 } = require('./codegen/utils') |
|
const NS = 'vue-loader' |
|
class VueLoaderPlugin { |
|
apply(compiler) { |
|
let Ctor = null |
|
if (testWebpack5(compiler)) { |
|
// webpack5 and upper |
|
Ctor = require('./plugin-webpack5') |
|
} else { |
|
// webpack4 and lower |
|
Ctor = require('./plugin-webpack4') |
|
} |
|
new Ctor().apply(compiler) |
|
} |
|
} |
|
VueLoaderPlugin.NS = NS |
|
module.exports = VueLoaderPlugin
|
|
|