@cloudcome/utils-vue 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/vite.config.mts DELETED
@@ -1,95 +0,0 @@
1
- /**
2
- * @file vite.config.mts
3
- * @ref https://vitejs.dev/
4
- */
5
-
6
- import dts from 'vite-plugin-dts';
7
- import { externalizeDeps } from 'vite-plugin-externalize-deps';
8
- import tsconfigPaths from 'vite-tsconfig-paths';
9
- import { defineConfig } from 'vitest/config';
10
- import pkg from './package.json';
11
-
12
- export default defineConfig((env) => {
13
- const isProd = env.mode === 'production';
14
- const isTest = env.mode === 'test';
15
-
16
- return {
17
- base: '/',
18
- server: {
19
- port: 15170,
20
- },
21
- preview: {
22
- port: 15171,
23
- },
24
- define: {
25
- PKG_NAME: JSON.stringify(isTest ? 'pkg-name-for-test' : pkg.name),
26
- PKG_VERSION: JSON.stringify(isTest ? 'pkg-version-for-test' : pkg.version),
27
- PKG_DESCRIPTION: JSON.stringify(isTest ? 'pkg-description-for-test' : pkg.description),
28
- IS_TEST: JSON.stringify(isTest),
29
- },
30
- build: {
31
- minify: false,
32
- sourcemap: true,
33
- copyPublicDir: false,
34
- reportCompressedSize: false,
35
- lib: {
36
- entry:
37
- // expose-start
38
- {
39
- index: 'src/index.ts',
40
- async: './src/async.ts',
41
- component: './src/component.ts',
42
- event: './src/event.ts',
43
- page: './src/page.ts',
44
- request: './src/request.ts',
45
- },
46
- // expose-end
47
- },
48
- rollupOptions: {
49
- output: [
50
- {
51
- format: 'esm',
52
- entryFileNames: '[name].mjs',
53
- chunkFileNames: '[name].mjs',
54
- },
55
- {
56
- format: 'cjs',
57
- entryFileNames: '[name].cjs',
58
- chunkFileNames: '[name].cjs',
59
- },
60
- ],
61
- },
62
- },
63
- test: {
64
- globals: true,
65
- environment: 'jsdom',
66
- environmentOptions: {
67
- jsdom: {
68
- // 加载外部资源
69
- resources: 'usable',
70
- },
71
- },
72
- coverage: {
73
- all: true,
74
- include: ['src/**/*.ts'],
75
- reporter: ['lcov', 'text'],
76
- },
77
- },
78
- // esbuild: {
79
- // drop: isProd ? ['console', 'debugger'] : [],
80
- // },
81
- plugins: [
82
- tsconfigPaths(),
83
- externalizeDeps({
84
- deps: true,
85
- devDeps: true,
86
- peerDeps: true,
87
- optionalDeps: true,
88
- nodeBuiltins: true,
89
- }),
90
- dts({
91
- include: 'src',
92
- }),
93
- ],
94
- };
95
- });