docz-plugin-css icon indicating copy to clipboard operation
docz-plugin-css copied to clipboard

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

Open HiroshiOHSUGA opened this issue 6 years ago • 0 comments

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
        },
      },
    ],
  },
};

HiroshiOHSUGA avatar Dec 18 '18 01:12 HiroshiOHSUGA