1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/vue-loader/lib/plugin.js

18 lines
427 B
JavaScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
const { testWebpack5 } = require('./codegen/utils')
2023-12-18 13:12:25 +08:00
const NS = 'vue-loader'
class VueLoaderPlugin {
2024-01-16 21:26:16 +08:00
apply(compiler) {
let Ctor = null
if (testWebpack5(compiler)) {
// webpack5 and upper
Ctor = require('./plugin-webpack5')
2023-12-18 13:12:25 +08:00
} else {
2024-01-16 21:26:16 +08:00
// webpack4 and lower
Ctor = require('./plugin-webpack4')
2023-12-18 13:12:25 +08:00
}
2024-01-16 21:26:16 +08:00
new Ctor().apply(compiler)
2023-12-18 13:12:25 +08:00
}
}
VueLoaderPlugin.NS = NS
module.exports = VueLoaderPlugin