vite-plugin-rebundle 1.3.0 → 1.3.1
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/package.json +6 -6
- package/src/rebundle.ts +12 -4
- package/src/index.ts +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-rebundle",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "imkost",
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
"release": "sh -c 'npm version ${1:-patch} && npm publish' --"
|
|
15
15
|
},
|
|
16
16
|
"exports": {
|
|
17
|
-
"import": "./src/
|
|
17
|
+
"import": "./src/rebundle.ts"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"src"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eposlabs/utils": "^1.
|
|
23
|
+
"@eposlabs/utils": "^1.1.1",
|
|
24
24
|
"@types/ws": "^8.18.1",
|
|
25
25
|
"chalk": "^5.6.2",
|
|
26
|
-
"filesize": "^11.0.
|
|
26
|
+
"filesize": "^11.0.13",
|
|
27
27
|
"portfinder": "^1.0.38",
|
|
28
28
|
"rolldown": "^1.0.0-beta.40",
|
|
29
|
-
"rollup": "^4.
|
|
30
|
-
"vite": "^7.1.
|
|
29
|
+
"rollup": "^4.52.2",
|
|
30
|
+
"vite": "^7.1.7",
|
|
31
31
|
"ws": "^8.18.3"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/src/rebundle.ts
CHANGED
|
@@ -12,11 +12,13 @@ import { WebSocketServer } from 'ws'
|
|
|
12
12
|
export const _code_ = Symbol('rebundle:code')
|
|
13
13
|
export const _sourcemap_ = Symbol('rebundle:sourcemap')
|
|
14
14
|
|
|
15
|
+
export type RolldownOptions = {
|
|
16
|
+
input: InputOptions
|
|
17
|
+
output: OutputOptions
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
export type Options = {
|
|
16
|
-
[bundleName: string]:
|
|
17
|
-
input: InputOptions
|
|
18
|
-
output: OutputOptions
|
|
19
|
-
}
|
|
21
|
+
[bundleName: string]: RolldownOptions
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export class Rebundle extends Unit {
|
|
@@ -234,3 +236,9 @@ export class Rebundle extends Unit {
|
|
|
234
236
|
await this.removeDirectoryIfEmpty(dirname(dir))
|
|
235
237
|
}
|
|
236
238
|
}
|
|
239
|
+
|
|
240
|
+
export function rebundle(options: Options = {}) {
|
|
241
|
+
return new Rebundle(options).vite
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export default rebundle
|