Preserve Customisations to Standard JS Files During Wappler Updates

Explanation

Sometimes, standard JavaScript files provided by Wappler — such as stripe.js and server.js — may be customised to support specific workflows, integrations, or enhancements. However, during regular Wappler updates, these files are often overwritten without warning, which can break critical functionality and undo intentional modifications.

Challenge

Without a way to protect or isolate these changes, updates can become time-consuming and often require manual intervention to restore customised files. Although I use Git, it’s easy to miss a customised file - especially when 15–20 new files are available during an update, or when a project hasn’t been opened for a while and those customisations are no longer at the top of mind.

Suggested Solutions:

  1. File-level exclusion: Remove the checkbox to exclude specific standard JS files from being updated. Currently, a group of files such as AppConnect or ServerConnect can be included / excluded from updating; there's no option to exclude a single file from being updated.
  2. Exceptions folder: Check for an exclusion folder e.g. /custom-files, and skip updating any files saved inside this folder
  3. Custom file suffix: Create a customised version of the standard files using a suffix like stripe-custom.js or server-custom.js, and prioritise it over the standard version during runtime. With this method, standard JS files can be updated without impacting any customisations that may have been integrated in the application.

These options would provide users to safely extend or modify Wappler’s built-in functionality without fear of losing their customisations during updates.

2 Likes

I may be wrong here but is it not the case that if you add a custom module of the same name as an internal module, it will overwrite the default action with the customised one therefore preserving the modification?
@Teodor can you comment on this

For modules it is correct, create a module in extensions/server_connect/modules with the same name and it will replace the internal module and will not be overwritten.

There are also several hooks available to extend the express server, so in most cases you don't need to edit files within the lib folder.

1 Like