JSPM

@constgen/neutrino-react-scoped-styles

1.9.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q54159F
  • License GPL-3.0

Neutrino middleware for isolation of React components styles

Package Exports

  • @constgen/neutrino-react-scoped-styles

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 (@constgen/neutrino-react-scoped-styles) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@constgen/neutrino-react-scoped-styles

npm npm

Neutrino middleware for isolation of React components styles using react-scoped-styles. Applied only to styles imported from JSX and TSX files.

Requirements

  • Node.js v10+
  • Neutrino v9
  • Webpack v4

Installation

@constgen/neutrino-react-scoped-styles can be installed from NPM. You should install it to "dependencies" (--save) or "devDependncies" (--save-dev) depending on your goal.

npm install --save @constgen/neutrino-react-scoped-styles

Usage

In preset

Require this package and plug it into Neutrino. The middleware has no options:

let reactScopedStyles = require('@constgen/neutrino-react-scoped-styles')

neutrino.use(reactScopedStyles())

In neutrinorc

The middleware also may be used together with another presets in Neutrino rc-file, e.g.:

.neutrinorc.js

let reactScopedStyles = require('@constgen/neutrino-react-scoped-styles')

module.exports = {
   use: [
      reactScopedStyles()
   ]
}