Site Plugins: Logo URL Path Change

Important: Perform this migration if you are using {{PUBLIC_URL}} in a site plugin's plugin.json

Site plugin extensions may provide an image file to use as the plugin's logo in the plugin explorer in the editor. In previous versions of the CLI, this image file was stored in your app's public directory, and the path to it was specified in the extension's plugin.json using {{PUBLIC_URL}}. This configuration is no longer supported.

If you use {{PUBLIC_URL}} in a site plugin extension's plugin.json, you get the following error when you attempt to build your app:

Copy

If you get this error, perform the migration explained below.

Migration process

  1. Move the logo file from public to src/assets.
  2. Update the value of logoUrl in your plugin.json file to reflect the relative path from your plugin.json to the logo file's new location in src/assets.
  3. Save and commit your changes. You should now be able to build your app.

Example

The following example shows an app before migration, details the migration process, then shows how the app looks after migration.

Before migration

Folder structure:
Copy
plugin.json
Copy

Migration process

  1. Move logo.svg from public/ to src/assets/.

  2. Change logoUrl in the plugin.json to ../../../../assets/logo.svg

After migration

Folder structure
Copy
plugin.json
Copy
Did this help?