I am creating a package that shows an externally hosted web app in an Aura component. This component includes a canvas application. The Canvas App URL for the signed request is stored in a connected app. This connected app is part of the package.

During development, the canvas app URL should connect to localhost while in production mode it should connect to the production servers. I am currently achieving this by having two aura components and two connected apps. One aura component includes the development connected app, while the other uses the production version.

Obviously, the development aura component and connected app should not be included in the production package. How can I best achieve this?

Some considerations I made regarding plausible solutions:

  • I know connected apps are versioned, but changing the URL during development and changing it back for production is very error-prone
  • Having a production and development .forceignore but I do not see a method for switching between a .forceignore-dev and .forceignore-prod or similar
  • Using several branches and deleting files is error-prone

Is there any good way of going about this?


You must log in to answer this question.