Skip to content

Commit

Permalink
修复xlsx打包
Browse files Browse the repository at this point in the history
  • Loading branch information
vue3plugin committed Mar 16, 2024
1 parent 26bc4dd commit 8410778
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
7 changes: 4 additions & 3 deletions build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import pkg from "../package.json"
import { writeFileSync, readFileSync, existsSync, mkdirSync } from "fs";

// 创建dist 文件夹
if(!existsSync(path.resolve(__dirname, "../dist"))){
if (!existsSync(path.resolve(__dirname, "../dist"))) {
mkdirSync(path.resolve(__dirname, "../dist"))
}

const libs = ["axios", "echarts", "crud", "vueComponent", "pdf"]
const libs = ["axios", "echarts", "crud", "vueComponent", "pdf", "xlsx"]

const _exports = {}

Expand All @@ -21,12 +21,13 @@ for (const lib of libs) {
}

(
async function(){
async function () {
await build({ configFile: path.join(__dirname, `./vite/axios.config.ts`) })
await build({ configFile: path.join(__dirname, `./vite/echarts.config.ts`) })
await build({ configFile: path.join(__dirname, `./vite/crud.config.ts`) })
await build({ configFile: path.join(__dirname, `./vite/vueComponent.config.ts`) })
await build({ configFile: path.join(__dirname, `./vite/pdf.config.ts`) })
await build({ configFile: path.join(__dirname, `./vite/xlsx.config.ts`) })
}
)()
// --------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions example/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

export {}

Expand All @@ -21,7 +20,7 @@ declare module '@vue/runtime-core' {
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
AMenuItemGroup: typeof import('ant-design-vue/es')['MenuItemGroup']
ASpace: typeof import('ant-design-vue/es')['Space']
CodeView: typeof import('./src/components/CodeView.vue')['default']
CodeView: typeof import("./src/components/CodeView")['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "howuse",
"version": "0.0.5-beta.2",
"version": "0.0.5-beta.3",
"description": "a simple Vue Composition utils",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -80,4 +80,4 @@
"lodash-es": "^4.17.21",
"mitt": "^3.0.0"
}
}
}
2 changes: 1 addition & 1 deletion src/xlsx/tools/xlsx-json.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createDef } from "howuse/utils/util"
import { createDef } from "../../utils/util"
import { utils, writeFile } from "xlsx"
import { readXlsx } from "./xlsx"

Expand Down
2 changes: 1 addition & 1 deletion src/xlsx/tools/xlsx-table.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createDef } from "howuse/utils/util";
import { createDef } from "../../utils/util"
import { type Table2SheetOpts, utils, writeFile } from "xlsx";


Expand Down

0 comments on commit 8410778

Please sign in to comment.