Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for file-loader 3.x #282

Closed
1 of 3 tasks
hpohlmeyer opened this issue Jan 9, 2019 · 1 comment
Closed
1 of 3 tasks

Add support for file-loader 3.x #282

hpohlmeyer opened this issue Jan 9, 2019 · 1 comment

Comments

@hpohlmeyer
Copy link

  • Operating System: MacOS 10.14.2
  • Node Version: 11.4.0
  • NPM Version: 6.4.1
  • webpack Version: 4.28.1
  • less-loader Version: 4.1.0

This issue is for a:

  • bug
  • feature request
  • modification request

Code

Webpack config

The styles.less file, that throws the error:

@import './fonts';

/** Import CSS for custom components, that are not part of the ui library. */
@import './custom/code-block';
@import './custom/http-operation-badge';

Expected Behavior

Should compile without errors.

Actual Behavior

Breaks with

ERROR in ./src/styles/styles.less (./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/styles/styles.less)
Module not found: Error: Can't resolve 'url-loader' in '/absolute/path/to/project'

I suppose this is caused by the removal of file-loaders useRelativePath-option in version 3.0.0.

@jhnns said that the less-loader usually applies the relativePath-option automatically, which sound like a problem, if the option is not supported anymore.

How Do We Reproduce?

Use less-loader with file-loader 3.x

@alexander-akait
Copy link
Member

Not related to less-loader, you need install url-loader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants