PUBLIC_URL Is No Longer Supported

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

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

Copy

What to do

  1. Move all files from /public to src/assets.
  2. Update the value of logoUrl in your plugin.json to reflect the new relative path from the plugin.json to the logo file in src/assets.
  3. Commit and save your changes.

Migration 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?