@@@@@@
This commit is contained in:
30
library/build/unplugin/index.ts
Normal file
30
library/build/unplugin/index.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @description: 动态导入components
|
||||
* @author sundan
|
||||
*/
|
||||
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
import { unplugin } from 'vite-plugin-unplugin'
|
||||
|
||||
export const createUnPlugin = (env: Record<string, string>) => {
|
||||
return unplugin({
|
||||
env,
|
||||
imports: [
|
||||
'vue',
|
||||
'pinia',
|
||||
'vue-i18n',
|
||||
'vue-router',
|
||||
'@vueuse/core',
|
||||
{
|
||||
axios: [['default', 'axios']],
|
||||
},
|
||||
],
|
||||
resolvers: [
|
||||
ElementPlusResolver({
|
||||
importStyle: false,
|
||||
}),
|
||||
],
|
||||
dirs: [
|
||||
],
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user