@powerhousedao/builder-tools 6.2.3-dev.69 → 6.2.3-dev.70
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.d.mts +13 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +464 -403
- package/dist/index.mjs.map +1 -1
- package/dist/service-worker/service-worker.ts +10 -0
- package/package.json +4 -4
|
@@ -187,6 +187,14 @@ precacheAndRoute(self.__WB_MANIFEST, {
|
|
|
187
187
|
// for the content-hashed (immutable) assets. statuses [0, 200] on both — the
|
|
188
188
|
// editor JS is a CORS import (200) but its stylesheet/assets are no-cors
|
|
189
189
|
// (opaque/0); [200] alone silently dropped those and broke styles offline.
|
|
190
|
+
// A no-cors request (a stylesheet's @import) caches an opaque copy; a CORS one
|
|
191
|
+
// (a module import, fetch) fails on it, so it goes to the network instead.
|
|
192
|
+
const noOpaqueForCors: WorkboxPlugin = {
|
|
193
|
+
cachedResponseWillBeUsed: async ({ request, cachedResponse }) =>
|
|
194
|
+
request.mode === "cors" && cachedResponse?.type === "opaque"
|
|
195
|
+
? null
|
|
196
|
+
: (cachedResponse ?? null),
|
|
197
|
+
};
|
|
190
198
|
registerRoute(
|
|
191
199
|
({ url }) =>
|
|
192
200
|
url.pathname.includes("/-/cdn/") &&
|
|
@@ -201,6 +209,7 @@ registerRoute(
|
|
|
201
209
|
maxAgeSeconds: 60 * 60 * 24 * 30,
|
|
202
210
|
}),
|
|
203
211
|
new CacheableResponsePlugin({ statuses: [0, 200] }),
|
|
212
|
+
noOpaqueForCors,
|
|
204
213
|
],
|
|
205
214
|
}),
|
|
206
215
|
);
|
|
@@ -214,6 +223,7 @@ registerRoute(
|
|
|
214
223
|
maxAgeSeconds: 60 * 60 * 24 * 30,
|
|
215
224
|
}),
|
|
216
225
|
new CacheableResponsePlugin({ statuses: [0, 200] }),
|
|
226
|
+
noOpaqueForCors,
|
|
217
227
|
],
|
|
218
228
|
}),
|
|
219
229
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/builder-tools",
|
|
3
|
-
"version": "6.2.3-dev.
|
|
3
|
+
"version": "6.2.3-dev.70",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"publishConfig": {
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
},
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@powerhousedao/config": "6.2.3-dev.
|
|
27
|
-
"@powerhousedao/shared": "6.2.3-dev.
|
|
26
|
+
"@powerhousedao/config": "6.2.3-dev.70",
|
|
27
|
+
"@powerhousedao/shared": "6.2.3-dev.70",
|
|
28
28
|
"@tailwindcss/vite": "4.2.2",
|
|
29
29
|
"@tanstack/router-generator": "1.167.40",
|
|
30
30
|
"@tanstack/router-plugin": "1.168.42",
|
|
31
31
|
"@tanstack/virtual-file-routes": "1.162.0",
|
|
32
32
|
"@vitejs/plugin-react": "6.1.1",
|
|
33
|
-
"document-model": "6.2.3-dev.
|
|
33
|
+
"document-model": "6.2.3-dev.70",
|
|
34
34
|
"magic-string": "^0.30.21",
|
|
35
35
|
"vite": "8.3.4",
|
|
36
36
|
"vite-plugin-html": "3.2.2",
|