Package Exports
- @leesiongchan/neutrino-middleware-react-css-modules
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@leesiongchan/neutrino-middleware-react-css-modules) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Neutrino React CSS Modules Middleware
neutrino-middleware-react-css-modules
is Neutrino middleware for loading and importing stylesheets using css-modules.
Requirements
- Node.js v6.10+
- Yarn or npm client
- Neutrino v7
Installation
neutrino-middleware-react-css-modules
can be installed via the Yarn or npm clients.
Yarn
❯ yarn add @leesiongchan/neutrino-middleware-react-css-modules
npm
❯ npm install --save @leesiongchan/neutrino-middleware-react-css-modules
Usage
neutrino-middleware-react-css-modules
can be consumed from the Neutrino API, middleware, or presets. Require this package
and plug it into Neutrino:
// Using function middleware format
const reactCssModules = require('@leesiongchan/neutrino-middleware-react-css-modules');
// Use with default options
neutrino.use(reactCssModules);
// Usage showing default options
neutrino.use(reactCssModules, {
generateScopedName: '[path]_[local]_[hash:base64:5]',
webpackHotModuleReloading: true,
});
// Using object or array middleware format
// Use with default options
module.exports = {
use: ['@leesiongchan/neutrino-middleware-react-css-modules'],
};
// Usage showing default options
module.exports = {
use: [
['@leesiongchan/neutrino-middleware-react-css-modules', {
generateScopedName: '[path]_[local]_[hash:base64:5]',
webpackHotModuleReloading: true,
}],
],
};