@nuasite/cms 0.22.2 → 0.23.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/editor.js +1 -1
- package/package.json +1 -1
- package/src/vite-plugin.ts +13 -3
package/dist/editor.js
CHANGED
|
@@ -381,7 +381,7 @@ function CS(t, e) {
|
|
|
381
381
|
function ES(t, e) {
|
|
382
382
|
return typeof e == "function" ? e(t) : e;
|
|
383
383
|
}
|
|
384
|
-
const J_ = "0.
|
|
384
|
+
const J_ = "0.23.0", j_ = J_, ct = {
|
|
385
385
|
/** Highlight overlay for hovered elements */
|
|
386
386
|
HIGHLIGHT: 2147483644,
|
|
387
387
|
/** Hover outline for elements/components */
|
package/package.json
CHANGED
package/src/vite-plugin.ts
CHANGED
|
@@ -94,13 +94,23 @@ export function createVitePlugin(context: VitePluginContext): Plugin[] {
|
|
|
94
94
|
let fsWatcher: ReturnType<typeof watch> | undefined
|
|
95
95
|
let debounce: ReturnType<typeof setTimeout> | undefined
|
|
96
96
|
|
|
97
|
+
const invalidate = () => {
|
|
98
|
+
// Replicate Astro's invalidateDataStore which never fires because
|
|
99
|
+
// Vite's bundled chokidar 3.6.0 misses atomic-write changes.
|
|
100
|
+
const ssr = server.environments.ssr
|
|
101
|
+
const mod = ssr.moduleGraph.getModuleById('\0astro:data-store')
|
|
102
|
+
if (mod) {
|
|
103
|
+
ssr.moduleGraph.invalidateModule(mod, undefined, Date.now(), true)
|
|
104
|
+
}
|
|
105
|
+
ssr.hot.send('astro:content-changed', {})
|
|
106
|
+
server.environments.client.hot.send({ type: 'full-reload', path: '*' })
|
|
107
|
+
}
|
|
108
|
+
|
|
97
109
|
const startWatching = () => {
|
|
98
110
|
try {
|
|
99
111
|
fsWatcher = watch(dataStorePath, () => {
|
|
100
112
|
clearTimeout(debounce)
|
|
101
|
-
debounce = setTimeout(
|
|
102
|
-
server.environments.client.hot.send({ type: 'full-reload', path: '*' })
|
|
103
|
-
}, 80)
|
|
113
|
+
debounce = setTimeout(invalidate, 80)
|
|
104
114
|
})
|
|
105
115
|
} catch {
|
|
106
116
|
// File doesn't exist yet — retry when it appears
|