Releases · css-modules/css-modules-require-hook · GitHub
Skip to content

Releases: css-modules/css-modules-require-hook

Additional options

Choose a tag to compare

@mightyaleksey mightyaleksey released this 08 Jan 21:15
  • Added the resolve option to provide possibility to adjust the way the ICSS imports are resolved. The resolve algorithm became stricter (closer to nodejs), but it doesn't affect the require paths. You may now omit the extension and provide custom module paths to for composes and @value paths.
  • Fixed double-dashes for camelCase option: #108
  • Updated deps in demo

Internals update

Choose a tag to compare

@mightyaleksey mightyaleksey released this 10 Sep 17:39
  • postcss-modules-parser was replaced with postcss-modules-resolve-imports.
  • fixes issue with nodejs 4 support.

Extended the camelCase option

Choose a tag to compare

@mightyaleksey mightyaleksey released this 20 Mar 08:25

For now, it accepts the similar to css-loader options: true|'dashes'|'dashesOnly'|'only'.
https://github.com/webpack-contrib/css-loader#camelcase

Totally removed demo folder from the published module

Choose a tag to compare

@mightyaleksey mightyaleksey released this 03 Oct 05:27
4.0.5

totaly removed demo folder

Removed test folder from the published module

Choose a tag to compare

@mightyaleksey mightyaleksey released this 03 Oct 05:22
4.0.4

added test folder to the .npmignore

Possibility to pass hashPrefix option

Choose a tag to compare

@mightyaleksey mightyaleksey released this 20 Sep 14:02

Added support for the scoped modules

Choose a tag to compare

@mightyaleksey mightyaleksey released this 18 Aug 14:09

Added camelCase option

Choose a tag to compare

@mightyaleksey mightyaleksey released this 29 May 09:47
4.0.1

version and publish scripts update

The API update

Choose a tag to compare

@mightyaleksey mightyaleksey released this 07 Mar 09:08

Since I removed the to option, so I decided to make a major release.

Anyways, now you can provide all the processor options to the postcss instance via processorOpts. For example:

const hook = require('css-modules-require-hook');
const lessParser = require('postcss-less').parse;

hook({
  extensions: '.less',
  processorOpts: {parser: lessParser},
});

Also, if you need to provide the to options, you may use processorOpts for that:

hook({
  processorOpts: {to: '..'},
});

The new API

Choose a tag to compare

@mightyaleksey mightyaleksey released this 24 Feb 21:50

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.