travel/admin/node_modules/vue-loader/lib/plugin.js

18 lines
427 B
JavaScript
Raw Normal View History

2024-06-24 11:28:18 +08:00
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