@zkwq/business 0.2.29 → 0.2.31
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/dist/index.js +527 -530
- package/dist/index.min.js +2 -2
- package/dist/index.umd.cjs +2 -2
- package/dist/index.umd.min.cjs +2 -2
- package/package.json +1 -1
- package/vite.config.js +30 -30
package/package.json
CHANGED
package/vite.config.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import {createVuePlugin} from 'vite-plugin-vue2'
|
|
3
|
-
import { transformVueJsx } from 'vite-plugin-vue2/dist/jsxTransform'
|
|
4
|
-
import { resolve } from 'path'
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import {createVuePlugin} from 'vite-plugin-vue2'
|
|
3
|
+
import { transformVueJsx } from 'vite-plugin-vue2/dist/jsxTransform'
|
|
4
|
+
import { resolve } from 'path'
|
|
5
5
|
import copy from 'rollup-plugin-copy' //引入插件
|
|
6
6
|
import {SplitStylePluginVite} from '@zkwq/unplugin-split-style'
|
|
7
7
|
import {MinifyPluginVite} from '@zkwq/unplugin-minify'
|
|
8
|
-
// import dts from 'vite-plugin-dts'
|
|
9
|
-
|
|
10
|
-
const baseUiVue2Jsx = () => ({
|
|
11
|
-
name: 'base-ui-vue2-jsx',
|
|
12
|
-
transform(code, id) {
|
|
13
|
-
const normalizedId = id.replace(/\\/g, '/')
|
|
14
|
-
const isBaseUiModule = normalizedId.includes('/src/components/base/ui/')
|
|
15
|
-
const isVueMainModule = /\.vue($|\?)/.test(normalizedId) && !code.includes('<script')
|
|
16
|
-
const isPlainJsModule = /\.js$/.test(normalizedId)
|
|
17
|
-
const isScriptModule = isPlainJsModule || normalizedId.includes('type=script') || isVueMainModule
|
|
18
|
-
|
|
19
|
-
if (!isBaseUiModule || !isScriptModule || !code.includes('<')) {
|
|
20
|
-
return null
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return transformVueJsx(code, id)
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// https://vitejs.dev/config/
|
|
28
|
-
export default defineConfig({
|
|
29
|
-
plugins: [
|
|
30
|
-
// dts(),
|
|
31
|
-
createVuePlugin({jsx:true}),
|
|
32
|
-
baseUiVue2Jsx(),
|
|
33
|
-
copy({
|
|
8
|
+
// import dts from 'vite-plugin-dts'
|
|
9
|
+
|
|
10
|
+
const baseUiVue2Jsx = () => ({
|
|
11
|
+
name: 'base-ui-vue2-jsx',
|
|
12
|
+
transform(code, id) {
|
|
13
|
+
const normalizedId = id.replace(/\\/g, '/')
|
|
14
|
+
const isBaseUiModule = normalizedId.includes('/src/components/base/ui/')
|
|
15
|
+
const isVueMainModule = /\.vue($|\?)/.test(normalizedId) && !code.includes('<script')
|
|
16
|
+
const isPlainJsModule = /\.js$/.test(normalizedId)
|
|
17
|
+
const isScriptModule = isPlainJsModule || normalizedId.includes('type=script') || isVueMainModule
|
|
18
|
+
|
|
19
|
+
if (!isBaseUiModule || !isScriptModule || !code.includes('<')) {
|
|
20
|
+
return null
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return transformVueJsx(code, id)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
// https://vitejs.dev/config/
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
plugins: [
|
|
30
|
+
// dts(),
|
|
31
|
+
createVuePlugin({jsx:true}),
|
|
32
|
+
// baseUiVue2Jsx(),
|
|
33
|
+
copy({
|
|
34
34
|
verbose:true,
|
|
35
35
|
hook:'closeBundle',
|
|
36
36
|
targets:[
|