vite-plugin-mirrorstate 0.2.0 → 0.2.2
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/index.js +7 -5
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -147,16 +147,18 @@ export function mirrorStatePlugin(options = {}) {
|
|
|
147
147
|
});
|
|
148
148
|
},
|
|
149
149
|
resolveId(id) {
|
|
150
|
-
if (id === "virtual:mirrorstate/config"
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
if (id === "virtual:mirrorstate/config") {
|
|
151
|
+
return "\0" + id;
|
|
152
|
+
}
|
|
153
|
+
if (id === "virtual:mirrorstate/initial-states") {
|
|
154
|
+
return "\0" + id;
|
|
153
155
|
}
|
|
154
156
|
},
|
|
155
157
|
load(id) {
|
|
156
|
-
if (id === "
|
|
158
|
+
if (id === "\0virtual:mirrorstate/config") {
|
|
157
159
|
return `export const WS_PATH = "${opts.path}";`;
|
|
158
160
|
}
|
|
159
|
-
if (id === "
|
|
161
|
+
if (id === "\0virtual:mirrorstate/initial-states") {
|
|
160
162
|
// During build, read all mirror files and inline them
|
|
161
163
|
const pattern = Array.isArray(opts.filePattern)
|
|
162
164
|
? opts.filePattern
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-mirrorstate",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Vite plugin for bidirectional state synchronization through *.mirror.json files",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"directory": "packages/vite-plugin-mirrorstate"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"chokidar": "^
|
|
26
|
-
"debug": "^4.4.
|
|
27
|
-
"glob": "^
|
|
28
|
-
"ws": "^8.
|
|
25
|
+
"chokidar": "^4.0.3",
|
|
26
|
+
"debug": "^4.4.3",
|
|
27
|
+
"glob": "^11.0.3",
|
|
28
|
+
"ws": "^8.18.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/debug": "^4.1.12",
|
|
32
|
-
"@types/node": "^
|
|
33
|
-
"@types/ws": "^8.
|
|
34
|
-
"typescript": "^5.
|
|
35
|
-
"vite": "^7.
|
|
32
|
+
"@types/node": "^24.7.2",
|
|
33
|
+
"@types/ws": "^8.18.1",
|
|
34
|
+
"typescript": "^5.9.3",
|
|
35
|
+
"vite": "^7.1.9"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"vite": "^7.0.0"
|