Skip to content

Doesn't work with aliases properly #81

Open
@wizardion

Description

@wizardion

When WebPack has aliases propery:

module.exports = {
...
resolve: {
    extensions: ['.js'],
    alias: {
      default: path.resolve(__dirname, 'default'),
      './default': path.resolve(__dirname, 'default'),
    }
  }
}

and extract-loader is being used with an html-loader

module.exports = {
...
module: {
    rules: [
      {
        test: /\.html$/,
        use: [
          {
            loader: 'extract-loader',
          },
          {
            loader: 'html-loader',
          }
        ]
      }
    ]
}
...
}

end temple that uses aliases default:

<img src="default/course-default.jpg" />
...
<img src="images/logo.svg" alt="">

extract-loader - gives me an error:

Error: Cannot find module './default/course-default.jpg' from '/webpack-demo/src'

But with the same configuration and old version "extract-loader": "^2.0.0" - everything is working just fine!
Is there something wrong happening with the extract-loader?

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