Skip to content

Bug in path resolution introduced in v9.0.x (import loop detected where there is no loop) #863

Closed
@birdofpreyru

Description

@birdofpreyru
  • Operating System: Ubuntu 18.04
  • Node Version: v12.18.2
  • NPM Version: v6.14.5
  • webpack Version: v4.43.0
  • sass-loader Version: v9.0.1

Actual Behavior

On an existing codebase, after upgrade from [email protected] to v9.0.1 I am getting the error:

SassError: An @import loop has been found:
               src/styles/global.scss imports src/styles/mixins.scss
               src/styles/mixins.scss imports node_modules/@dr.pogodin/react-utils/mixins.scss
               node_modules/@dr.pogodin/react-utils/mixins.scss imports src/styles/mixins.scss

There is not loop though, just SCSS files with the same names on the same routes in a library, and in the host codebase, i.e. such file structure, which worked fine with sass-loader <= 8.0.2:

/src
  /styles
    - global.scss
    - mixins.scss
/node_modules
  /@dr.pogodin
    /react-utils
      - mixins.scss
      /src
        /styles
          - mixins.scss  

I guess, I'll come with extra details later. Posting the issue in case from the issue description you may know what changes in the latest versions could cause it.

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