Releases: css-modules/css-modules-require-hook
The new API, beta
To try it out, run:
$ npm install [email protected]
Features:
— Added ignore
option, so you can ignore particular files from processing. Supports globs, regexp and functions.
— Hook is not attached automatically now, so you need to make a function call first to make it work.
— Added possibility to use particular files as presets. In that case hook will be attached automatically and all options should be described in the cmrh.conf.js
file. To use it, you should run: require('css-modules-require-hook/preset')
. I hope it will solve the babel issue.
— Some internal updates.
Development mode updated
Added possibility to control behavior, imposed by environment variable NODE_ENV
. So now, there is an option devMode
and it overrides NODE_ENV
value, which will provide you a little bit more precise control.
Still, you can use NODE_ENV=development
to drop cache as earlier.
pr: #56
thanks to @yazonnile
Development mode
Added possibility to invalidate cache in the development mode. To use it, run you code with environment variable NODE_ENV=development
.
Internal update
Fallback in favor of lodash.assign instead of object.assign in order to support older nodejs versions
Internal update
2.0.3 version update
Public parser
Using the public parser-plugin now
bug fix
Values + Symbols + Generic names
Values added: css-modules/css-modules-loader-core#28
Also added possibility to specify string patterns similar to webpack. For example:
hook({
generateScopedName: '[name]__[local]___[hash:base64:5]'
});
In order to use them together with webpack you should update the css-loader version to v0.21.0 or higher.
Also some major internal updates. If you provided custom functions to the generateScopedName
option, then you may be affected by those changes. Now you'll get full absolute paths to the files as the second argument: generateScopedName: function (name, filepath, css) { ... }
All the shortcuts were removed: root
, d
, u
. Use rootDir
and use
instead.
Generic names
2.0.0-beta2 version update
Values + Symbols
Merge pull request #44 from css-modules/2.0.0 2.0.0