oklas / react-app-alias

:label: Alias and multiple src directory for craco or rewired create-react-app
MIT License
174 stars 18 forks source link

Cannot resolve `eslint-loader` #19

Closed cliffordfajardo closed 3 years ago

cliffordfajardo commented 3 years ago

Description

When I use the aliasDangerous method I am getting the following error:

internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'eslint-loader'
Require stack:

Scenario

I've created a new create-react-app and am using react-app-rewired. I'm working in a mono-repo style repository that looks like this:

root
    backend
        src
    shared
        src
    web
        src

The reason I am using the dangerous option is that I need the /web codebase to import from shared which contains some utility javascript files.

When I commented out these 2 lines inside of the aliasDangerous file the code worked image

I was wondering what the purpose of importing eslint-loader is? If the aliasDangerous.js file has this, why doesnt the non dangerous version code have it ?

cliffordfajardo commented 3 years ago

It seems eslint-loader is deprecated now

oklas commented 3 years ago

Thanks 👍, try version 1.0.1

cliffordfajardo commented 3 years ago

@oklas - this fixed my problem - thank you!