Cleaning up default build files with replace and delete markers

Overview

When you customize io.Connect Desktop through the seed project, the contents of modifications/base/iocd/assets/ are merged with the platform component’s default assets. Files you don’t supply remain in the build as the component shipped them.

This is the right behavior since you want the platform’s built-in icons, fonts, splash assets, and system apps to still be there. But it also keeps assets that you might never need:

  1. Default files like fonts, background images, and source maps still end up in the bundle even if you use e.g. a custom splash.

  2. Built-in system apps can appear even though you haven’t added them. Folders like app-launchpad, webGroups, and workspaces show up in the bundle’s assets/ directory because they are part of the component install, regardless of what you have in your seed project’s /apps folder. The apps/ folder in your project is only for custom app builds, not for controlling which default assets get bundled.

Two marker files solve these

  • .replace — placed inside a directory, tells the CLI to drop the component’s entire default directory first, then copy in only your files.

  • .delete — removes the corresponding file or directory from the build output.

Add a .replace Marker

Let’s take a custom splash app as an example. Create a .replace file inside your splash modifications directory.

This tells the CLI to delete the entire default splash directory first and then copy only your files (all other contents of modifications/base/iocd/assets/splash/, excluding .replace itself). No stray default files will remain.

Add .delete Markers — But Only If You Know What You’re Doing

Create a .delete file inside the corresponding directories in your modifications folder.

When applyModifications processes these directories, it detects the .delete marker and removes the entire corresponding directory from the built assets/.

:warning: Only Remove System Apps You Are Sure You Don’t Need

The Launchpad, web groups, and Workspaces apps aren’t decoration — they implement platform features. Removing their assets will break those features if they’re enabled in your platform config.

In particular: the default platform mode in io.Connect Desktop 10 supports only web groups, and if web groups are missing the platform won’t start at all. See the io.Connect Desktop 10.0 breaking changes — platform modes section in the changelog for details.

See Also