vite-plugin-rebundle 1.16.0 → 1.18.0
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/dist/rebundle.js +2 -2
- package/package.json +4 -1
- package/src/rebundle.ts +2 -2
package/dist/rebundle.js
CHANGED
|
@@ -16,7 +16,7 @@ var Rebundle = class {
|
|
|
16
16
|
ws = null;
|
|
17
17
|
isRollupVite = false;
|
|
18
18
|
isRolldownVite = false;
|
|
19
|
-
ORIGINALS_DIR = "
|
|
19
|
+
ORIGINALS_DIR = "rebundle-originals";
|
|
20
20
|
constructor(commonOptions, bundleOptions) {
|
|
21
21
|
this.commonOptions = commonOptions ?? {};
|
|
22
22
|
this.bundleOptions = bundleOptions ?? {};
|
|
@@ -96,7 +96,7 @@ var Rebundle = class {
|
|
|
96
96
|
})
|
|
97
97
|
);
|
|
98
98
|
for (const chunk of this.getChunks(bundle)) {
|
|
99
|
-
this.originals[
|
|
99
|
+
this.originals[chunk.fileName] = chunk.code;
|
|
100
100
|
if (this.isRolldownVite) delete bundle[chunk.fileName];
|
|
101
101
|
}
|
|
102
102
|
await rm(join(this.dist, this.ORIGINALS_DIR), { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-rebundle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "imkost",
|
|
@@ -31,13 +31,16 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@eposlabs/utils": "^1.10.0",
|
|
34
|
+
"@parcel/watcher": "^2.5.1",
|
|
34
35
|
"@types/ws": "^8.18.1",
|
|
35
36
|
"chalk": "^5.6.2",
|
|
37
|
+
"esbuild": "^0.25.11",
|
|
36
38
|
"filesize": "^11.0.13",
|
|
37
39
|
"portfinder": "^1.0.38",
|
|
38
40
|
"rolldown": "^1.0.0-beta.42",
|
|
39
41
|
"rollup": "^4.52.4",
|
|
40
42
|
"vite": "^7.1.9",
|
|
43
|
+
"write-file-atomic": "^6.0.0",
|
|
41
44
|
"ws": "^8.18.3"
|
|
42
45
|
}
|
|
43
46
|
}
|
package/src/rebundle.ts
CHANGED
|
@@ -27,7 +27,7 @@ export class Rebundle {
|
|
|
27
27
|
private ws: WebSocketServer | null = null
|
|
28
28
|
private isRollupVite = false
|
|
29
29
|
private isRolldownVite = false
|
|
30
|
-
private ORIGINALS_DIR = '
|
|
30
|
+
private ORIGINALS_DIR = 'rebundle-originals'
|
|
31
31
|
|
|
32
32
|
constructor(commonOptions?: RolldownOptions | null, bundleOptions?: BundleOptions) {
|
|
33
33
|
this.commonOptions = commonOptions ?? {}
|
|
@@ -135,7 +135,7 @@ export class Rebundle {
|
|
|
135
135
|
|
|
136
136
|
for (const chunk of this.getChunks(bundle)) {
|
|
137
137
|
// Save original chunk code
|
|
138
|
-
this.originals[
|
|
138
|
+
this.originals[chunk.fileName] = chunk.code
|
|
139
139
|
|
|
140
140
|
// Delete chunk from the bundle to hide Vite's output log
|
|
141
141
|
if (this.isRolldownVite) delete bundle[chunk.fileName]
|