@quiteer/vite 0.0.5 → 0.0.6

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @quiteer/vite
2
2
 
3
3
  > `@quiteer/vite` 是在 Vite 基础上增强的前端构建与开发 CLI,内置插件编排、环境变量注入与 HTML 虚拟插入等能力,并支持与 `tsdown` 联动进行前后端/工具产物的构建统一。
4
- > 文档地址:[qvite 文档](https://quiteerjs.github.io/web/ci/qvite.html)
4
+ > 文档地址:[qvite 文档](https://quiteerjs.github.io/web/cli/qvite.html)
5
5
 
6
6
  ## 特性
7
7
 
package/client.d.ts CHANGED
@@ -7,8 +7,7 @@ interface ViteTypeOptions {
7
7
  // strictImportMetaEnv: unknown
8
8
  }
9
9
 
10
- type ImportMetaEnvFallbackKey
11
- = 'strictImportMetaEnv' extends keyof ViteTypeOptions ? never : string
10
+ type ImportMetaEnvFallbackKey = 'strictImportMetaEnv' extends keyof ViteTypeOptions ? never : string
12
11
 
13
12
  interface ImportMetaEnv extends Record<ImportMetaEnvFallbackKey, any> {
14
13
  BASE_URL: string
@@ -25,5 +24,5 @@ interface ImportMeta {
25
24
 
26
25
  readonly env: ImportMetaEnv
27
26
 
28
- glob: import('./importGlob.js').ImportGlobFunction
27
+ glob: import('vite').ImportGlobFunction
29
28
  }
@@ -2,7 +2,7 @@
2
2
  import { cac } from "cac";
3
3
  import { build, createServer, loadEnv, mergeConfig } from "vite";
4
4
  import { PersistentStore, deepMerge } from "@quiteer/utils";
5
- import { Progress, UnoCSS, Vue, VueDevTools, VueJsx, envConfigPlugin, fileChangeLoggerPlugin, mockRouterPlugin, removeConsolePlugin, virtualHtmlPlugin } from "@quiteer/vite-plugins";
5
+ import { Progress, UnoCSS, Vue, VueDevTools, VueJsx, bootstrapEnv, envConfigPlugin, fileChangeLoggerPlugin, mockRouterPlugin, removeConsolePlugin, virtualHtmlPlugin } from "@quiteer/vite-plugins";
6
6
  import { fileURLToPath } from "node:url";
7
7
  import { cwd } from "node:process";
8
8
  import { join } from "node:path";
@@ -12,7 +12,7 @@ import { pathExists } from "fs-extra";
12
12
  import { getPortPromise } from "portfinder";
13
13
 
14
14
  //#region package.json
15
- var version = "0.0.5";
15
+ var version = "0.0.6";
16
16
 
17
17
  //#endregion
18
18
  //#region src/defaults.ts
@@ -151,6 +151,10 @@ async function getConfig(filePath) {
151
151
  const path$1 = await configPath(filePath);
152
152
  const command = store.get("command");
153
153
  const mode = store.get("mode");
154
+ await bootstrapEnv({
155
+ mode,
156
+ includePrefixes: ["VITE_"]
157
+ });
154
158
  const modeEnv = loadEnv(mode, root, store.get("prefixes"));
155
159
  const env = deepMerge({}, loadEnv("", root, store.get("prefixes")), modeEnv);
156
160
  try {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@quiteer/vite",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "description": "在 vite 的基础上增强的前端架构 cli",
6
6
  "author": "quiteer",
7
- "license": "ISC",
8
- "homepage": "https://quiteerjs.github.io/web/ci/qvite.html",
7
+ "license": "MIT",
8
+ "homepage": "https://quiteerjs.github.io/web/cli/qvite.html",
9
9
  "keywords": [
10
10
  "vite",
11
11
  "cli"
@@ -56,8 +56,8 @@
56
56
  "semver": "^7.6.3",
57
57
  "vite": "npm:rolldown-vite@7.2.2",
58
58
  "zx": "^8.8.5",
59
- "@quiteer/vite-plugins": "^0.0.4",
60
59
  "@quiteer/is": "0.0.2",
60
+ "@quiteer/vite-plugins": "^0.0.9",
61
61
  "@quiteer/utils": "0.0.2"
62
62
  },
63
63
  "devDependencies": {},