@dcloudio/vite-plugin-uni 3.0.0-alpha-3030820220114007 → 3.0.0-alpha-3030820220114011

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.
@@ -10,7 +10,7 @@ function customResolver(updatedId) {
10
10
  if (uni_cli_shared_1.isWindows) {
11
11
  return (0, uni_cli_shared_1.normalizePath)((0, uni_cli_shared_1.requireResolve)(updatedId, process.env.UNI_INPUT_DIR));
12
12
  }
13
- return updatedId;
13
+ return (0, uni_cli_shared_1.requireResolve)(updatedId, process.env.UNI_INPUT_DIR);
14
14
  }
15
15
  exports.customResolver = customResolver;
16
16
  function createResolve(options, _config) {
@@ -1,12 +1,13 @@
1
1
  import { Plugin } from 'vite';
2
2
  import { VitePluginUniResolvedOptions } from '..';
3
- export declare function createConfigResolved(options: VitePluginUniResolvedOptions): ((config: Readonly<Omit<import("vite").UserConfig, "alias" | "dedupe" | "optimizeDeps" | "plugins" | "assetsInclude"> & {
3
+ export declare function createConfigResolved(options: VitePluginUniResolvedOptions): ((config: Readonly<Omit<import("vite").UserConfig, "alias" | "dedupe" | "optimizeDeps" | "plugins" | "assetsInclude" | "worker"> & {
4
4
  configFile: string | undefined;
5
5
  configFileDependencies: string[];
6
6
  inlineConfig: import("vite").InlineConfig;
7
7
  root: string;
8
8
  base: string;
9
9
  publicDir: string;
10
+ cacheDir: string;
10
11
  command: "build" | "serve";
11
12
  mode: string;
12
13
  isProduction: boolean;
@@ -22,4 +23,5 @@ export declare function createConfigResolved(options: VitePluginUniResolvedOptio
22
23
  logger: import("vite").Logger;
23
24
  createResolver: (options?: Partial<import("vite").InternalResolveOptions> | undefined) => import("vite").ResolveFn;
24
25
  optimizeDeps: Omit<import("vite").DepOptimizationOptions, "keepNames">;
26
+ worker: import("vite").ResolveWorkerOptions;
25
27
  }>) => void | Promise<void>) | undefined;
@@ -15,6 +15,7 @@ function createConfigResolved(options) {
15
15
  initCheckUpdate();
16
16
  if (uni_cli_shared_1.isWindows) {
17
17
  // TODO 等 https://github.com/vitejs/vite/issues/3331 修复后,可以移除下列代码
18
+ // 2.8.0 已修复,但为了兼容旧版本,先不移除
18
19
  const item = config.resolve.alias.find((item) => typeof item.find !== 'string' ? item.find.test('@/') : false);
19
20
  if (item) {
20
21
  item.customResolver = resolve_1.customResolver;
package/dist/index.d.ts CHANGED
@@ -4,8 +4,6 @@ import type { Options as ViteLegacyOptions } from '@vitejs/plugin-legacy';
4
4
  import type { VueJSXPluginOptions } from '@vue/babel-plugin-jsx';
5
5
  import { CopyOptions } from '@dcloudio/uni-cli-shared';
6
6
  export interface VitePluginUniOptions {
7
- inputDir?: string;
8
- outputDir?: string;
9
7
  vueOptions?: VueOptions;
10
8
  vueJsxOptions?: (VueJSXPluginOptions & {
11
9
  babelPlugins?: any[];
@@ -39,8 +39,9 @@ function uniCopyPlugin({ outputDir, copyOptions, }) {
39
39
  ignored(path) {
40
40
  const normalizedPath = (0, uni_cli_shared_1.normalizePath)(path);
41
41
  if (platformStaticDirs.find((dir) => normalizedPath.includes(dir))) {
42
- return fs_1.default.statSync(normalizedPath).isDirectory;
42
+ return fs_1.default.statSync(normalizedPath).isDirectory();
43
43
  }
44
+ return false;
44
45
  },
45
46
  },
46
47
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/vite-plugin-uni",
3
- "version": "3.0.0-alpha-3030820220114007",
3
+ "version": "3.0.0-alpha-3030820220114011",
4
4
  "description": "uni-app vite plugin",
5
5
  "bin": {
6
6
  "uni": "bin/uni.js"
@@ -22,21 +22,21 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@babel/core": "^7.16.5",
25
+ "@babel/core": "^7.16.12",
26
26
  "@babel/plugin-syntax-import-meta": "^7.10.4",
27
- "@babel/plugin-transform-typescript": "^7.16.1",
28
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-3030820220114007",
29
- "@dcloudio/uni-shared": "3.0.0-alpha-3030820220114007",
27
+ "@babel/plugin-transform-typescript": "^7.16.8",
28
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3030820220114011",
29
+ "@dcloudio/uni-shared": "3.0.0-alpha-3030820220114011",
30
30
  "@rollup/pluginutils": "^4.1.2",
31
- "@vitejs/plugin-legacy": "^1.6.4",
32
- "@vitejs/plugin-vue": "^2.1.0",
33
- "@vitejs/plugin-vue-jsx": "^1.3.3",
31
+ "@vitejs/plugin-legacy": "^1.7.0",
32
+ "@vitejs/plugin-vue": "^2.2.0",
33
+ "@vitejs/plugin-vue-jsx": "^1.3.4",
34
34
  "@vue/compiler-core": "3.2.30",
35
35
  "@vue/compiler-dom": "3.2.30",
36
36
  "@vue/compiler-sfc": "3.2.30",
37
37
  "@vue/shared": "3.2.30",
38
- "cac": "^6.7.3",
39
- "debug": "^4.3.2",
38
+ "cac": "6.7.9",
39
+ "debug": "^4.3.3",
40
40
  "estree-walker": "^2.0.2",
41
41
  "express": "^4.17.1",
42
42
  "fs-extra": "^10.0.0",
@@ -50,10 +50,10 @@
50
50
  "@types/fs-extra": "^9.0.13",
51
51
  "@types/sass": "^1.16.0",
52
52
  "@vue/babel-plugin-jsx": "^1.1.1",
53
- "chokidar": "^3.5.2"
53
+ "chokidar": "^3.5.3"
54
54
  },
55
55
  "peerDependencies": {
56
- "vite": "^2.7.0"
56
+ "vite": "^2.8.1"
57
57
  },
58
58
  "uni-app": {
59
59
  "compilerVersion": "3.3.8"