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

Is there any plan to update css-loader to v2 ? #14

Open
HiroshiOHSUGA opened this issue Dec 18, 2018 · 0 comments
Open

Is there any plan to update css-loader to v2 ? #14

HiroshiOHSUGA opened this issue Dec 18, 2018 · 0 comments

Comments

@HiroshiOHSUGA
Copy link

HiroshiOHSUGA commented Dec 18, 2018

Recently css-loader was updated to v2 with breaking changes.

Important change is resolving logic for url(......).

resolving logic for uls() and import at-rules works the same everywhere, it does not matter whether css modules are enabled (with global and local module) or not. Examples - url('image.png') as require('./image.png'), url('./image.png') as require('./image.png'), url('~module/image.png') as require('module/image.png')

They says if we used assets from webpack aliased path, we should use ~ prefix.
But css-loader v1 can't resolve its path.

Do you have any plan for css-loader v2 ?

Note: Because there is workaround, this issue's priority may not be high.
Following settings don't work.

module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/,
        loader: 'css-loader',
        options: {
          url: () => true, // <- keep resolving logic same to css-loader v1
        },
      },
    ],
  },
};
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

1 participant