build: 组件打包时排除@vueuse/core、element-plus
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhaojinfeng 121016171@qq.com
|
* @Author: zhaojinfeng 121016171@qq.com
|
||||||
* @Date: 2023-06-19 10:38:07
|
* @Date: 2023-06-19 10:38:07
|
||||||
* @LastEditors: zhaojinfeng 121016171@qq.com
|
* @LastEditors: peerless_hero peerless_hero@outlook.com
|
||||||
* @LastEditTime: 2023-07-21 14:47:27
|
* @LastEditTime: 2023-08-30 15:34:25
|
||||||
* @FilePath: \vue3\bin\build.ts
|
* @FilePath: \vue3\bin\build.ts
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@ -25,6 +25,7 @@ async function buildAComponent(name: string) {
|
|||||||
fileName: 'index',
|
fileName: 'index',
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
external: ['vue', '@vueuse/core', /\.sass/, /element-plus/],
|
||||||
output: [
|
output: [
|
||||||
{
|
{
|
||||||
dir: `es/${name}`,
|
dir: `es/${name}`,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thzxcx/vue3",
|
"name": "@thzxcx/vue3",
|
||||||
"version": "0.0.1",
|
"version": "0.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -38,6 +38,10 @@
|
|||||||
"storybook:help": "storybook build -h",
|
"storybook:help": "storybook build -h",
|
||||||
"prepare": "is-ci || husky install"
|
"prepare": "is-ci || husky install"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@vueuse/core": "*",
|
||||||
|
"element-plus": "^2.3.9"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.2.47"
|
"vue": "^3.2.47"
|
||||||
},
|
},
|
||||||
|
2
types/auto-imports.d.ts
vendored
2
types/auto-imports.d.ts
vendored
@ -307,7 +307,6 @@ declare module 'vue' {
|
|||||||
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
||||||
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
||||||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
|
|
||||||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
||||||
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
||||||
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
||||||
@ -596,7 +595,6 @@ declare module '@vue/runtime-core' {
|
|||||||
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
||||||
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
||||||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
|
|
||||||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
||||||
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
||||||
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
||||||
|
17
types/components.d.ts
vendored
17
types/components.d.ts
vendored
@ -11,23 +11,9 @@ declare module 'vue' {
|
|||||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
|
||||||
ElLink: typeof import('element-plus/es')['ElLink']
|
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
|
||||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
||||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
|
||||||
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
|
||||||
Header: typeof import('./../packages/header/index.vue')['default']
|
Header: typeof import('./../packages/header/index.vue')['default']
|
||||||
MaskText: typeof import('./../packages/mask-text/index.vue')['default']
|
MaskText: typeof import('./../packages/mask-text/index.vue')['default']
|
||||||
PreviewOffice: typeof import('./../packages/preview-office/index.vue')['default']
|
PreviewOffice: typeof import('./../packages/preview-office/index.vue')['default']
|
||||||
@ -41,7 +27,4 @@ declare module 'vue' {
|
|||||||
UploadSingleFile: typeof import('./../packages/upload-single-file/index.vue')['default']
|
UploadSingleFile: typeof import('./../packages/upload-single-file/index.vue')['default']
|
||||||
UploadTable: typeof import('./../packages/upload-table/index.vue')['default']
|
UploadTable: typeof import('./../packages/upload-table/index.vue')['default']
|
||||||
}
|
}
|
||||||
export interface ComponentCustomProperties {
|
|
||||||
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user