Skip to content

Commit

Permalink
[Website] Bugfix: Delist data-liberation-core.phar from the preloaded…
Browse files Browse the repository at this point in the history
… offline mode assets (#2072)

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
  • Loading branch information
adamziel authored Dec 11, 2024
1 parent 2191e22 commit 26660ad
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const patternsToNotCache = [
/^\/assets\/php_.*\.js$/, // PHP JS files
/^\/assets\/wp-.*\.zip$/, // Minified WordPress builds and static assets bundles
/^\/assets\/sqlite-database-integration-[\w]+\.zip/, // SQLite plugin
/^\/assets\/data-liberation-core\.phar-[\w]+\.gz$/, // Data Liberation library for WXR imports
];

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

0 comments on commit 26660ad

Please sign in to comment.