sun-form-v3 0.0.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/.history/package_20240516171646.json +21 -0
- package/.history/package_20240516220959.json +21 -0
- package/.history/package_20240516221125.json +22 -0
- package/.history/package_20240516221133.json +22 -0
- package/.history/package_20240516221150.json +22 -0
- package/.history/packages/index_20240516170215.ts +0 -0
- package/.history/packages/index_20240516170240.ts +16 -0
- package/.history/packages/index_20240516170259.ts +16 -0
- package/.history/packages/index_20240516215605.ts +16 -0
- package/.history/packages/sy-button/index_20240516170041.vue +0 -0
- package/.history/packages/sy-button/index_20240516170054.vue +11 -0
- package/.history/packages/sy-button/index_20240516170059.ts +0 -0
- package/.history/packages/sy-button/index_20240516170139.ts +6 -0
- package/.history/packages/sy-button/index_20240516170143.ts +6 -0
- package/.history/packages/sy-button/index_20240516170826.vue +11 -0
- package/.history/packages/sy-button/index_20240516170827.vue +11 -0
- package/.history/packages/sy-button/index_20240516171258.ts +6 -0
- package/.history/packages/sy-button/index_20240516205457.ts +6 -0
- package/.history/packages/sy-button/index_20240516205458.ts +6 -0
- package/.history/packages/sy-button/index_20240516214802.vue +11 -0
- package/.history/src/App_20240516163625.vue +30 -0
- package/.history/src/App_20240516171000.vue +30 -0
- package/.history/src/App_20240516171003.vue +29 -0
- package/.history/src/App_20240516171012.vue +31 -0
- package/.history/src/App_20240516171045.vue +32 -0
- package/.history/src/App_20240516171056.vue +23 -0
- package/.history/src/vite-env.d_20240516163625.ts +1 -0
- package/.history/src/vite-env.d_20240516164812.ts +6 -0
- package/.history/src/vite-env.d_20240516170519.ts +6 -0
- package/.history/tsconfig_20240516163625.json +25 -0
- package/.history/tsconfig_20240516171547.json +26 -0
- package/.history/tsconfig_20240516171627.json +27 -0
- package/.history/tsconfig_20240516171733.json +26 -0
- package/.history/tsconfig_20240516214249.json +29 -0
- package/.history/tsconfig_20240516214506.json +29 -0
- package/.history/tsconfig_20240516214522.json +28 -0
- package/.history/types/vue.d_20240516214359.ts +0 -0
- package/.history/types/vue.d_20240516214406.ts +4 -0
- package/.history/types/vue.d_20240516214702.ts +6 -0
- package/.history/types/vue.d_20240516214737.ts +6 -0
- package/.history/vite.config_20240516163625.ts +7 -0
- package/.history/vite.config_20240516171436.ts +63 -0
- package/.history/vite.config_20240516171745.ts +63 -0
- package/.history/vite.config_20240516171816.ts +63 -0
- package/.history/vite.config_20240516171904.ts +63 -0
- package/.history/vite.config_20240516172136.ts +65 -0
- package/.history/vite.config_20240516172137.ts +65 -0
- package/.history/vite.config_20240516172206.ts +65 -0
- package/.history/vite.config_20240516172233.ts +65 -0
- package/.history/vite.config_20240516172329.ts +65 -0
- package/.history/vite.config_20240516205537.ts +65 -0
- package/.history/vite.config_20240516221534.ts +65 -0
- package/.vscode/extensions.json +3 -0
- package/README.md +9 -0
- package/index.html +13 -0
- package/package.json +23 -0
- package/packages/index.ts +16 -0
- package/packages/sy-button/index.ts +6 -0
- package/packages/sy-button/index.vue +11 -0
- package/public/vite.svg +1 -0
- package/src/App.vue +23 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/HelloWorld.vue +38 -0
- package/src/main.ts +5 -0
- package/src/style.css +79 -0
- package/src/vite-env.d.ts +6 -0
- package/tsconfig.json +28 -0
- package/tsconfig.node.json +11 -0
- package/types/vue.d.ts +6 -0
- package/vite.config.ts +65 -0
@@ -0,0 +1,63 @@
|
|
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
|
+
|
@@ -0,0 +1,63 @@
|
|
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
|
+
|
@@ -0,0 +1,63 @@
|
|
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
|
+
|
@@ -0,0 +1,63 @@
|
|
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
|
+
|
@@ -0,0 +1,65 @@
|
|
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
|
+
|
@@ -0,0 +1,65 @@
|
|
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
|
+
|
@@ -0,0 +1,65 @@
|
|
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
|
+
|
@@ -0,0 +1,65 @@
|
|
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
|
+
|
@@ -0,0 +1,65 @@
|
|
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: '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
|
+
|