sun-form-v3 0.0.1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +25 -5
- package/dist/favicon.ico +0 -0
- package/dist/style.css +1 -0
- package/dist/sun-form-v3.es.js +31 -0
- package/dist/sun-form-v3.umd.js +1 -0
- package/package.json +19 -9
- package/.history/package_20240516171646.json +0 -21
- package/.history/package_20240516220959.json +0 -21
- package/.history/package_20240516221125.json +0 -22
- package/.history/package_20240516221133.json +0 -22
- package/.history/package_20240516221150.json +0 -22
- package/.history/packages/index_20240516170215.ts +0 -0
- package/.history/packages/index_20240516170240.ts +0 -16
- package/.history/packages/index_20240516170259.ts +0 -16
- package/.history/packages/index_20240516215605.ts +0 -16
- package/.history/packages/sy-button/index_20240516170041.vue +0 -0
- package/.history/packages/sy-button/index_20240516170054.vue +0 -11
- package/.history/packages/sy-button/index_20240516170059.ts +0 -0
- package/.history/packages/sy-button/index_20240516170139.ts +0 -6
- package/.history/packages/sy-button/index_20240516170143.ts +0 -6
- package/.history/packages/sy-button/index_20240516170826.vue +0 -11
- package/.history/packages/sy-button/index_20240516170827.vue +0 -11
- package/.history/packages/sy-button/index_20240516171258.ts +0 -6
- package/.history/packages/sy-button/index_20240516205457.ts +0 -6
- package/.history/packages/sy-button/index_20240516205458.ts +0 -6
- package/.history/packages/sy-button/index_20240516214802.vue +0 -11
- package/.history/src/App_20240516163625.vue +0 -30
- package/.history/src/App_20240516171000.vue +0 -30
- package/.history/src/App_20240516171003.vue +0 -29
- package/.history/src/App_20240516171012.vue +0 -31
- package/.history/src/App_20240516171045.vue +0 -32
- package/.history/src/App_20240516171056.vue +0 -23
- package/.history/src/vite-env.d_20240516163625.ts +0 -1
- package/.history/src/vite-env.d_20240516164812.ts +0 -6
- package/.history/src/vite-env.d_20240516170519.ts +0 -6
- package/.history/tsconfig_20240516163625.json +0 -25
- package/.history/tsconfig_20240516171547.json +0 -26
- package/.history/tsconfig_20240516171627.json +0 -27
- package/.history/tsconfig_20240516171733.json +0 -26
- package/.history/tsconfig_20240516214249.json +0 -29
- package/.history/tsconfig_20240516214506.json +0 -29
- package/.history/tsconfig_20240516214522.json +0 -28
- package/.history/types/vue.d_20240516214359.ts +0 -0
- package/.history/types/vue.d_20240516214406.ts +0 -4
- package/.history/types/vue.d_20240516214702.ts +0 -6
- package/.history/types/vue.d_20240516214737.ts +0 -6
- package/.history/vite.config_20240516163625.ts +0 -7
- package/.history/vite.config_20240516171436.ts +0 -63
- package/.history/vite.config_20240516171745.ts +0 -63
- package/.history/vite.config_20240516171816.ts +0 -63
- package/.history/vite.config_20240516171904.ts +0 -63
- package/.history/vite.config_20240516172136.ts +0 -65
- package/.history/vite.config_20240516172137.ts +0 -65
- package/.history/vite.config_20240516172206.ts +0 -65
- package/.history/vite.config_20240516172233.ts +0 -65
- package/.history/vite.config_20240516172329.ts +0 -65
- package/.history/vite.config_20240516205537.ts +0 -65
- package/.history/vite.config_20240516221534.ts +0 -65
- package/.vscode/extensions.json +0 -3
- package/index.html +0 -13
- package/packages/index.ts +0 -16
- package/packages/sy-button/index.ts +0 -6
- package/packages/sy-button/index.vue +0 -11
- package/public/vite.svg +0 -1
- package/src/App.vue +0 -23
- package/src/assets/vue.svg +0 -1
- package/src/components/HelloWorld.vue +0 -38
- package/src/main.ts +0 -5
- package/src/style.css +0 -79
- package/src/vite-env.d.ts +0 -6
- package/tsconfig.json +0 -28
- package/tsconfig.node.json +0 -11
- package/types/vue.d.ts +0 -6
- package/vite.config.ts +0 -65
@@ -1,27 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"node":true,
|
4
|
-
"target": "ES2020",
|
5
|
-
"useDefineForClassFields": true,
|
6
|
-
"module": "ESNext",
|
7
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
8
|
-
"skipLibCheck": true,
|
9
|
-
|
10
|
-
/* Bundler mode */
|
11
|
-
"moduleResolution": "bundler",
|
12
|
-
"allowImportingTsExtensions": true,
|
13
|
-
"resolveJsonModule": true,
|
14
|
-
"isolatedModules": true,
|
15
|
-
"noEmit": true,
|
16
|
-
"jsx": "preserve",
|
17
|
-
|
18
|
-
/* Linting */
|
19
|
-
"strict": true,
|
20
|
-
"noUnusedLocals": true,
|
21
|
-
"noUnusedParameters": true,
|
22
|
-
"noFallthroughCasesInSwitch": true
|
23
|
-
|
24
|
-
},
|
25
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
|
26
|
-
"references": [{ "path": "./tsconfig.node.json" }]
|
27
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"target": "ES2020",
|
4
|
-
"useDefineForClassFields": true,
|
5
|
-
"module": "ESNext",
|
6
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
7
|
-
"skipLibCheck": true,
|
8
|
-
|
9
|
-
/* Bundler mode */
|
10
|
-
"moduleResolution": "bundler",
|
11
|
-
"allowImportingTsExtensions": true,
|
12
|
-
"resolveJsonModule": true,
|
13
|
-
"isolatedModules": true,
|
14
|
-
"noEmit": true,
|
15
|
-
"jsx": "preserve",
|
16
|
-
|
17
|
-
/* Linting */
|
18
|
-
"strict": true,
|
19
|
-
"noUnusedLocals": true,
|
20
|
-
"noUnusedParameters": true,
|
21
|
-
"noFallthroughCasesInSwitch": true
|
22
|
-
|
23
|
-
},
|
24
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
|
25
|
-
"references": [{ "path": "./tsconfig.node.json" }]
|
26
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"types": ["vue"],
|
4
|
-
"target": "ES2020",
|
5
|
-
"useDefineForClassFields": true,
|
6
|
-
"module": "ESNext",
|
7
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
8
|
-
"skipLibCheck": true,
|
9
|
-
|
10
|
-
/* Bundler mode */
|
11
|
-
"moduleResolution": "bundler",
|
12
|
-
"allowImportingTsExtensions": true,
|
13
|
-
"resolveJsonModule": true,
|
14
|
-
"isolatedModules": true,
|
15
|
-
"noEmit": true,
|
16
|
-
"jsx": "preserve",
|
17
|
-
|
18
|
-
/* Linting */
|
19
|
-
"strict": true,
|
20
|
-
"noUnusedLocals": true,
|
21
|
-
"noUnusedParameters": true,
|
22
|
-
"noFallthroughCasesInSwitch": true
|
23
|
-
|
24
|
-
},
|
25
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
|
26
|
-
"references": [{
|
27
|
-
"path": "./tsconfig.node.json"
|
28
|
-
}]
|
29
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"types": ["vue"],
|
4
|
-
"target": "ES2020",
|
5
|
-
"useDefineForClassFields": true,
|
6
|
-
"module": "ESNext",
|
7
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
8
|
-
"skipLibCheck": true,
|
9
|
-
|
10
|
-
/* Bundler mode */
|
11
|
-
"moduleResolution": "bundler",
|
12
|
-
"allowImportingTsExtensions": true,
|
13
|
-
"resolveJsonModule": true,
|
14
|
-
"isolatedModules": true,
|
15
|
-
"noEmit": true,
|
16
|
-
"jsx": "preserve",
|
17
|
-
|
18
|
-
/* Linting */
|
19
|
-
"strict": true,
|
20
|
-
"noUnusedLocals": true,
|
21
|
-
"noUnusedParameters": true,
|
22
|
-
"noFallthroughCasesInSwitch": true
|
23
|
-
|
24
|
-
},
|
25
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue","packages/**/*.vue"],
|
26
|
-
"references": [{
|
27
|
-
"path": "./tsconfig.node.json"
|
28
|
-
}]
|
29
|
-
}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"target": "ES2020",
|
4
|
-
"useDefineForClassFields": true,
|
5
|
-
"module": "ESNext",
|
6
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
7
|
-
"skipLibCheck": true,
|
8
|
-
|
9
|
-
/* Bundler mode */
|
10
|
-
"moduleResolution": "bundler",
|
11
|
-
"allowImportingTsExtensions": true,
|
12
|
-
"resolveJsonModule": true,
|
13
|
-
"isolatedModules": true,
|
14
|
-
"noEmit": true,
|
15
|
-
"jsx": "preserve",
|
16
|
-
|
17
|
-
/* Linting */
|
18
|
-
"strict": true,
|
19
|
-
"noUnusedLocals": true,
|
20
|
-
"noUnusedParameters": true,
|
21
|
-
"noFallthroughCasesInSwitch": true
|
22
|
-
|
23
|
-
},
|
24
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue","packages/**/*.vue"],
|
25
|
-
"references": [{
|
26
|
-
"path": "./tsconfig.node.json"
|
27
|
-
}]
|
28
|
-
}
|
File without changes
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
3
|
-
import { resolve } from 'path';
|
4
|
-
|
5
|
-
const pathResolve = (dir: string) => {
|
6
|
-
return resolve(__dirname, '.', dir);
|
7
|
-
};
|
8
|
-
const alias: Record<string, string> = {
|
9
|
-
'@': pathResolve('./src'),
|
10
|
-
};
|
11
|
-
|
12
|
-
// https://vitejs.dev/config/
|
13
|
-
export default defineConfig({
|
14
|
-
plugins: [vue()],
|
15
|
-
base: './',
|
16
|
-
build: {
|
17
|
-
outDir: 'sos-map-ui/dist', //输出文件名称
|
18
|
-
lib: {
|
19
|
-
entry: resolve(__dirname, './src/components/index.ts'), //指定组件编译入口文件
|
20
|
-
name: 'sosVue3TsMapUi',
|
21
|
-
fileName: 'sos-map-ui'
|
22
|
-
},//库编译模式配置
|
23
|
-
rollupOptions: {
|
24
|
-
external: ['vue', 'swiper', '@vuepic/vue-datepicker', 'qrcode'],
|
25
|
-
output: {
|
26
|
-
// format: 'es', // 默认es,可选 'amd' 'cjs' 'es' 'iife' 'umd' 'system'
|
27
|
-
exports: 'named',
|
28
|
-
globals: { //在UMD构建模式下为这些外部化的依赖提供一个全局变量
|
29
|
-
vue: 'Vue',
|
30
|
-
// 'vue-router': 'VueRouter', // 引入vue-router全局变量,否则router.push将无法使用
|
31
|
-
swiper: 'Swiper',
|
32
|
-
'@vuepic/vue-datepicker': 'VueDatePicker',
|
33
|
-
qrcode: 'qrcode'
|
34
|
-
}
|
35
|
-
}
|
36
|
-
},
|
37
|
-
/** 设置为 false 可以禁用最小化混淆,或是用来指定使用哪种混淆器。
|
38
|
-
默认为 Esbuild,它比 terser 快 20-40 倍,压缩率只差 1%-2%。
|
39
|
-
注意,在 lib 模式下使用 'es' 时,build.minify 选项不会缩减空格,因为会移除掉 pure 标注,导致破坏 tree-shaking。
|
40
|
-
当设置为 'terser' 时必须先安装 Terser。(yarn add terser -D)
|
41
|
-
*/
|
42
|
-
minify: 'terser', // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
43
|
-
terserOptions: { // 在打包代码时移除 console、debugger 和 注释
|
44
|
-
compress: {
|
45
|
-
/* (default: false) -- Pass true to discard calls to console.* functions.
|
46
|
-
If you wish to drop a specific function call such as console.info and/or
|
47
|
-
retain side effects from function arguments after dropping the function
|
48
|
-
call then use pure_funcs instead
|
49
|
-
*/
|
50
|
-
drop_console: true, // 生产环境时移除console
|
51
|
-
drop_debugger: true // 生产环境时移除debugger
|
52
|
-
},
|
53
|
-
format: {
|
54
|
-
comments: false // 删除注释comments
|
55
|
-
}
|
56
|
-
}
|
57
|
-
},
|
58
|
-
resolve: {
|
59
|
-
alias,
|
60
|
-
}
|
61
|
-
})
|
62
|
-
|
63
|
-
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
3
|
-
import { resolve } from 'path';
|
4
|
-
|
5
|
-
const pathResolve = (dir: string) => {
|
6
|
-
return resolve(__dirname, '.', dir);
|
7
|
-
};
|
8
|
-
const alias: Record<string, string> = {
|
9
|
-
'@': pathResolve('./src'),
|
10
|
-
};
|
11
|
-
|
12
|
-
// https://vitejs.dev/config/
|
13
|
-
export default defineConfig({
|
14
|
-
plugins: [vue()],
|
15
|
-
base: './',
|
16
|
-
build: {
|
17
|
-
outDir: 'sos-map-ui/dist', //输出文件名称
|
18
|
-
lib: {
|
19
|
-
entry: resolve(__dirname, './src/components/index.ts'), //指定组件编译入口文件
|
20
|
-
name: 'sosVue3TsMapUi',
|
21
|
-
fileName: 'sos-map-ui'
|
22
|
-
},//库编译模式配置
|
23
|
-
rollupOptions: {
|
24
|
-
external: ['vue', 'swiper', '@vuepic/vue-datepicker', 'qrcode'],
|
25
|
-
output: {
|
26
|
-
// format: 'es', // 默认es,可选 'amd' 'cjs' 'es' 'iife' 'umd' 'system'
|
27
|
-
exports: 'named',
|
28
|
-
globals: { //在UMD构建模式下为这些外部化的依赖提供一个全局变量
|
29
|
-
vue: 'Vue',
|
30
|
-
// 'vue-router': 'VueRouter', // 引入vue-router全局变量,否则router.push将无法使用
|
31
|
-
swiper: 'Swiper',
|
32
|
-
'@vuepic/vue-datepicker': 'VueDatePicker',
|
33
|
-
qrcode: 'qrcode'
|
34
|
-
}
|
35
|
-
}
|
36
|
-
},
|
37
|
-
/** 设置为 false 可以禁用最小化混淆,或是用来指定使用哪种混淆器。
|
38
|
-
默认为 Esbuild,它比 terser 快 20-40 倍,压缩率只差 1%-2%。
|
39
|
-
注意,在 lib 模式下使用 'es' 时,build.minify 选项不会缩减空格,因为会移除掉 pure 标注,导致破坏 tree-shaking。
|
40
|
-
当设置为 'terser' 时必须先安装 Terser。(yarn add terser -D)
|
41
|
-
*/
|
42
|
-
minify: 'terser', // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
43
|
-
terserOptions: { // 在打包代码时移除 console、debugger 和 注释
|
44
|
-
compress: {
|
45
|
-
/* (default: false) -- Pass true to discard calls to console.* functions.
|
46
|
-
If you wish to drop a specific function call such as console.info and/or
|
47
|
-
retain side effects from function arguments after dropping the function
|
48
|
-
call then use pure_funcs instead
|
49
|
-
*/
|
50
|
-
drop_console: true, // 生产环境时移除console
|
51
|
-
drop_debugger: true // 生产环境时移除debugger
|
52
|
-
},
|
53
|
-
format: {
|
54
|
-
comments: false // 删除注释comments
|
55
|
-
}
|
56
|
-
}
|
57
|
-
},
|
58
|
-
resolve: {
|
59
|
-
alias,
|
60
|
-
}
|
61
|
-
})
|
62
|
-
|
63
|
-
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
3
|
-
import { resolve } from 'path';
|
4
|
-
|
5
|
-
const pathResolve = (dir: string) => {
|
6
|
-
return resolve(__dirname, '.', dir);
|
7
|
-
};
|
8
|
-
const alias: Record<string, string> = {
|
9
|
-
'@': pathResolve('./src'),
|
10
|
-
};
|
11
|
-
|
12
|
-
// https://vitejs.dev/config/
|
13
|
-
export default defineConfig({
|
14
|
-
plugins: [vue()],
|
15
|
-
base: './',
|
16
|
-
build: {
|
17
|
-
outDir: 'sos-map-ui/dist', //输出文件名称
|
18
|
-
lib: {
|
19
|
-
entry: resolve(__dirname, './packages/index.ts'), //指定组件编译入口文件
|
20
|
-
name: 'sun-form-v3',
|
21
|
-
fileName: 'sos-map-ui'
|
22
|
-
},//库编译模式配置
|
23
|
-
rollupOptions: {
|
24
|
-
external: ['vue', 'swiper', '@vuepic/vue-datepicker', 'qrcode'],
|
25
|
-
output: {
|
26
|
-
// format: 'es', // 默认es,可选 'amd' 'cjs' 'es' 'iife' 'umd' 'system'
|
27
|
-
exports: 'named',
|
28
|
-
globals: { //在UMD构建模式下为这些外部化的依赖提供一个全局变量
|
29
|
-
vue: 'Vue',
|
30
|
-
// 'vue-router': 'VueRouter', // 引入vue-router全局变量,否则router.push将无法使用
|
31
|
-
swiper: 'Swiper',
|
32
|
-
'@vuepic/vue-datepicker': 'VueDatePicker',
|
33
|
-
qrcode: 'qrcode'
|
34
|
-
}
|
35
|
-
}
|
36
|
-
},
|
37
|
-
/** 设置为 false 可以禁用最小化混淆,或是用来指定使用哪种混淆器。
|
38
|
-
默认为 Esbuild,它比 terser 快 20-40 倍,压缩率只差 1%-2%。
|
39
|
-
注意,在 lib 模式下使用 'es' 时,build.minify 选项不会缩减空格,因为会移除掉 pure 标注,导致破坏 tree-shaking。
|
40
|
-
当设置为 'terser' 时必须先安装 Terser。(yarn add terser -D)
|
41
|
-
*/
|
42
|
-
minify: 'terser', // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
43
|
-
terserOptions: { // 在打包代码时移除 console、debugger 和 注释
|
44
|
-
compress: {
|
45
|
-
/* (default: false) -- Pass true to discard calls to console.* functions.
|
46
|
-
If you wish to drop a specific function call such as console.info and/or
|
47
|
-
retain side effects from function arguments after dropping the function
|
48
|
-
call then use pure_funcs instead
|
49
|
-
*/
|
50
|
-
drop_console: true, // 生产环境时移除console
|
51
|
-
drop_debugger: true // 生产环境时移除debugger
|
52
|
-
},
|
53
|
-
format: {
|
54
|
-
comments: false // 删除注释comments
|
55
|
-
}
|
56
|
-
}
|
57
|
-
},
|
58
|
-
resolve: {
|
59
|
-
alias,
|
60
|
-
}
|
61
|
-
})
|
62
|
-
|
63
|
-
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
3
|
-
import { resolve } from 'path';
|
4
|
-
|
5
|
-
const pathResolve = (dir: string) => {
|
6
|
-
return resolve(__dirname, '.', dir);
|
7
|
-
};
|
8
|
-
const alias: Record<string, string> = {
|
9
|
-
'@': pathResolve('./src'),
|
10
|
-
};
|
11
|
-
|
12
|
-
// https://vitejs.dev/config/
|
13
|
-
export default defineConfig({
|
14
|
-
plugins: [vue()],
|
15
|
-
base: './',
|
16
|
-
build: {
|
17
|
-
outDir: 'sos-map-ui/dist', //输出文件名称
|
18
|
-
lib: {
|
19
|
-
entry: resolve(__dirname, './packages/index.ts'), //指定组件编译入口文件
|
20
|
-
name: 'sun-form-v3',
|
21
|
-
fileName: 'sos-map-ui'
|
22
|
-
},//库编译模式配置
|
23
|
-
rollupOptions: {
|
24
|
-
external: ['vue', 'swiper', '@vuepic/vue-datepicker', 'qrcode'],
|
25
|
-
output: {
|
26
|
-
// format: 'es', // 默认es,可选 'amd' 'cjs' 'es' 'iife' 'umd' 'system'
|
27
|
-
exports: 'named',
|
28
|
-
globals: { //在UMD构建模式下为这些外部化的依赖提供一个全局变量
|
29
|
-
vue: 'Vue',
|
30
|
-
// 'vue-router': 'VueRouter', // 引入vue-router全局变量,否则router.push将无法使用
|
31
|
-
swiper: 'Swiper',
|
32
|
-
'@vuepic/vue-datepicker': 'VueDatePicker',
|
33
|
-
qrcode: 'qrcode'
|
34
|
-
}
|
35
|
-
}
|
36
|
-
},
|
37
|
-
/** 设置为 false 可以禁用最小化混淆,或是用来指定使用哪种混淆器。
|
38
|
-
默认为 Esbuild,它比 terser 快 20-40 倍,压缩率只差 1%-2%。
|
39
|
-
注意,在 lib 模式下使用 'es' 时,build.minify 选项不会缩减空格,因为会移除掉 pure 标注,导致破坏 tree-shaking。
|
40
|
-
当设置为 'terser' 时必须先安装 Terser。(yarn add terser -D)
|
41
|
-
*/
|
42
|
-
minify: 'terser', // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
43
|
-
terserOptions: { // 在打包代码时移除 console、debugger 和 注释
|
44
|
-
compress: {
|
45
|
-
/* (default: false) -- Pass true to discard calls to console.* functions.
|
46
|
-
If you wish to drop a specific function call such as console.info and/or
|
47
|
-
retain side effects from function arguments after dropping the function
|
48
|
-
call then use pure_funcs instead
|
49
|
-
*/
|
50
|
-
drop_console: true, // 生产环境时移除console
|
51
|
-
drop_debugger: true // 生产环境时移除debugger
|
52
|
-
},
|
53
|
-
format: {
|
54
|
-
comments: false // 删除注释comments
|
55
|
-
}
|
56
|
-
}
|
57
|
-
},
|
58
|
-
resolve: {
|
59
|
-
alias,
|
60
|
-
}
|
61
|
-
})
|
62
|
-
|
63
|
-
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
3
|
-
import { resolve } from 'path';
|
4
|
-
|
5
|
-
const pathResolve = (dir: string) => {
|
6
|
-
return resolve(__dirname, '.', dir);
|
7
|
-
};
|
8
|
-
const alias: Record<string, string> = {
|
9
|
-
'@': pathResolve('./src'),
|
10
|
-
};
|
11
|
-
|
12
|
-
// https://vitejs.dev/config/
|
13
|
-
export default defineConfig({
|
14
|
-
plugins: [vue()],
|
15
|
-
base: './',
|
16
|
-
build: {
|
17
|
-
outDir: 'sos-map-ui/dist', //输出文件名称
|
18
|
-
lib: {
|
19
|
-
entry: resolve(__dirname, './packages/index.ts'), //指定组件编译入口文件
|
20
|
-
name: 'sun-form-v3',
|
21
|
-
fileName: 'sos-map-ui'
|
22
|
-
},//库编译模式配置
|
23
|
-
rollupOptions: {
|
24
|
-
external: ['vue',
|
25
|
-
// 'swiper', '@vuepic/vue-datepicker', 'qrcode'
|
26
|
-
],
|
27
|
-
output: {
|
28
|
-
// format: 'es', // 默认es,可选 'amd' 'cjs' 'es' 'iife' 'umd' 'system'
|
29
|
-
exports: 'named',
|
30
|
-
globals: { //在UMD构建模式下为这些外部化的依赖提供一个全局变量
|
31
|
-
vue: 'Vue',
|
32
|
-
// 'vue-router': 'VueRouter', // 引入vue-router全局变量,否则router.push将无法使用
|
33
|
-
// swiper: 'Swiper',
|
34
|
-
// '@vuepic/vue-datepicker': 'VueDatePicker',
|
35
|
-
// qrcode: 'qrcode'
|
36
|
-
}
|
37
|
-
}
|
38
|
-
},
|
39
|
-
/** 设置为 false 可以禁用最小化混淆,或是用来指定使用哪种混淆器。
|
40
|
-
默认为 Esbuild,它比 terser 快 20-40 倍,压缩率只差 1%-2%。
|
41
|
-
注意,在 lib 模式下使用 'es' 时,build.minify 选项不会缩减空格,因为会移除掉 pure 标注,导致破坏 tree-shaking。
|
42
|
-
当设置为 'terser' 时必须先安装 Terser。(yarn add terser -D)
|
43
|
-
*/
|
44
|
-
minify: 'terser', // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
45
|
-
terserOptions: { // 在打包代码时移除 console、debugger 和 注释
|
46
|
-
compress: {
|
47
|
-
/* (default: false) -- Pass true to discard calls to console.* functions.
|
48
|
-
If you wish to drop a specific function call such as console.info and/or
|
49
|
-
retain side effects from function arguments after dropping the function
|
50
|
-
call then use pure_funcs instead
|
51
|
-
*/
|
52
|
-
drop_console: true, // 生产环境时移除console
|
53
|
-
drop_debugger: true // 生产环境时移除debugger
|
54
|
-
},
|
55
|
-
format: {
|
56
|
-
comments: false // 删除注释comments
|
57
|
-
}
|
58
|
-
}
|
59
|
-
},
|
60
|
-
resolve: {
|
61
|
-
alias,
|
62
|
-
}
|
63
|
-
})
|
64
|
-
|
65
|
-
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
3
|
-
import { resolve } from 'path';
|
4
|
-
|
5
|
-
const pathResolve = (dir: string) => {
|
6
|
-
return resolve(__dirname, '.', dir);
|
7
|
-
};
|
8
|
-
const alias: Record<string, string> = {
|
9
|
-
'@': pathResolve('./src'),
|
10
|
-
};
|
11
|
-
|
12
|
-
// https://vitejs.dev/config/
|
13
|
-
export default defineConfig({
|
14
|
-
plugins: [vue()],
|
15
|
-
base: './',
|
16
|
-
build: {
|
17
|
-
outDir: 'sos-map-ui/dist', //输出文件名称
|
18
|
-
lib: {
|
19
|
-
entry: resolve(__dirname, './packages/index.ts'), //指定组件编译入口文件
|
20
|
-
name: 'sun-form-v3',
|
21
|
-
fileName: 'sos-map-ui'
|
22
|
-
},//库编译模式配置
|
23
|
-
rollupOptions: {
|
24
|
-
external: ['vue',
|
25
|
-
// 'swiper', '@vuepic/vue-datepicker', 'qrcode'
|
26
|
-
],
|
27
|
-
output: {
|
28
|
-
// format: 'es', // 默认es,可选 'amd' 'cjs' 'es' 'iife' 'umd' 'system'
|
29
|
-
exports: 'named',
|
30
|
-
globals: { //在UMD构建模式下为这些外部化的依赖提供一个全局变量
|
31
|
-
vue: 'Vue',
|
32
|
-
// 'vue-router': 'VueRouter', // 引入vue-router全局变量,否则router.push将无法使用
|
33
|
-
// swiper: 'Swiper',
|
34
|
-
// '@vuepic/vue-datepicker': 'VueDatePicker',
|
35
|
-
// qrcode: 'qrcode'
|
36
|
-
}
|
37
|
-
}
|
38
|
-
},
|
39
|
-
/** 设置为 false 可以禁用最小化混淆,或是用来指定使用哪种混淆器。
|
40
|
-
默认为 Esbuild,它比 terser 快 20-40 倍,压缩率只差 1%-2%。
|
41
|
-
注意,在 lib 模式下使用 'es' 时,build.minify 选项不会缩减空格,因为会移除掉 pure 标注,导致破坏 tree-shaking。
|
42
|
-
当设置为 'terser' 时必须先安装 Terser。(yarn add terser -D)
|
43
|
-
*/
|
44
|
-
minify: 'terser', // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
45
|
-
terserOptions: { // 在打包代码时移除 console、debugger 和 注释
|
46
|
-
compress: {
|
47
|
-
/* (default: false) -- Pass true to discard calls to console.* functions.
|
48
|
-
If you wish to drop a specific function call such as console.info and/or
|
49
|
-
retain side effects from function arguments after dropping the function
|
50
|
-
call then use pure_funcs instead
|
51
|
-
*/
|
52
|
-
drop_console: true, // 生产环境时移除console
|
53
|
-
drop_debugger: true // 生产环境时移除debugger
|
54
|
-
},
|
55
|
-
format: {
|
56
|
-
comments: false // 删除注释comments
|
57
|
-
}
|
58
|
-
}
|
59
|
-
},
|
60
|
-
resolve: {
|
61
|
-
alias,
|
62
|
-
}
|
63
|
-
})
|
64
|
-
|
65
|
-
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
3
|
-
import { resolve } from 'path';
|
4
|
-
|
5
|
-
const pathResolve = (dir: string) => {
|
6
|
-
return resolve(__dirname, '.', dir);
|
7
|
-
};
|
8
|
-
const alias: Record<string, string> = {
|
9
|
-
'@': pathResolve('./src'),
|
10
|
-
};
|
11
|
-
|
12
|
-
// https://vitejs.dev/config/
|
13
|
-
export default defineConfig({
|
14
|
-
plugins: [vue()],
|
15
|
-
base: './',
|
16
|
-
build: {
|
17
|
-
outDir: 'sos-map-ui/dist', //输出文件名称
|
18
|
-
lib: {
|
19
|
-
entry: resolve(__dirname, './packages/index.ts'), //指定组件编译入口文件
|
20
|
-
name: 'sun-form-v3',
|
21
|
-
fileName: 'sun-form-v3'
|
22
|
-
},//库编译模式配置
|
23
|
-
rollupOptions: {
|
24
|
-
external: ['vue',
|
25
|
-
// 'swiper', '@vuepic/vue-datepicker', 'qrcode'
|
26
|
-
],
|
27
|
-
output: {
|
28
|
-
// format: 'es', // 默认es,可选 'amd' 'cjs' 'es' 'iife' 'umd' 'system'
|
29
|
-
exports: 'named',
|
30
|
-
globals: { //在UMD构建模式下为这些外部化的依赖提供一个全局变量
|
31
|
-
vue: 'Vue',
|
32
|
-
// 'vue-router': 'VueRouter', // 引入vue-router全局变量,否则router.push将无法使用
|
33
|
-
// swiper: 'Swiper',
|
34
|
-
// '@vuepic/vue-datepicker': 'VueDatePicker',
|
35
|
-
// qrcode: 'qrcode'
|
36
|
-
}
|
37
|
-
}
|
38
|
-
},
|
39
|
-
/** 设置为 false 可以禁用最小化混淆,或是用来指定使用哪种混淆器。
|
40
|
-
默认为 Esbuild,它比 terser 快 20-40 倍,压缩率只差 1%-2%。
|
41
|
-
注意,在 lib 模式下使用 'es' 时,build.minify 选项不会缩减空格,因为会移除掉 pure 标注,导致破坏 tree-shaking。
|
42
|
-
当设置为 'terser' 时必须先安装 Terser。(yarn add terser -D)
|
43
|
-
*/
|
44
|
-
minify: 'terser', // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
45
|
-
terserOptions: { // 在打包代码时移除 console、debugger 和 注释
|
46
|
-
compress: {
|
47
|
-
/* (default: false) -- Pass true to discard calls to console.* functions.
|
48
|
-
If you wish to drop a specific function call such as console.info and/or
|
49
|
-
retain side effects from function arguments after dropping the function
|
50
|
-
call then use pure_funcs instead
|
51
|
-
*/
|
52
|
-
drop_console: true, // 生产环境时移除console
|
53
|
-
drop_debugger: true // 生产环境时移除debugger
|
54
|
-
},
|
55
|
-
format: {
|
56
|
-
comments: false // 删除注释comments
|
57
|
-
}
|
58
|
-
}
|
59
|
-
},
|
60
|
-
resolve: {
|
61
|
-
alias,
|
62
|
-
}
|
63
|
-
})
|
64
|
-
|
65
|
-
|