0

I would like to use my core project and import it into my second project. I point to the App.js and so the entire core project is now visible in my second project.

However, now I would like to override the logo that is being displayed at the top.

Is there a way to override files from a dependency that I use? I use the file-loader and I am pretty sure that I can use this in some way, I just don't know how.

yemerra
  • 1,352
  • 4
  • 19
  • 44

1 Answers1

0

Imported packages behaves as normal objects and methods. So if your component exposes the variables then can be accessed before instantiate it.

This is not a good practice at all, but is doable.

IE: You can change the PropTypes of a component:

import PropTypes from 'prop-types';
import { Menu, Dropdown, Icon, Statistic } from 'semantic-ui-react';
Dropdown.propTypes.text = PropTypes.any;
Raphael Rafatpanah
  • 19,082
  • 25
  • 92
  • 158
Mosè Raguzzini
  • 15,399
  • 1
  • 31
  • 43