1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
| import { resolve } from 'path';
| import { defineConfig } from 'vite';
| // import removeConsole from 'vite-plugin-remove-console';
| import vue from '@vitejs/plugin-vue';
| import vueJsx from '@vitejs/plugin-vue-jsx';
| import dts from 'vite-plugin-dts';
| import pkg from './package.json';
| import { viteStaticCopy } from 'vite-plugin-static-copy';
|
| export default defineConfig({
| build: {
| // target: 'es2015',
| lib: {
| entry: resolve(__dirname, './src/index.ts'),
| formats: ['es'],
| fileName: 'index',
| name: 'lifePaymentComponents',
| },
| rollupOptions: {
| external: Object.keys(pkg.peerDependencies),
| },
| },
| define: {
| OSS_URL: '"https://parkmanagement.oss-cn-hangzhou.aliyuncs.com"',
| CLIENT_ORIGIN: '"https://jf.81812333.com"',
| },
| plugins: [
| vue(),
| // jsx、tsx语法支持
| vueJsx(),
|
| // removeConsole({}),
|
| viteStaticCopy({
| targets: [
| {
| src: 'src/styles',
| dest: '.',
| },
| {
| src: 'src/assets',
| dest: '.',
| },
| ],
| }),
|
| dts(),
| ],
| });
|
|