vite-plugin-resolve
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -1,2 +0,2 @@ | ||
import { Plugin } from 'vite'; | ||
import type { Plugin } from 'vite'; | ||
@@ -3,0 +3,0 @@ export default resolve; |
{ | ||
"name": "vite-plugin-resolve", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "Custom resolve module content.", | ||
@@ -29,2 +29,8 @@ "main": "index.js", | ||
}, | ||
"files": [ | ||
"presets", | ||
"index.d.ts", | ||
"index.js", | ||
"index.mjs" | ||
], | ||
"keywords": [ | ||
@@ -31,0 +37,0 @@ "vite", |
@@ -127,3 +127,3 @@ # vite-plugin-resolve | ||
## API | ||
## API <sub><sup>(Define)</sup></sub> | ||
@@ -133,6 +133,10 @@ `resolve(entries)` | ||
```ts | ||
type entries = { | ||
[moduleId: string]: | ||
| ReturnType<Plugin['load']> | ||
| ((...args: Parameters<Plugin['load']>) => ReturnType<Plugin['load']>) | ||
import type { Plugin } from 'vite'; | ||
export interface VitePluginResolve { | ||
(entries: { | ||
[moduleId: string]: | ||
| ReturnType<Plugin['load']> | ||
| ((...args: Parameters<Plugin['load']>) => ReturnType<Plugin['load']>) | ||
}): Plugin[]; | ||
} | ||
@@ -139,0 +143,0 @@ ``` |
@@ -53,3 +53,3 @@ # vite-plugin-resolve | ||
// 你的逻辑代码 | ||
// 使用 | ||
import Vue, { version } from 'vue' | ||
@@ -59,3 +59,3 @@ import { ipcRenderer, shell } from 'electron' | ||
你可以很容易地使用' lib2esm() '来定制一些内容 | ||
你可以很容易地使用 `lib2esm()` 来定制一些内容 | ||
@@ -83,2 +83,3 @@ ```js | ||
} | ||
// 使用 | ||
@@ -88,3 +89,3 @@ import _, { chunk, curry, debounce, throttle } from 'lodash' | ||
** 在 Electron 中使用 ** 👉 [electron-vite-vue](https://github.com/electron-vite/electron-vite-vue/blob/main/packages/renderer/vite.config.ts) | ||
**在 Electron 中使用** 👉 [electron-vite-vue](https://github.com/electron-vite/electron-vite-vue/blob/main/packages/renderer/vite.config.ts) | ||
@@ -130,3 +131,3 @@ ## 内置模块 | ||
## API | ||
## API <sub><sup>(Define)</sup></sub> | ||
@@ -136,9 +137,11 @@ `resolve(entries)` | ||
```ts | ||
type entries = { | ||
[moduleId: string]: | ||
| ReturnType<Plugin['load']> | ||
| ((...args: Parameters<Plugin['load']>) => ReturnType<Plugin['load']>) | ||
import type { Plugin } from 'vite'; | ||
export interface VitePluginResolve { | ||
(entries: { | ||
[moduleId: string]: | ||
| ReturnType<Plugin['load']> | ||
| ((...args: Parameters<Plugin['load']>) => ReturnType<Plugin['load']>) | ||
}): Plugin[]; | ||
} | ||
// 使用 | ||
import _, { chunk, curry, debounce, throttle } from 'lodash' | ||
``` | ||
@@ -145,0 +148,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
175
46753
1710