Skip to content

Commit

Permalink
Merge pull request #65 from tidbcloud/fix/vue-component-build
Browse files Browse the repository at this point in the history
fix(vue): reduce size, generate type declaration
  • Loading branch information
baurine authored Jul 25, 2024
2 parents 1570c49 + a4092e6 commit 3467a63
Show file tree
Hide file tree
Showing 3 changed files with 378 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tidbcloud/tisqleditor-vue",
"version": "0.0.1",
"version": "0.0.2",
"description": "tisqleditor vue component",
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -31,6 +31,7 @@
"@vitejs/plugin-vue": "^5.0.5",
"typescript": "^5.2.2",
"vite": "^5.3.4",
"vite-plugin-dts": "4.0.0-beta.1",
"vue": "^3.4.31",
"vue-tsc": "^2.0.24"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/vue/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import dts from 'vite-plugin-dts'

export default defineConfig({
plugins: [vue()],
plugins: [vue(), dts()],
build: {
lib: {
entry: 'src/index.ts',
fileName: 'index',
formats: ['es']
},
rollupOptions: {
external: ['vue'],
external: ['vue', '@tidbcloud/tisqleditor'],
output: {
globals: {
vue: 'Vue'
Expand Down
Loading

0 comments on commit 3467a63

Please sign in to comment.