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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-rebundle",
3
- "version": "1.3.0",
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/index.ts"
17
+ "import": "./src/rebundle.ts"
18
18
  },
19
19
  "files": [
20
20
  "src"
21
21
  ],
22
22
  "dependencies": {
23
- "@eposlabs/utils": "^1.0.13",
23
+ "@eposlabs/utils": "^1.1.1",
24
24
  "@types/ws": "^8.18.1",
25
25
  "chalk": "^5.6.2",
26
- "filesize": "^11.0.2",
26
+ "filesize": "^11.0.13",
27
27
  "portfinder": "^1.0.38",
28
28
  "rolldown": "^1.0.0-beta.40",
29
- "rollup": "^4.50.1",
30
- "vite": "^7.1.5",
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
package/src/index.ts DELETED
@@ -1,9 +0,0 @@
1
- import { Rebundle, type Options } from './rebundle.ts'
2
-
3
- export type RebundleOptions = Options[string]
4
-
5
- export function rebundle(options: Options = {}) {
6
- return new Rebundle(options).vite
7
- }
8
-
9
- export default rebundle