Skip to content

Commit

Permalink
fix: 完善发布配置
Browse files Browse the repository at this point in the history
  • Loading branch information
shinetingli committed Feb 6, 2023
1 parent ba6b3ff commit 837d289
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-draggable-tree-next",
"version": "1.0.0",
"version": "1.0.4",
"description": "The json tree built based on vue3 supports node dragging, adding, editing and deleting, etc.",
"author": {
"name": "TingShine",
Expand All @@ -9,23 +9,25 @@
"repository": {
"url": "https://github.com/TingShine/vue-draggable-tree-next"
},
"module": "./dist/index.js",
"browser": "./dist/index.js",
"module": "./dist/index.mjs",
"browser": "./dist/index.umd.js",
"types": "./dist/packages/index.d.ts",
"exports": {
".": {
"types": "./dist/packages/index.d.ts",
"browser": "./dist/index.js",
"import": "./dist/index.js",
"require": "./dist/index.js"
"browser": "./dist/index.umd.js",
"import": "./dist/index.mjs",
"require": "./dist/index.umd.js"
},
"./style.css": {
"import": "./dist/style.css"
}
},
"keywords": [
"vue3",
"draggable",
"tree",
"json",
"custom",
"tdesign"
],
"files": [
Expand All @@ -41,12 +43,13 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
"tdesign-icons-vue-next": "^0.1.7",
"tdesign-vue-next": "^1.0.5",
"vue": "^3.2.45",
"vuedraggable": "^4.1.0",
"tdesign-vue-next": "^1.0.4"
"vuedraggable": "^4.1.0"
},
"devDependencies": {
"vite-plugin-dts": "^1.7.2",
"rollup-plugin-commonjs": "^10.1.0",
"@rushstack/eslint-patch": "^1.1.4",
"@types/jsdom": "^20.0.1",
"@types/node": "^18.11.12",
Expand All @@ -66,12 +69,14 @@
"tailwindcss": "^3.2.4",
"typescript": "~4.7.4",
"vite": "^4.0.0",
"vite-plugin-dts": "^1.7.2",
"vite-svg-loader": "^4.0.0",
"vitest": "^0.25.6",
"vue-tsc": "^1.0.12"
},
"peerDependencies": {
"tdesign-vue-next": "^1.0.4",
"vue": "^3.2.45"
"vue": "^3.2.45",
"tdesign-icons-vue-next": "^0.1.7"
}
}
8 changes: 6 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ import vueJsx from "@vitejs/plugin-vue-jsx";
import svgLoader from "vite-svg-loader";
import { resolve } from "path";
import dts from "vite-plugin-dts";
import commonjs from 'rollup-plugin-commonjs';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), vueJsx(), svgLoader(), dts()],
plugins: [ vue(), vueJsx(), svgLoader(), dts()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./packages", import.meta.url)),
},
},
build: {
target: "modules",
lib: {
entry: resolve(__dirname, "packages/index.ts"),
formats: ["es"],
formats: ["es", "umd"],
fileName: "index",
name: 'index',
},
copyPublicDir: false,
rollupOptions: {
external: ["vue", "tdesign-vue-next", "tdesign-icons-vue-next"],
plugins: [commonjs()],
},
},
});

0 comments on commit 837d289

Please sign in to comment.