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

Update css-loader in / from 1.0.1 to 2.0.0 #523

Closed
wants to merge 1 commit into from

Conversation

dependencies[bot]
Copy link
Contributor

@dependencies dependencies bot commented Dec 7, 2018

Dependencies.io has updated css-loader (a npm dependency in /) from "1.0.1" to "2.0.0".

2.0.0

2.0.0 (2018-12-07)

The main BREAKING CHANGES:

  • css modules are disabled by default, you need setup their use modules option. You can setup their using local (true is alias for this value) and global (previous behaviour) value. Why it is disabled by default? A lot of developers use css without css modules features and they get performance problems due postcss plugins spend time on analyze and processing file.
  • 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').

Bug Fixes

  • broken unucode characters (#850) (f599c70)
  • correctly processing urls() with ?#hash (#803) (417d105)
  • don't break loader on invalid or not exists url or import token (#827) (9e52d26)
  • don't duplicate import with same media in different case (#819) (9f66e33)
  • emit warnings on broken import at-rules (#806) (4bdf08b)
  • handle uppercase URL in import at-rules (#818) (3ebdcd5)
  • inconsistent generate class names for css modules on difference os (#812) (0bdf9b7)
  • reduce number of require for urls() (#854) (3338656)
  • support deduplication of string module ids (optimization.namedModules) (#789) (e3bb83a)
  • support module resolution in composes (#845) (453248f)
  • same urls() resolving logic for modules (local and global) and without modules (#843) (fdcf687)

Features

  • allow to disable css modules and disable their by default (#842) (889dc7f)
  • disable import option doesn't affect on composes (#822) (f9aa73c)
  • allow to filter urls (#856) (5e702e7)
  • allow to filter import at-rules (#857) (5e6034c)
  • emit warning on invalid urls() (#832) (da95db8)
  • added exportOnlyLocals option (#824) (e9327c0)
  • reuse postcss ast from other loaders (i.e postcss-loader) (#840) (1dad1fb)
  • schema options (b97d997)

BREAKING CHANGES

  • 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').
  • by default css modules are disabled (now modules: false disable all css modules features), you can return old behaviour change this on modules: 'global'
  • css-loader/locals was dropped in favor exportOnlyLocals option
  • import option only affect on import at-rules and doesn't affect on composes declarations
  • invalid @import at rules now emit warnings
  • use postcss@7

Bonus

  • code refactoring, updating deps and reusing postcss ast increase performance

@andrey-skl andrey-skl closed this Dec 14, 2018
@andrey-skl andrey-skl deleted the css-loader-2.0.0-452.0.1 branch December 14, 2018 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants