babel-plugin-css-modules-transform icon indicating copy to clipboard operation
babel-plugin-css-modules-transform copied to clipboard

implicitly registeres node hook

Open graingert opened this issue 6 years ago • 1 comments

currently babel-plugin-css-modules-transform implicitly registers a css hook, this can cause stange interactions when using babel-register.

I've got a PR to enable using the require-hook machinery on its own: https://github.com/css-modules/css-modules-require-hook/pull/117

graingert avatar May 29 '18 09:05 graingert

you can use it with:

import setupHook from 'css-modules-require-hook/setupHook';

const hooks = setupHook(params, ([hook, extension, isException]) => ({ hook, extension, isException }));

graingert avatar May 29 '18 09:05 graingert