Overriding Components

Only override what you need

We will occasionally be pushing changes to our components. If they have been overridden you won't automatically get these changes when you upgrade.

Falcon Platform makes overriding components very simple.

Within the client directory you'll find a moduleOverride.js file.

You can use this to override components pulled in from external packages.

module.exports = {
'<original_file>': '<new_file>',

So to override a UI component from @deity/falcon-ui it would look like this:

module.exports = {
'@deity/falcon-ui/dist/components/Input': 'src/components/Input',

Fixing imports

It's worth noting that you may need to change some of the imports from relative to absolute:

From this:

import { Icon } from './../Icon';

To this:

import { Icon } from '@deity/falcon-ui';

Watch our 'how to' guide

Ask the community. #help

If you can't find what you're looking for, the answer might be on our community slack channel. Our team keep a close eye on this and will usually get back to you within a few hours, if not straight away. If you haven't created an account yet please sign up here slack.deity.io.