Currently, I am using webpack to create the necessary files for an npm package that will contain a selection of react components. These components include CSS that links to various fonts and icons.
However, when employing the file loader, these assets are improperly referenced with absolute paths (e.g. fonts/my-font.woff) in the main application, resulting in missing files.
Is there a solution to rectify this issue and ensure that the main app locates the correct files? I prefer to address the problem within the package itself rather than resorting to methods like manually copying the assets, as suggested by others, since I may not have complete control over the main application.