Skip to content
This repository was archived by the owner on May 22, 2022. It is now read-only.

Commit 9dd1738

Browse files
committed
fix: build config
1 parent 7b0a2a2 commit 9dd1738

File tree

3 files changed

+46
-38
lines changed

3 files changed

+46
-38
lines changed

.github/workflows/client-publish-gh.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

ts-packages/vue-excel-initializer/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
"scripts": {
2424
"dev": "vite",
2525
"serve": "vite preview",
26-
"build": "yarn clean && yarn compile",
26+
"build": "vite build && tsc --emitDeclarationOnly",
2727
"clean": "rm -rf ./dist ./coverage ./generated",
28-
"compile": "tsc -p tsconfig.build.json",
2928
"patch": "yarn version --patch && git push && git push origin --tags",
3029
"minor": "yarn version --minor && git push && git push origin --tags"
3130
},
@@ -35,6 +34,12 @@
3534
"peerDependencies": {
3635
"vue": "^3.1.0-beta.7"
3736
},
37+
"exports": {
38+
".": {
39+
"import": "./dist/vue-excel-initializer.es.js",
40+
"require": "./dist/vue-excel-initializer.umd.js"
41+
}
42+
},
3843
"devDependencies": {
3944
"@vitejs/plugin-vue": "^1.2.3",
4045
"@vue/compiler-sfc": "^3.0.11",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import vue from '@vitejs/plugin-vue'
2+
import vueJsx from '@vitejs/plugin-vue-jsx'
3+
import path from 'path'
4+
// import ts from 'rollup-plugin-typescript2'
5+
import { defineConfig } from 'vite'
6+
7+
// https://vitejs.dev/config/
8+
export default defineConfig({
9+
plugins: [
10+
vue(),
11+
vueJsx({
12+
// options are passed on to @vue/babel-plugin-jsx
13+
}),
14+
],
15+
optimizeDeps: {
16+
// include: ['@ant-design/icons-vue'],
17+
},
18+
build: {
19+
lib: {
20+
entry: path.resolve(__dirname, 'lib/index.ts'),
21+
name: '@xsoulspace/vue-excel-initializer',
22+
},
23+
rollupOptions: {
24+
// make sure to externalize deps that shouldn't be bundled
25+
// into your library
26+
input: 'index.ts',
27+
external: ['vue'],
28+
plugins: [],
29+
output: {
30+
dir: './dist',
31+
// // Provide global variables to use in the UMD build
32+
// // for externalized deps
33+
globals: {
34+
vue: 'vue',
35+
},
36+
},
37+
},
38+
},
39+
})

0 commit comments

Comments
 (0)