@umijs/bundler-vite 4.6.66 → 4.6.68

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.
@@ -1,11 +1,11 @@
1
1
  import type { InlineConfig as ViteInlineConfig } from '../../../compiled/vite';
2
- declare type ITmpUserConfig = Record<string, any>;
2
+ type ITmpUserConfig = Record<string, any>;
3
3
  /**
4
4
  * type of config processor
5
5
  */
6
- export declare type IConfigProcessor = (userConfig: ITmpUserConfig, currentViteConfig: Partial<ViteInlineConfig>) => Partial<ViteInlineConfig>;
6
+ export type IConfigProcessor = (userConfig: ITmpUserConfig, currentViteConfig: Partial<ViteInlineConfig>) => Partial<ViteInlineConfig>;
7
+ export default _default;
7
8
  /**
8
9
  * config transformer
9
10
  */
10
- declare const _default: (userConfig: ITmpUserConfig) => ViteInlineConfig;
11
- export default _default;
11
+ declare function _default(userConfig: ITmpUserConfig): ViteInlineConfig;
@@ -41,7 +41,8 @@ var rollup_default = function rollup(userConfig) {
41
41
  };
42
42
  if (typeof userConfig.analyze === "object" || process.env.ANALYZE) {
43
43
  let getExclude = function() {
44
- if (!excludeAssets) return [];
44
+ if (!excludeAssets)
45
+ return [];
45
46
  const excludes = Array.isArray(excludeAssets) ? excludeAssets : [excludeAssets];
46
47
  return excludes.filter((exclude) => {
47
48
  return typeof exclude === "string";
@@ -1,5 +1,5 @@
1
1
  import type { Plugin } from '../../compiled/vite';
2
- declare type fileType = Parameters<NonNullable<Plugin['generateBundle']>>[1]['file'];
2
+ type fileType = Parameters<NonNullable<Plugin['generateBundle']>>[1]['file'];
3
3
  /**
4
4
  * delete specific files from output map
5
5
  * @param files file list which will be removed
@@ -1,7 +1,7 @@
1
1
  import type { InlineConfig as ViteInlineConfig } from '../../compiled/vite';
2
2
  import type { IConfig } from '../types';
3
+ export default _default;
3
4
  /**
4
5
  * config with plugins
5
6
  */
6
- declare const _default: (userConfig: IConfig) => ViteInlineConfig;
7
- export default _default;
7
+ declare function _default(userConfig: IConfig): ViteInlineConfig;
@@ -1,9 +1,9 @@
1
1
  import { TransformOptions } from '@umijs/bundler-utils/compiled/esbuild';
2
2
  import type { Plugin } from '../../compiled/vite';
3
- declare type SVGROption = {
3
+ type SVGROption = {
4
4
  [key: string]: any;
5
5
  };
6
- declare type SVGOOption = {
6
+ type SVGOOption = {
7
7
  [key: string]: any;
8
8
  } | false;
9
9
  /**
@@ -6,6 +6,7 @@ var mod = require("module");
6
6
  var resolveFilename = mod._resolveFilename;
7
7
  mod._resolveFilename = function(request, parent, isMain, options) {
8
8
  const hookResolved = hookPropertyMap.get(request);
9
- if (hookResolved) request = hookResolved;
9
+ if (hookResolved)
10
+ request = hookResolved;
10
11
  return resolveFilename.call(mod, request, parent, isMain, options);
11
12
  };
package/dist/types.d.ts CHANGED
@@ -14,7 +14,7 @@ export interface ICopy {
14
14
  from: string;
15
15
  to: string;
16
16
  }
17
- export declare type IBabelPlugin = Function | string | [string, {
17
+ export type IBabelPlugin = Function | string | [string, {
18
18
  [key: string]: any;
19
19
  }] | [string, {
20
20
  [key: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-vite",
3
- "version": "4.6.66",
3
+ "version": "4.6.68",
4
4
  "description": "@umijs/bundler-vite",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/bundler-vite#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -27,8 +27,9 @@
27
27
  "rollup-plugin-visualizer": "5.9.0",
28
28
  "systemjs": "^6.14.1",
29
29
  "vite": "4.5.2",
30
- "@umijs/utils": "4.6.66",
31
- "@umijs/bundler-utils": "4.6.66"
30
+ "@umijs/bundler-utils": "4.6.68",
31
+ "@umijs/utils": "4.6.68",
32
+ "@umijs/bundler-webpack": "4.6.68"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@types/caniuse-lite": "1.0.5",