Skip to content

Not really a bug. L@@king for migration help v 1-2 and webpack/react/saas. #3085

@mesh-newbie

Description

@mesh-newbie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions