Skip to content

resolve aliases in @import work during initial compile but error out during recompiles #173

@jedwards1211

Description

@jedwards1211

I have the following alias in my webpack config:

  resolve: {
    alias: {
      'mindfront-react-components': path.join(__dirname, '../mindfront-react-components'),
    }
  }

I have a sass file using this alias:

@import mindfront-react-components/css3-mixins

When I start up webpack-dev-server for the first time, the sass file compiles just fine. But if I make any changes to it, I get the following error when webpack-dev-server recompiles:

ERROR in ./~/css-loader!./~/sass-loader?indentedSyntax&outputStyle=expanded!./app/components/InventoryList.sass
Module build failed: 
@import mindfront-react-components/css3-mixins
       ^
      File to import not found or unreadable: mindfront-react-components/css3-mixins
      in /home/andy/jcore-portal/app/components/InventoryList.sass (line 1, column 9)
 @ ./app/components/InventoryList.sass 4:14-166 14:20-172

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions