create-react-library
create-react-library copied to clipboard
Problem with images for the example project
Since CRA was updated to use the new module-system for image imports, we've updated all imported images to use the new ".default"-property to get the url:
import image from 'assets/file.png';
const url = image.default;
When importing the built library into other projects, it works fine. But, I can't get the example project to run properly. The package.json for the library uses an old react-scripts version. How can I make the example project run smoothly and use the new image modules-feature in webpack to work properly with my updated library?
Or what I guess I'm asking is, how can I update the example project to be an updated version of CRA?