@quiteer/vite 0.1.8 → 0.1.9
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/bin/qvite.mjs +13 -6
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
- package/uno.config.ts +15 -11
package/dist/bin/qvite.mjs
CHANGED
|
@@ -3,8 +3,9 @@ import { cac } from "cac";
|
|
|
3
3
|
import { build, createServer, loadEnv, mergeConfig } from "vite";
|
|
4
4
|
import UnoCSS from "@quiteer/unocss";
|
|
5
5
|
import { PersistentStore, deepMerge } from "@quiteer/utils";
|
|
6
|
-
import {
|
|
6
|
+
import { bootstrapEnv, envConfigPlugin, fileChangeLoggerPlugin, mockRouterPlugin, removeConsolePlugin, virtualHtmlPlugin } from "@quiteer/vite-plugins";
|
|
7
7
|
import path, { join, resolve } from "node:path";
|
|
8
|
+
import { AutoImport, Components, FileSystemIconLoader, Icons, IconsResolver, NaiveUiResolver, Progress, Vue, VueDevTools, VueJsx, createSvgIconsPlugin } from "@quiteer/vite-plugins/plugins";
|
|
8
9
|
import { cwd } from "node:process";
|
|
9
10
|
import { isFunction } from "@quiteer/is";
|
|
10
11
|
import { parserConfig } from "@quiteer/parser-config";
|
|
@@ -13,7 +14,7 @@ import { setTimeout } from "node:timers/promises";
|
|
|
13
14
|
import { getPortPromise } from "portfinder";
|
|
14
15
|
|
|
15
16
|
//#region package.json
|
|
16
|
-
var version = "0.1.
|
|
17
|
+
var version = "0.1.9";
|
|
17
18
|
|
|
18
19
|
//#endregion
|
|
19
20
|
//#region src/store.ts
|
|
@@ -68,7 +69,7 @@ function getDefaultOptions(config) {
|
|
|
68
69
|
}],
|
|
69
70
|
resolvers: [NaiveUiResolver(), IconsResolver({
|
|
70
71
|
customCollections: "local",
|
|
71
|
-
componentPrefix: "icon-
|
|
72
|
+
componentPrefix: "icon-local"
|
|
72
73
|
})]
|
|
73
74
|
}]
|
|
74
75
|
},
|
|
@@ -153,12 +154,18 @@ function geVitePlugins(config) {
|
|
|
153
154
|
}
|
|
154
155
|
async function toViteInlineConfig(config) {
|
|
155
156
|
const mode = store.get("mode");
|
|
157
|
+
const root$1 = store.get("root");
|
|
158
|
+
const plugins = geVitePlugins(config);
|
|
159
|
+
const userViteConfig = { ...config.vite };
|
|
160
|
+
const userPlugins = userViteConfig.plugins || [];
|
|
161
|
+
const userPluginsArray = Array.isArray(userPlugins) ? userPlugins : [userPlugins];
|
|
162
|
+
delete userViteConfig.plugins;
|
|
156
163
|
return mergeConfig({
|
|
157
164
|
configFile: false,
|
|
158
|
-
root:
|
|
165
|
+
root: root$1,
|
|
159
166
|
mode,
|
|
160
|
-
plugins:
|
|
161
|
-
},
|
|
167
|
+
plugins: [...userPluginsArray, ...plugins]
|
|
168
|
+
}, userViteConfig);
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
//#endregion
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UserConfig, defineConfig as defineConfig$1 } from "tsdown";
|
|
2
2
|
import { UserConfig as UserConfig$1, defineConfig as defineConfig$2 } from "vite";
|
|
3
|
-
import { AutoImport, Components,
|
|
3
|
+
import { AutoImport, Components, FileSystemIconLoader, Icons, IconsResolver, NaiveUiResolver, Progress, Vue, VueDevTools, VueJsx, createSvgIconsPlugin } from "@quiteer/vite-plugins/plugins";
|
|
4
|
+
import { EnvConfig, EnvConfigPluginOptions, VirtualHtmlOptions, fileChangeLoggerPlugin, mockRouterPlugin, removeConsolePlugin } from "@quiteer/vite-plugins";
|
|
4
5
|
|
|
5
6
|
//#region src/typings.d.ts
|
|
6
7
|
type PluginOptions<T extends (...args: any) => any> = boolean | Parameters<T>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineConfig as defineConfig$1 } from "tsdown";
|
|
2
2
|
import { defineConfig as defineConfig$2 } from "vite";
|
|
3
|
-
import { FileSystemIconLoader, IconsResolver, NaiveUiResolver } from "@quiteer/vite-plugins";
|
|
3
|
+
import { FileSystemIconLoader, IconsResolver, NaiveUiResolver } from "@quiteer/vite-plugins/plugins";
|
|
4
4
|
|
|
5
5
|
//#region index.ts
|
|
6
6
|
function defineConfig(config) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiteer/vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.9",
|
|
5
5
|
"description": "在 vite 的基础上增强的前端架构 cli",
|
|
6
6
|
"author": "quiteer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"tsdown": "^0.16.1",
|
|
60
60
|
"vite": "npm:rolldown-vite@7.2.2",
|
|
61
61
|
"zx": "^8.8.5",
|
|
62
|
-
"@quiteer/unocss": "0.0.5",
|
|
63
62
|
"@quiteer/is": "0.0.2",
|
|
64
|
-
"@quiteer/
|
|
65
|
-
"@quiteer/utils": "0.0.
|
|
63
|
+
"@quiteer/unocss": "0.0.6",
|
|
64
|
+
"@quiteer/utils": "0.0.4",
|
|
65
|
+
"@quiteer/vite-plugins": "^0.1.4"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"dev": "tsdown -w",
|
package/uno.config.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import type { VitePluginConfig } from '@unocss/vite'
|
|
1
2
|
import { defineConfig, NaiveUIPreset, QuiteerPreset } from '@quiteer/unocss'
|
|
2
3
|
|
|
3
|
-
export default
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
export default (userConfig: VitePluginConfig) => {
|
|
5
|
+
return defineConfig({
|
|
6
|
+
content: {
|
|
7
|
+
pipeline: {
|
|
8
|
+
exclude: ['node_modules', 'dist']
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
presets: [
|
|
12
|
+
QuiteerPreset(),
|
|
13
|
+
NaiveUIPreset()
|
|
14
|
+
],
|
|
15
|
+
...userConfig
|
|
16
|
+
})
|
|
17
|
+
}
|