create-widget 24.1.1-beta.49 → 24.1.1-beta.50
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/package.json +1 -1
- package/template/vite.config.ts +0 -2
- package/unocss/vite.config.ts +24 -16
package/package.json
CHANGED
package/template/vite.config.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { fileURLToPath, URL } from 'node:url'
|
|
2
2
|
import vue from '@vitejs/plugin-vue'
|
|
3
3
|
import widget from '@widget-js/vite-plugin-widget'
|
|
4
|
-
import UnoCSS from 'unocss/vite'
|
|
5
4
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
6
5
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
7
6
|
import Components from 'unplugin-vue-components/vite'
|
|
@@ -14,7 +13,6 @@ export default defineConfig((config) => {
|
|
|
14
13
|
base,
|
|
15
14
|
plugins: [
|
|
16
15
|
vue(),
|
|
17
|
-
UnoCSS(),
|
|
18
16
|
widget({
|
|
19
17
|
zipName: 'test-widget',
|
|
20
18
|
generateZip: offlineMode,
|
package/unocss/vite.config.ts
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fileURLToPath, URL } from 'node:url'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
2
3
|
import widget from '@widget-js/vite-plugin-widget'
|
|
4
|
+
import UnoCSS from 'unocss/vite'
|
|
3
5
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
6
|
+
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
4
7
|
import Components from 'unplugin-vue-components/vite'
|
|
5
|
-
import UnoCSS from 'unocss/vite'
|
|
6
8
|
import { defineConfig } from 'vite'
|
|
7
|
-
import vue from '@vitejs/plugin-vue'
|
|
8
|
-
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
9
9
|
|
|
10
|
-
export default defineConfig({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
export default defineConfig((config) => {
|
|
11
|
+
const offlineMode = config.mode === 'offline'
|
|
12
|
+
const base = offlineMode ? './' : '/clock'
|
|
13
|
+
return {
|
|
14
|
+
base,
|
|
15
|
+
plugins: [
|
|
16
|
+
vue(),
|
|
17
|
+
UnoCSS(),
|
|
18
|
+
widget({
|
|
19
|
+
zipName: 'test-widget',
|
|
20
|
+
generateZip: offlineMode,
|
|
21
|
+
}),
|
|
22
|
+
AutoImport({ resolvers: [ElementPlusResolver()] }),
|
|
23
|
+
Components({ resolvers: [ElementPlusResolver()] }),
|
|
24
|
+
],
|
|
25
|
+
resolve: {
|
|
26
|
+
alias: {
|
|
27
|
+
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
28
|
+
},
|
|
21
29
|
},
|
|
22
|
-
}
|
|
30
|
+
}
|
|
23
31
|
})
|