-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hi Guys,
Wanting to update/migrate Y 1 -> 2 (as it looks/works great 👍🏻)), but doing it on a large older project/repo is proving difficult/impossible because of CRA.
What works: (@imports from the node_folders)
@import "animate-sass/helpers/mixins.scss"; // was @import "../../../../../node_modules/animate-sass/helpers/mixins.scss"
What doesn't work anymore: (sass/css relative urls - 'yarn start')
p { background-image: url('../assets/img/mycoolmap.jpg'); }
Module not found: You attempted to import ../assets/img/mycoolmap.jpg which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
Given that the project is updated by multiple devs, I'm trying to cater for both Y v1 and 2 users (though this might not be possible?). I know this is not a Y problem.. just looking for possible solutions to a project that was CRA in early 2019.
Have considered the following (but not practical) : ( CRA see issue here )
- Upgrade CRA and eject
- Move the /public folder into /src
- Craco
- Downgrading react-scripts
Have exhausted a week on finding answers without success. All alternative suggestions most welcomed 😀
Cheers.