Skip to content

Commit 87ff778

Browse files
committed
[Website] Bugfix: Delist data-liberation-core.phar from the preloaded offline mode assets
Removes data-liberation-core.phar from the list of assets preloaded to support offline mode. It was implicitly added to that list in #2058. The preloading triggers the following error: ``` Failed to execute 'addAll' on 'Cache': Cache.addAll(): duplicate requests ``` The error stops the initialization of the offline mode cache on the first page load. It still work on subsequent page loads. Still, this behavior breaks an E2E test in trunk. Playground doesn't need to preload that asset. It is only required for a psecific flavor of the importWxr step and there's already an established pattern of not preloading plugins, e.g. the SQLite database integration plugin is not preloaded. ## Testing instructions Confirm the Chromium E2E tests pass
1 parent 2191e22 commit 87ff778

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/vite-extensions/vite-list-assets-required-for-offline-mode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const patternsToNotCache = [
5757
/^\/assets\/php_.*\.js$/, // PHP JS files
5858
/^\/assets\/wp-.*\.zip$/, // Minified WordPress builds and static assets bundles
5959
/^\/assets\/sqlite-database-integration-[\w]+\.zip/, // SQLite plugin
60+
/^\/assets\/data-liberation-core\.phar-[\w]+\.gz$/, // Data Liberation library for WXR imports
6061
];
6162

6263
function listFiles(dirPath: string, fileList: string[] = []) {

0 commit comments

Comments
 (0)